尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
• Vue 3 + Vite frontend in fitness-web/
• Node + Hono API in fitness-api/
• Vercel function adapter in api/
• Postgres via Neon
This repo is set up for one Vercel project. The frontend is deployed as static assets and the backend is exposed from /api/*.
4. The frontend already defaults to same-origin /api. For local dev it proxies to the backend through Vite.
• Frontend: http://localhost:5173
• API: http://localhost:3000
• Frontend calls API at /api, proxied by Vite during local dev
scripts/fitness.mjs logs entries from any terminal without opening the app. Install once:查看完整 README ↗Calorie tracking app with:
fitness-web/fitness-api/api/This repo is set up for one Vercel project. The frontend is deployed as static assets and the backend is exposed from /api/*.
Production: https://food-tracker-weld-six.vercel.app
.
├── api/ # Vercel function entrypoint
├── fitness-api/ # Real backend code
│ ├── drizzle/ # SQL migrations
│ └── src/
│ ├── app.ts # API routes
│ ├── db/ # DB client, schema, migration runner
│ ├── lib/ # Shared backend helpers
│ ├── seed.ts # Dev/sample data seeding
│ └── server.ts # Local API server
├── fitness-web/ # Vue frontend
├── vercel.json # Vercel project config
└── package.json # Workspace scripts
npm install
cp fitness-api/.env.example fitness-api/.env
fitness-api/.env:DATABASE_URL=postgresql://...
APP_TIMEZONE=America/Chicago
CALORIE_UNLOCK_SCHEDULE=09:00=0.25,12:00=0.25,17:00=0.25,21:00=0.25
CALORIE_UNLOCK_FALLBACK_GOAL=2000
GOAL_WEIGHT=189.0
GMAIL_ALERT_ADDRESS=
GMAIL_ALERT_APP_PASSWORD=
PORT=3000
CORS_ORIGIN=http://localhost:5173
/api. For local dev it proxies to the backend through Vite.From the repo root:
npm run dev # frontend + backend together
npm run dev:web # frontend only
npm run dev:api # backend only
npm run test # API tests
npm run build # full verification build
npm run build:web # frontend build only
npm run build:api # backend typecheck/build only
Local URLs:
http://localhost:5173http://localhost:3000/api, proxied by Vite during local devfitness)scripts/fitness.mjs logs entries from any terminal without opening the app. Install once:
ln -sf "$PWD/scripts/fitness.mjs" ~/.local/bin/fitness
fitness 30 # 30 calories — direct POST, no LLM
fitness protein 40 # also: sugar, carbs, caffeine
fitness ate a bagel and a coffee # estimated, then logs each metric (~3s)
fitness -n a bagel # preview without logging
Estimation runs through local headless Claude Code (claude -p --json-schema), so it
needs no OpenAI key. If the claude CLI is missing or fails it falls back to
POST /text/parse, which uses the deployment's OPENAI_API_KEY. Force one backend with
FITNESS_ESTIMATOR=claude or FITNESS_ESTIMATOR=api.
It targets production by default. To point it elsewhere, set FITNESS_API_URL in the
environment or in ~/.config/fitness/config (env wins):
mkdir -p ~/.config/fitness
echo 'FITNESS_API_URL=http://localhost:3000/api' > ~/.config/fitness/config
The fitness-log Claude Code skill (in ~/.claude/skills/) wraps this so plain requests
in a session log directly.
npm run db:migrate
This applies SQL files in fitness-api/drizzle/ to the database in DATABASE_URL.
npm run db:seed
If you want to normalize the recent trend data used by TDEE and unlock calculations, run:
npm run db:set-baseline --workspace fitness-api -- --days 30 --weight 205 --calories 2500
Notes:
DATABASE_URL from fitness-api/.envAPP_TIMEZONE unless you pass --end-date YYYY-MM-DDExample for a future reset once your scale is back:
npm run db:set-baseline --workspace fitness-api -- --days 30 --weight 198.4 --calories 2400
When changing the database shape:
fitness-api/src/db/schema.tsnpm run db:generate
fitness-api/drizzle/npm run db:migrate
fitness-api/src/app.tsfitness-api/src/app.test.tsImportant:
Primary backend files:
fitness-api/src/app.tsfitness-api/src/db/schema.tsfitness-api/src/lib/time.tsapi/route.tsWhen changing API behavior:
fitness-api/src/app.tsfitness-api/src/app.test.tsfitness-web/src/services/api.tsfitness-web/src/types.tsnpm run test
npm run build
Notes:
/api/route.ts is a thin Vercel adapter onlyvercel.json rewrites /api/:path* into that concrete Vercel function so nested API paths work in productionfitness-api/, not in api/Primary frontend files:
fitness-web/src/services/api.tsfitness-web/src/types.tsfitness-web/src/stores/*fitness-web/src/components/*When changing frontend behavior:
npm run build:web
Production uses:
DATABASE_URLAPP_TIMEZONE=America/ChicagoUsually you do not need:
CALORIE_UNLOCK_SCHEDULECALORIE_UNLOCK_FALLBACK_GOALGOAL_WEIGHTGMAIL_ALERT_ADDRESSGMAIL_ALERT_APP_PASSWORDVITE_API_BASE_URLCORS_ORIGINProduction uses same-origin /api and ignores VITE_API_BASE_URL on purpose. Keep that env var for local-only overrides.
mainfitness-web/distapi/Vercel project settings:
/Othernpm installnpm run build:webfitness-web/distPushing code is not enough if the DB changed. You also need to run:
DATABASE_URL=postgresql://... npm run db:migrate
against the deployed Neon database.
fitness-api/src/app.tsfitness-api/src/app.test.tsfitness-web/src/services/api.ts/api/healthDATABASE_URL exists in VercelUse this section as the fast-start brief for future agents:
fitness-web/fitness-server/; the Rust backend is goneapi/ and business logic in fitness-api/npm run buildfitness-api/.envDEPLOY.mdfitness-web/API.md