airi/apps/server
2026-07-02 02:22:16 +08:00
..
docs feat(analytics): add official provider ops metrics 2026-07-01 21:19:42 +08:00
drizzle fix(server): harden provider catalog gating 2026-07-01 23:08:14 +08:00
otel feat(analytics): add official provider ops metrics 2026-07-01 21:19:42 +08:00
production/railway feat(admin-ui): implement standalone admin UI with Cloudflare Pages deployment 2026-06-09 17:09:06 +08:00
scripts chore: cleanup and lint fix 2026-06-07 20:31:22 +08:00
sql fix(server): docker-compose fix 2026-01-05 16:26:44 +08:00
src chore: remove admin dashboard 2026-07-02 02:22:16 +08:00
tests/verifications fix(server): make analytics best-effort 2026-06-05 16:27:10 +08:00
.env chore(server): remove unused CLIENT_URL from env template (#1884) 2026-06-08 13:52:19 +08:00
CLAUDE.md refactor(server): split services into domain/adapter layers, drop dead code 2026-05-18 23:36:45 +08:00
docker-compose.otel.yml feat(server): replace legacy health endpoints with K8s-style /livez and /readyz probes 2026-05-18 23:32:20 +08:00
docker-compose.yml feat(server): replace legacy health endpoints with K8s-style /livez and /readyz probes 2026-05-18 23:32:20 +08:00
Dockerfile feat(admin-ui): implement standalone admin UI with Cloudflare Pages deployment 2026-06-09 17:09:06 +08:00
drizzle.config.ts fix(server): database with duplicated index 2026-01-05 16:27:10 +08:00
instrumentation.ts feat(server): langfuse 2026-05-30 19:35:37 +08:00
package.json fix(server): make analytics best-effort 2026-06-05 16:27:10 +08:00
railway.toml feat(admin-ui): implement standalone admin UI with Cloudflare Pages deployment 2026-06-09 17:09:06 +08:00
README.md chore: remove admin dashboard 2026-07-02 02:22:16 +08:00
tsconfig.json feat(server/otel): restructure observability metrics and add active sessions gauge 2026-05-12 23:10:13 +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

AUTH_UI_URL

apps/ui-server-auth is deployed separately from the server image. The API server still owns the historical /auth/* entrypoints and redirects them to AUTH_UI_URL.

Default:

AUTH_UI_URL=https://accounts.airi.build/ui

Set this when previewing or deploying auth UI to a different Cloudflare URL.

ADMIN_UI_URL

The admin UI is deployed from the standalone proj-airi repository. The API server still owns the historical /admin/* entrypoints and redirects them to ADMIN_UI_URL.

Default:

ADMIN_UI_URL=https://admin.airi.build

Set this when previewing or deploying admin UI to a different Cloudflare URL.

ADDITIONAL_TRUSTED_ORIGINS (LAN / Capacitor dev)

When the mobile dev server uses a non-localhost origin (for example https://10.x.x.x:5273 from cap copy ios / capacitor.config.json), set ADDITIONAL_TRUSTED_ORIGINS in apps/server/.env.local to a comma-separated list of exact origins (parsed and normalized at startup). Example:

ADDITIONAL_TRUSTED_ORIGINS=https://10.0.0.129:5273,https://198.18.0.1:5273

Restart the API server after changing this variable.