TrieOH
UniventsBackend

Backend

The Univents Go service — events, ticketing, the store. Where it lives, structure, run it.

Univents is a Go service in the TheTree monorepo at api/univents/ — the events service: events & editions, ticket types, products, programs, registrations, badges, certifications, signatures, and the store (purchases paid through Payssage).

Stack

LayerChoice
LanguageGo (workspace module, go.work)
HTTPchi router via oapi-codegen (chi-server + strict-server) bindings
DatabasePostgreSQL, queries via sqlc
Async jobsriver workers (purchase expiry/confirm, emissions)
PaymentsPayssage intents via the platform wallet + webhook receiver
ObservabilityOpenTelemetry via the shared harness
Harnesslib/go/httpserver

Layout

api/univents/
├── api-spec.yml          # the contract — single source of truth
├── internal/
│   ├── app/              # wiring: router, auth dispatch, config
│   ├── handlers/         # one dir per feature: events, editions,
│   │                     #   ticket_types, products, programs, purchases,
│   │                     #   checkouts, badges, certifications, signatures,
│   │                     #   realtime, webhooks, …
│   ├── repos/            # SQL repositories over the sqlc layer
│   ├── services/         # business logic
│   ├── sqlc/             # generated query code
│   ├── openapi/          # generated oapi-codegen bindings (not committed)
│   └── jobs/             # river workers
└── db/                   # schema + migrations

Run it

docker compose up identityx payssage -d   # deps first (auth + payments)
docker compose up univents                # → http://localhost:8081
just univents test
just univents lint

Env lives in api/univents/.env (gitignored): IDENTITY_X_*, PAYSSAGE_WALLET_ID, PAYSSAGE_WEBHOOK_SECRET, PAYSSAGE_API_KEY.

Spec-first

api-spec.yml drives everything: oapi-codegen bindings (just generate-oapi), the TS client (just generate-orval), and these docs (/docs/openapi.yml). Change the spec, then regenerate — never hand-edit generated code.

On this page