Marketing Website for Prymo Automotive https://prymoauto.com
  • HTML 44.8%
  • Go 30.7%
  • CSS 11.9%
  • JavaScript 11.9%
  • Shell 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-03 18:11:44 -05:00
internal/store feat: track and display unique visitors 2026-09-01 07:17:49 -05:00
static feat: add dithered page-edge texture 2026-09-03 18:11:44 -05:00
systemd initial commit 2026-08-24 03:58:48 -05:00
templates fix: remove rev control help text 2026-09-03 18:10:57 -05:00
third_party initial commit 2026-08-24 03:58:48 -05:00
.gitignore chore: ignore source asset drop 2026-09-01 07:10:38 -05:00
go.mod initial commit 2026-08-24 03:58:48 -05:00
go.sum initial commit 2026-08-24 03:58:48 -05:00
install-service.sh initial commit 2026-08-24 03:58:48 -05:00
main.go feat: move gallery to dedicated page 2026-09-03 18:01:38 -05:00
prymo update bin 2026-09-01 14:37:49 -05:00
README.md docs: document safe deployment updates 2026-09-01 07:25:10 -05:00
styles.css feat: add dithered page-edge texture 2026-09-03 18:11:44 -05:00

prymo

Marketing site and admin portal for Prymo Automotive. Go + SQLite; all content is entered at /login.

go build -o prymo .                                          # build (Go 1.25+)
./prymo                                                      # run on :7755
sudo bash install-service.sh                                 # install+enable systemd unit, prints admin password
./third_party/tailwindcss -i styles.css -o static/styles.css --minify   # rebuild css after editing styles.css or a template

Deploying an update

The first install uses sudo bash install-service.sh. For later updates, do not run the installer again and do not replace data/; that directory holds the live SQLite database and uploaded gallery/promotion images.

From the existing checkout on the deployment box:

cd /path/to/prymo
git pull --ff-only origin main
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o prymo.new .
mv prymo.new prymo
sudo systemctl restart prymo
sudo systemctl status prymo --no-pager

The schema upgrades itself when the new binary starts. If the deployment box does not have Git, build the Linux binary locally, upload it along with static/, and replace the old binary before restarting the service.

Two env vars, both optional, prefixed so they can't collide with anything else on the box:

PRYMO_PORT          7755          listen port
PRYMO_ADMIN_PASS    (generated)   login password, printed once to the log

Paths are fixed: the sqlite file is data/prymo.db, uploaded images go to data/uploads, and static/ is served at /. There is one login, username admin. PRYMO_ADMIN_PASS is read only while the users table is empty, i.e. on a first run.

The visitor counter identifies a browser with a one-year cookie. Its IP address, user agent, referrer, first/last visit, and page-view count are kept in SQLite and shown only in the authenticated admin portal. Include this tracking in the site's privacy notice if one is required for the business or location.

install-service.sh writes both vars into the unit file (mode 600); override either by exporting it before running the installer. To reset the login: sqlite3 data/prymo.db "DELETE FROM users;", restart, then read the new password from journalctl -u prymo.