A Prettynice/Gren site for the Go' og varm farm shop.
Install the tools (Node 20 and the ws4sqlite database binary, see mise.toml):
mise installThen install the JS dependencies (Prettynice, Gren, nodemon) from
package-lock.json, e.g. npm ci.
Start the local database bridge and web server:
mise run devRun the end-to-end smoke test (builds first, uses its own temporary database
and ports, never touches db/googvarm.db):
mise run testBuild the app:
mise run buildRun the built server:
mise run startEnvironment variables (see server/src/Config.gren): ADMIN_PASSWORD
(required for login, min 12 chars; mise run dev defaults it to dev-admin-password), HOST, PORT,
DB_URL, COOKIE_SECURE, SESSION_TTL_DAYS.
Runs on NixOS via the flake in this repo: see nix/README.md
(module, Caddy/HTTPS, backups, monitoring).
GET /healthz reports app + DB health.
Server-side Gren lives in server/src.
Main.gren wires authentication, route dispatch, and page loading together. Route parsing is in Routes.gren, shared response/layout helpers are in Responses.gren, and admin course form parsing is in CourseForm.gren.
Views.gren contains ordinary static pages, while CourseViews.gren owns the course listing and admin course dialog markup.
Client-side Prettynice components live in client/src/Components.