Track your calories and fitness progress
AI summary · README
HealthTypeScript · VueGitHub @mrwatts88OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
• 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:Read the full 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