# Bookra Backend Go + Gin API for Bookra, designed for Railway deployment and Neon-backed persistence. ## Commands ```bash go run ./cmd/api go build ./... npm run db:generate npm run db:migrate:status npm run db:migrate:up ``` ## Environment - `BOOKRA_FRONTEND_URL` allowed browser origin - `BOOKRA_DATABASE_URL` Neon pooled connection - `BOOKRA_DATABASE_DIRECT_URL` Neon direct connection for migrations/admin tasks - `BOOKRA_NEON_AUTH_URL` Neon Auth base URL used for JWKS verification - `BOOKRA_JOB_RUNNER_KEY` shared secret for remote reminder dispatch calls - `BOOKRA_EMAIL_FROM` sender identity for email reminders - `BOOKRA_SMS_FROM` sender label for future SMS reminders - `BOOKRA_STRIPE_SECRET_KEY` Stripe API secret - `BOOKRA_STRIPE_WEBHOOK_SECRET` Stripe webhook secret ## Notes - Auth verification is isolated in `internal/auth`. - OpenAPI lives in `openapi/bookra.openapi.yaml`. - SQL migrations live in `migrations/`. - `sqlc.yaml` is wired through `npm run db:generate`. - Goose migrations are wired through `npm run db:migrate:*` and use the Neon direct connection URL. - Reminder dispatch now runs through `POST /v1/internal/jobs/reminders/dispatch` with `X-Bookra-Job-Key`.