airi/apps/server
RainbowBird fc0ad03411
feat(server): require BETTER_AUTH_SECRET and pass it explicitly to betterAuth
Without a stable secret, better-auth generates a random one per process,
which invalidates every session cookie and JWKS private key on redeploy
and across multi-instance deployments. Make it a required env var and
wire it into betterAuth({ secret }) explicitly so missing config fails
fast at boot instead of silently rotating keys.
2026-04-13 18:13:19 +08:00
..
docs/ai-context feat(server): use stripe product as flux pricing (#1640) 2026-04-12 04:32:42 +08:00
drizzle feat(auth): OIDC (#1531) 2026-04-02 04:24:04 +08:00
otel refactor(ui-server-auth,server): use better design of signin page 2026-04-10 16:25:11 +08:00
production/railway fix(server): now import the ui-server-auth built artifacts into docker image 2026-04-10 22:35:24 +08:00
sql fix(server): docker-compose fix 2026-01-05 16:26:44 +08:00
src feat(server): require BETTER_AUTH_SECRET and pass it explicitly to betterAuth 2026-04-13 18:13:19 +08:00
.env feat(server): require BETTER_AUTH_SECRET and pass it explicitly to betterAuth 2026-04-13 18:13:19 +08:00
CLAUDE.md feat(server): use stripe product as flux pricing (#1640) 2026-04-12 04:32:42 +08:00
docker-compose.otel.yml feat(server): add OpenTelemetry observability stack 2026-03-06 02:58:44 +08:00
docker-compose.yml feat(server): reimplement message queue, drop outbox 2026-03-28 02:25:44 +08:00
Dockerfile fix(server): now import the ui-server-auth built artifacts into docker image 2026-04-10 22:35:24 +08:00
drizzle.config.ts fix(server): database with duplicated index 2026-01-05 16:27:10 +08:00
instrumentation.mjs feat(otel): server instrumentation script 2026-04-02 18:21:30 +08:00
package.json fix(server): zod is required 2026-04-11 04:19:28 +08:00
railway.toml fix(docker): server dockerfile 2026-01-14 14:22:26 +08:00
README.md docs(server): ai context 2026-03-28 02:25:44 +08:00
tsconfig.json docs(server): ai context 2026-03-28 02:25:44 +08:00
vitest.config.ts feat(ui-server-auth): init server auth page 2026-04-03 01:26:38 +08:00

@proj-airi/server

HTTP and WebSocket backend for AIRI. This app owns auth, billing, chat synchronization, gateway forwarding, and server-side observability export.

What It Does

  • Serves the Hono-based API and WebSocket endpoints.
  • Uses Postgres as the source of truth for users, billing, and durable state.
  • Uses Redis for cache, KV, Pub/Sub, and Streams.
  • Forwards GenAI requests to the configured upstream gateway and records billing from usage.
  • Exports traces, metrics, and logs through OpenTelemetry.

How To Use It

Install dependencies from the repo root and run scoped commands:

pnpm -F @proj-airi/server typecheck
pnpm -F @proj-airi/server exec vitest run
pnpm -F @proj-airi/server build

For local observability infrastructure, use:

docker compose -f apps/server/docker-compose.otel.yml up -d