Web app to log food (voice → OpenRouter → CalorieNinjas) and calories burned, track remaining kcal vs a maintenance goal from Mifflin–St Jeor + activity. Stack: React (Vite), Firebase (anonymous auth + Firestore), GitHub Pages.
- Clone and
npm install. - Copy
.env.example→.envand fill Firebase web app config (VITE_FIREBASE_*). Optional:VITE_OPENROUTER_API_KEYandVITE_CALORIENINJAS_API_KEYto skip the in-app key step. - In Firebase Console: enable Anonymous sign-in; create Firestore database.
- Deploy Firestore rules from
firestore.rules(Console → Firestore → Rules).
npm run devnpm run buildOutput in dist/. The build copies index.html to 404.html for GitHub Pages SPA routing.
For a project site (username.github.io/repo/), set VITE_BASE=/repo/ when building (and matching base in vite.config.ts via env).
Workflow .github/workflows/pages.yml builds and deploys. Configure repository Settings → Pages to use GitHub Actions. Add repository secrets for Firebase (and optional API keys). Optional variable VITE_BASE for project pages.
API keys in the client bundle are visible to anyone who loads the site. Suitable for a private prototype; use a backend proxy for production.
Private / use at your own risk. Not medical advice.