No description
  • Go 52.3%
  • HTML 27.8%
  • CSS 13.9%
  • JavaScript 6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-16 10:01:51 -05:00
static commit 2025-01-08 20:41:01 +00:00
templates commit 2025-01-08 20:41:01 +00:00
.gitignore Require DB_PASS and ADMIN_PASSWORD; drop the committed binary 2026-10-05 15:12:24 -04:00
go.mod Fix forgeable admin sessions and refresh Go/PostgreSQL dependency 2026-11-16 10:01:51 -05:00
go.sum Fix forgeable admin sessions and refresh Go/PostgreSQL dependency 2026-11-16 10:01:51 -05:00
main.go Fix forgeable admin sessions and refresh Go/PostgreSQL dependency 2026-11-16 10:01:51 -05:00
main_test.go Fix forgeable admin sessions and refresh Go/PostgreSQL dependency 2026-11-16 10:01:51 -05:00
README.md Fix forgeable admin sessions and refresh Go/PostgreSQL dependency 2026-11-16 10:01:51 -05:00

A super-simple registry for babies and weddings and similar things. Uses PostgreSQL. Feel free to use as a starting place for a registry of your own. Contact me for help. It's really easy. I'll even host one for you if you like.

It looks something like this: archived webpage

You can copy the code, sell it, do whatever.

Running

Use Go 1.27.4 or newer and PostgreSQL 14 or newer. Set DB_PASS and ADMIN_PASSWORD (both required); optional settings are DB_HOST (localhost), DB_PORT (5432), DB_USER (simplereg), DB_NAME (registrydb), and PORT (8090). Run from this directory so the templates and static assets can be found. The existing database must contain the gifts table; this app does not run migrations.

Build with go build -o simplereg .. Run behind an HTTPS reverse proxy; the database connection uses sslmode=disable and should remain on a trusted local connection. The proxy must overwrite X-Forwarded-Proto with the actual client protocol. Admin sessions expire after 12 hours and are revoked when ADMIN_PASSWORD changes. Upgrading from the old unsigned cookie requires admins to log in again. Cross-origin browser writes are rejected. Public purchase marking remains public.

Validate with go test -race ./..., go vet ./..., and govulncheck ./....