Meal Tracker v1 - complete

This commit is contained in:
Otto
2026-03-30 13:34:53 -04:00
commit 139f756807
21 changed files with 938 additions and 0 deletions

82
README.md Normal file
View File

@@ -0,0 +1,82 @@
# Meal Tracker
A personal food and drink logging application for accountability and macro tracking.
## Project Structure
```
meal-tracker/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ └── utils/ # Helper functions & API client
│ ├── public/ # Static assets
│ ├── package.json # Client dependencies
│ └── vite.config.js # Vite configuration
├── server/ # Express backend
│ ├── routes/ # API route handlers
│ ├── models/ # Database models
│ ├── middleware/ # Express middleware
│ ├── index.js # Server entry point
│ └── package.json # Server dependencies
├── uploads/ # Image uploads (food photos)
├── data/ # SQLite database
├── docker-compose.yaml # Docker setup (optional)
└── README.md
```
## Features
### v1 (MVP)
- Manual food entry (name, description, image)
- Image upload support
- Notes field for accountability
- Daily view of entries
### v2
- Food search with macro lookup (OpenFoodFacts API)
- Auto-populate macros from search results
- Manual macro entry override
### v3
- Daily/weekly summary views
- Macro totals (protein, carbs, fat, calories)
- Charts and trends
## Tech Stack
- **Frontend:** React, Vite, Tailwind CSS
- **Backend:** Node.js, Express
- **Database:** SQLite (local)
- **Image Storage:** Local filesystem
- **Food API:** OpenFoodFacts (free, no key required)
## API Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/entries | Get all entries |
| POST | /api/entries | Create new entry |
| GET | /api/entries/:id | Get single entry |
| DELETE | /api/entries/:id | Delete entry |
| GET | /api/foods/search | Search food database |
| GET | /api/summary/daily | Get daily summary |
## Running Locally
```bash
# Install dependencies
cd client && npm install
cd ../server && npm install
# Start backend
cd server && npm start
# Start frontend (separate terminal)
cd client && npm run dev
```
## Environment Variables
See `.env.example` for required configuration.