- React frontend dashboard
- Express backend API
- Multi-provider adapter architecture
- Runtime modes:
nodeandserverless - Database-backed storage and bootstrap flow
- Unified dashboard across multiple AI providers
- Provider credential management and quota display
- Usage history and chart pages
- Endpoint/proxy related API pages
- Bootstrap + admin route initialization flow
- Multiple database engines:
sqlite,d1,postgres,mysql - Cloudflare Cron Triggers support via
scheduledhandler
Provider-specific examples and integration notes: docs/providers
- Frontend: React 18, TypeScript, Vite, Tailwind CSS
- Backend: Node.js, Express, TypeScript
- Storage: SQLite / Cloudflare D1 / PostgreSQL / MySQL
.
├─ src/ # Frontend app
├─ server/ # Backend API, auth, jobs, storage
├─ deploy/ # Deployment guides by platform
├─ docs/ # API docs, provider examples, translations, config docs
├─ config.all.yaml # Full config template
├─ config.yaml # Active local config (create by copy)
└─ .env.all # Full env template
Single-container deployment with nginx + Node.js. Data is persisted via a volume mount.
mkdir -p ~/aimeter/db ~/aimeter/log
docker run -d --name aimeter \
-p 3000:3000 \
-e AIMETER_DATABASE_ENGINE=sqlite \
-e AIMETER_DATABASE_CONNECTION=/aimeter/db/aimeter.db \
-e AIMETER_SERVER_PORT=3000 \
-e AIMETER_BACKEND_PORT=3001 \
-e AIMETER_RUNTIME_MODE=node \
-v ~/aimeter/db:/aimeter/db \
-v ~/aimeter/log:/aimeter/log \
bugwz/aimeter:latestThen open: http://localhost:3000
For Docker Compose, HTTPS, MySQL/PostgreSQL, or multi-arch builds: deploy/container/README.md
Serverless deployment on Vercel. Requires an external MySQL or PostgreSQL database.
| Mode | Deploy |
|---|---|
| MySQL | |
| PostgreSQL |
Set env vars, complete bootstrap, then configure an external cron service to call /api/system/jobs/refresh every 5 minutes.
For cron setup and full configuration: deploy/vercel/README.md
Serverless deployment on Cloudflare Workers. Supports Cloudflare D1, MySQL, or PostgreSQL.
After deploying, set runtime env vars by database mode:
| Mode | Required env vars |
|---|---|
| D1 | AIMETER_RUNTIME_MODE=serverlessAIMETER_SERVER_PROTOCOL=httpsAIMETER_DATABASE_ENGINE=d1AIMETER_DATABASE_CONNECTION=DB |
| MySQL | AIMETER_RUNTIME_MODE=serverlessAIMETER_SERVER_PROTOCOL=httpsAIMETER_DATABASE_ENGINE=mysqlAIMETER_DATABASE_CONNECTION=mysql://USER:PASSWORD@HOST:3306/DATABASE |
| PostgreSQL | AIMETER_RUNTIME_MODE=serverlessAIMETER_SERVER_PROTOCOL=httpsAIMETER_DATABASE_ENGINE=postgresAIMETER_DATABASE_CONNECTION=postgres://USER:PASSWORD@HOST:5432/DATABASE?sslmode=require |
Cron Triggers are built-in — wrangler.jsonc schedules a refresh every 5 minutes automatically.
For D1 binding, Hyperdrive, and full setup steps: deploy/cloudflare/README.md
npm run dev # frontend only
npm run start:server # backend only
npm run dev:all # frontend + backend
npm run dev:mock:all # frontend + backend (mock mode)
npm run build # type-check and build frontend
npm run preview # preview frontend build
npm run cf:dev # local Cloudflare Workers dev (Wrangler)
npm run cf:deploy # deploy to Cloudflare WorkersConfig sources and priority in current implementation:
config.yaml(or path fromAIMETER_CONFIG_FILE)- Environment variables
- Built-in defaults
Important:
database.engine/AIMETER_DATABASE_ENGINEis required.database.connection/AIMETER_DATABASE_CONNECTIONis required.- In
serverlessmode, in-process scheduler is disabled; use CF Cron Triggers or an external scheduler. - In
nodemode, in-process scheduler starts automatically.
Detailed field mapping and explanations:
Supported deployment modes and links:
- Session secret and encryption-related settings are initialized and persisted by system storage during bootstrap in database mode.
AIMETER_CRON_SECRETandAIMETER_ENDPOINT_SECRETare optional integration secrets; when provided, use strong 32-char random values.- Use
AIMETER_SERVER_PROTOCOL=httpsin production to enable strict transport-related security headers.



