"Eat more, sleep more, you'll be fine."
A wellness helper app that tracks your sleep, exercise, and nutrition, then recommends a full weekly meal plan that fits your goals and your grocery budget.
| Section | Route | Status |
|---|---|---|
| Eat More | /eat-more |
✅ Weekly plan generator with Groq LLM |
| Sleep More | /sleep-more |
Placeholder (mock data) |
| Exercise | /exercise |
Placeholder (mock data) |
| Layer | Technology |
|---|---|
| Frontend | Next.js 16 (App Router), TypeScript, Tailwind CSS v4 |
| Package manager | pnpm |
| Backend | Python, FastAPI |
| LLM | Groq (llama-3.1-8b-instant) |
| Deployment | Vercel (frontend) |
eamoslemo/
├── frontend/
│ ├── app/
│ │ ├── layout.tsx
│ │ ├── page.tsx ← Landing page
│ │ ├── eat-more/page.tsx ← Weekly plan generator
│ │ ├── sleep-more/page.tsx
│ │ └── exercise/page.tsx
│ ├── components/ ← Nav, RouteCard, WombatPlaceholder, ApiStatus
│ ├── lib/
│ │ ├── api.ts ← Base fetch helper
│ │ ├── eat-more-api.ts ← Eat More endpoint calls
│ │ └── mock-data/ ← Frontend mock data (sleep/exercise)
│ └── types/index.ts ← All shared TypeScript types
├── backend/
│ ├── main.py ← FastAPI app entry point
│ ├── requirements.txt
│ ├── .env.example ← Copy to .env
│ └── app/
│ ├── config.py ← Reads .env variables
│ ├── data/
│ │ ├── ingredients.json ← 46 ingredients with prices
│ │ └── dish_catalog.json ← 30 dishes across 5 cuisines
│ ├── schemas/
│ │ └── eat_more.py ← Pydantic request/response models
│ ├── services/
│ │ ├── pricing_service.py ← Cost calculations (no LLM)
│ │ ├── catalog_service.py ← Filtering + deterministic scoring
│ │ ├── llm_service.py ← Groq ranking call + fallback
│ │ └── recommendation_service.py← Orchestration
│ └── routes/
│ ├── health.py ← GET /health
│ ├── mock.py ← GET /mock/health-data
│ └── eat_more.py ← POST /eat-more/recommendations, GET /eat-more/dish/{id}
├── .editorconfig
├── .env.example ← Root env reference
├── .gitignore
└── README.md
- Node.js >= 18
- pnpm —
npm install -g pnpm - Python >= 3.10
- Groq API key — free at console.groq.com
- Go to console.groq.com and sign up (free)
- Create an API key
- Copy it — you'll paste it into
backend/.envbelow
cd backend
cp .env.example .env # then edit .env and paste your GROQ_API_KEY
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadcd backend
Copy-Item .env.example .env # then edit .env and paste your GROQ_API_KEY
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
uvicorn main:app --reloadBackend runs at http://localhost:8000
Interactive API docs: http://localhost:8000/docs
cd frontend
cp .env.local.example .env.local
pnpm install
pnpm devcd frontend
Copy-Item .env.local.example .env.local
pnpm install
pnpm devFrontend runs at http://localhost:3000
Open two terminal tabs and run the backend in one and the frontend in the other. The landing page will show a green API Connected dot when both are up.
| Method | Path | Description |
|---|---|---|
| GET | / |
Ping |
| GET | /health |
Service health check |
| GET | /mock/health-data |
Mocked Apple Health metrics |
| POST | /eat-more/recommendations |
Generate weekly dish plan |
| GET | /eat-more/dish/{id} |
Ingredient-level cost breakdown |
{
"weekly_budget": 80,
"cuisine": "japanese",
"mode": "bulk",
"exclude_dish_ids": []
}cuisine—nullor omit for all cuisinesmode—"cut"|"maintain"|"bulk"exclude_dish_ids— IDs already shown (used for "Gimme More Options")
User request
│
▼
1. Filter catalog by cuisine + mode + excluded IDs
│
▼
2. Score candidates (affordability 40%, protein 30%, calories 30%)
│
▼
3. Take top N (LLM_CANDIDATE_POOL_SIZE, default 40) → send to Groq
│
▼
4. Groq ranks and adds a one-line reason per dish
│ ← if Groq fails, fallback to step-2 order
▼
5. Return top 20 dishes with cost + reason
The LLM never does math. All price calculations happen in pricing_service.py.
If the LLM fails, the backend still returns usable results.
| Variable | Default | Description |
|---|---|---|
GROQ_API_KEY |
— | Your Groq API key (required) |
GROQ_MODEL |
llama-3.1-8b-instant |
Groq model to use |
FRONTEND_ORIGIN |
http://localhost:3000 |
CORS allowed origin |
WEEKLY_RECOMMENDATION_COUNT |
20 |
Dishes per plan |
LLM_CANDIDATE_POOL_SIZE |
40 |
Candidates sent to Groq |
| Variable | Default | Description |
|---|---|---|
NEXT_PUBLIC_API_BASE_URL |
http://localhost:8000 |
Backend base URL |
The dish catalog and ingredient pricing live in backend/app/data/:
ingredients.json— 46 ingredients with price per packdish_catalog.json— 30 dishes across Japanese, Indian, Mediterranean, Mexican, and American cuisines
Frontend mock data (for Sleep and Exercise pages) lives in
frontend/lib/mock-data/index.ts.
- No auth, no database — keep it simple
- Wombat mascot is stubbed in
frontend/components/WombatPlaceholder.tsx - Sleep/Exercise scores are hardcoded — wire up real logic when ready
- 3D/globe feature can be added later without refactor (no heavy 3D libs installed)
- Calorie-health integration (linking Exercise data to Eat More) is a future task
| Dev | Ownership |
|---|---|
| Dev 1 | /eat-more refinements, dish catalog expansion, budget logic |
| Dev 2 | /sleep-more + /exercise — real score logic, health data |
| Dev 3 | Backend API, new endpoints, data models, Groq prompt tuning |