Files
image2api/frontend
GlossSeaDress f94a7ace5f feat(api): GET /v1/user/balance 查询用户余额
users 表新增 credits_used(累计消耗积分):扣费累加、失败退款回减(refundIfNeeded / 维护清扫改走 RefundCredits),充值/CDK/签到发放不计入。接口返回 {object,balance,used,total},Bearer API Key 鉴权,与其他 v1 接口同一 CORS 与错误格式。站内接口文档与 README 补充端点说明。
2026-08-10 14:59:48 +08:00
..
2026-07-08 09:49:54 +08:00
2026-07-08 09:49:54 +08:00

ai-gateway frontend

Vue 3 + Vite admin console for the ai-gateway backend. This replaces the old single-file static/admin.html.

Develop

npm install
npm run dev        # http://localhost:5173

The dev server proxies /admin, /health, /generated, /v1 to the backend. Start the backend separately:

# from repo root
python app.py      # http://0.0.0.0:6060

If the backend runs elsewhere, set VITE_BACKEND before npm run dev:

VITE_BACKEND=http://192.168.1.10:6060 npm run dev

Build

npm run build      # outputs static assets to ./dist
npm run preview    # serve the production build locally

When hosting dist/ on a different origin than the API, set VITE_API_BASE (e.g. VITE_API_BASE=http://api-host:6060) at build time, and add that frontend origin to the backend's CORS_ORIGINS env var.