- Go 52.3%
- HTML 27.8%
- CSS 13.9%
- JavaScript 6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| static | ||
| templates | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| main_test.go | ||
| README.md | ||
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 ./....