Aerun API - Backend HTTP/SSE (Bun + Hono + Drizzle + PostgreSQL + Valkey)
- TypeScript 99.3%
- Shell 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| artifacts/gate2 | ||
| docs | ||
| drizzle | ||
| scripts | ||
| src | ||
| test | ||
| .env.example | ||
| .env.test | ||
| .gitignore | ||
| .prettierignore | ||
| AGENTS.md | ||
| bun.lock | ||
| bunfig.toml | ||
| direct-entrypoint.sh | ||
| drizzle.config.ts | ||
| Gemini_Generated_Image_mzdifvmzdifvmzdi.png | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Aerun API
Transparent OpenAI-compatible proxy for canonical OpenRouter models. Customers pay the approved public OpenRouter catalog price; discounted internal sources remain private and determine Aerun's margin, never the customer rate.
Start with the documentation index and the localhost runbook.
install -m 600 .env.example .env
# Edit .env and set OPENCODE_API_KEY plus unique local encryption/pepper values.
# Start native PostgreSQL and Valkey services first.
bun install
bun run db:migrate
bun run db:seed
bun run prices:sync-openrouter
bun run dev
Bun loads .env automatically. The file is Git-ignored and should remain mode 0600; .env.example contains variable names and non-secret placeholders only.
Validation:
bun run test:bootstrap
bun run validate
bun run scan:secrets
Production runs directly on the host with Bun and systemd. PostgreSQL and Valkey
are host services; see deploy/deploy.sh and the systemd units under deploy/.