Sign inSign up

bugwz/aimeter

By bugwz

•Updated 7 months ago

https://github.com/bugwz/AIMeter

Image
Machine learning & AI
Web servers
0

1.8K

bugwz/aimeter repository overview

⁠AIMeter

AIMeter is a self-hosted dashboard for tracking AI provider usage, quota, and historical trends.

React Express TypeScript GitHub

⁠Features

  • React frontend dashboard
  • Express backend API
  • Multi-provider adapter architecture
  • Runtime modes: node and serverless
  • 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, postgres, mysql

⁠Supported Providers

Aliyun · Antigravity · Claude · Codex · Kimi · MiniMax · z.ai · Copilot · OpenRouter · Ollama · OpenCode · Cursor

Provider-specific examples and integration notes: github.com/bugwz/AIMeter — doc/providers⁠

⁠Tech Stack

  • Frontend: React 18, TypeScript, Vite, Tailwind CSS
  • Backend: Node.js, Express, TypeScript
  • Storage: SQLite / PostgreSQL / MySQL

⁠Quick Start

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:latest

Then open: http://localhost:3000

For Docker Compose, HTTPS, MySQL/PostgreSQL, or multi-arch builds: deploy/container/README.md⁠

⁠Configuration

Config sources and priority:

  1. config.yaml (or path from AIMETER_CONFIG_FILE)
  2. Environment variables
  3. Built-in defaults

Required environment variables:

VariableDescription
AIMETER_DATABASE_ENGINEsqlite, postgres, or mysql
AIMETER_DATABASE_CONNECTIONConnection string or file path
AIMETER_RUNTIME_MODEnode (in-process scheduler) or serverless
AIMETER_SERVER_PORTFrontend/proxy port (default 3000)
AIMETER_BACKEND_PORTBackend API port (default 3001)
  • In node mode, the in-process scheduler starts automatically.
  • In serverless mode, use an external cron to call /api/system/jobs/refresh every 5 minutes.

Detailed field mapping and explanations: doc/conf/README.md⁠

⁠Deployment

⁠API Documentation

doc/api/README.md⁠

⁠Security Notes

  • Session secret and encryption-related settings are initialized and persisted by system storage during bootstrap in database mode.
  • AIMETER_CRON_SECRET and AIMETER_ENDPOINT_SECRET are optional integration secrets; when provided, use strong 32-char random values.
  • Use AIMETER_SERVER_PROTOCOL=https in production to enable strict transport-related security headers.

⁠Source

github.com/bugwz/AIMeter⁠

Tag summary

Content type

Image

Digest

sha256:a296bb0c1…

Size

256.7 MB

Last updated

7 months ago

docker pull bugwz/aimeter