An idiomatic Go rewrite of the Receiptly backend (originally actix-web/sqlx in Rust), built with Clean / Hexagonal architecture + DDD-lite.
- HTTP: Gin (transport/adapter layer only)
- DB: PostgreSQL via pgx/v5; JSONB document store; sqlc for typed queries
- Auth: JWT (HS256) + bcrypt + Google ID-token verification
- Realtime: WebSocket push (coder/websocket)
- Migrations: goose (embedded, run at startup)
Read
AGENTS.mdfirst. It is the source of truth for architecture, conventions, the domain rules ported from the original service, and the recipe for adding a new feature module. Theinternal/auth+internal/usersslice is the reference implementation every other module should mirror.For the language-agnostic system documentation (use-case, sequence, and ERD diagrams + full API reference) see receiptly-doc/.
cp .env.example .env
make db-up # local Postgres on :5432
make run # migrates + serves on :8080# smoke test
curl -s localhost:8080/actuator/health
curl -s -XPOST localhost:8080/v1/auth/signup \
-H 'content-type: application/json' \
-d '{"name":"Ada Lovelace","email":"ada@example.com","password":"password123"}'cmd/api/ composition root (wiring, graceful shutdown)
internal/
auth/ reference slice: signup/login/refresh/social (domain→app→adapters→ports)
users/ reference slice: GET/PATCH /v1/me
money/ Money value object (exact decimal, 2dp wire format)
currency/ Currency value object (ISO-4217 subset)
platform/ shared infra: config, db, logging, http middleware, errors, ids
migrations/ goose SQL (embedded)
See AGENTS.md for the full picture.