Update README with full feature documentation

This commit is contained in:
Otto
2026-03-30 21:45:20 -04:00
parent e60aaa111a
commit b031001403

View File

@@ -8,48 +8,49 @@ A personal food and drink logging application for accountability and macro track
meal-tracker/ meal-tracker/
├── client/ # React frontend ├── client/ # React frontend
│ ├── src/ │ ├── src/
│ │ ├── components/ # Reusable UI components │ │ ├── components/ # Reusable UI components (Layout)
│ │ ├── pages/ # Page components │ │ ├── pages/ # Page components (Daily, AddEntry, EntryDetail, etc.)
│ │ ── utils/ # Helper functions & API client │ │ ── api.js # API client
│ │ └── App.jsx # Main app with routing
│ ├── public/ # Static assets │ ├── public/ # Static assets
│ ├── package.json # Client dependencies │ ├── package.json # Client dependencies
│ └── vite.config.js # Vite configuration │ └── vite.config.js # Vite configuration
├── server/ # Express backend ├── server/ # Express backend
│ ├── routes/ # API route handlers │ ├── routes/ # API route handlers
│ ├── models/ # Database models │ ├── models/ # Database models
│ ├── middleware/ # Express middleware
│ ├── index.js # Server entry point │ ├── index.js # Server entry point
│ └── package.json # Server dependencies │ └── package.json # Server dependencies
├── uploads/ # Image uploads (food photos) ├── uploads/ # Image uploads (food photos)
├── data/ # SQLite database ├── data/ # SQLite database
├── docker-compose.yaml # Docker setup (optional)
└── README.md └── README.md
``` ```
## Features ## Features
### v1 (MVP) ### Current Version
- Manual food entry (name, description, image) - Manual food entry (name, description, macros)
- Image upload support - Daily view of entries with date picker
- Notes field for accountability - Macro tracking (calories, protein, carbs, fat)
- Daily view of entries - Meal time tags (Breakfast, Lunch, Dinner, Snack)
- Favorites system
- User authentication (login/register)
- Admin panel (view users, reset passwords)
- Dark/Light mode toggle
- PWA support (installable)
- Entry detail view with favorites toggle
### v2 ### Planned
- Food search with macro lookup (OpenFoodFacts API) - Weekly summary charts
- Auto-populate macros from search results - Leaderboard
- Manual macro entry override - Goals tracking
- Streak tracking
### v3 - Photo gallery
- Daily/weekly summary views
- Macro totals (protein, carbs, fat, calories)
- Charts and trends
## Tech Stack ## Tech Stack
- **Frontend:** React, Vite, Tailwind CSS - **Frontend:** React, Vite, Tailwind CSS
- **Backend:** Node.js, Express - **Backend:** Node.js, Express
- **Database:** SQLite (local) - **Database:** SQLite (local)
- **Image Storage:** Local filesystem
- **Food API:** OpenFoodFacts (free, no key required) - **Food API:** OpenFoodFacts (free, no key required)
## API Endpoints ## API Endpoints
@@ -60,8 +61,22 @@ meal-tracker/
| POST | /api/entries | Create new entry | | POST | /api/entries | Create new entry |
| GET | /api/entries/:id | Get single entry | | GET | /api/entries/:id | Get single entry |
| DELETE | /api/entries/:id | Delete entry | | DELETE | /api/entries/:id | Delete entry |
| POST | /api/entries/:id/favorite | Toggle favorite |
| GET | /api/favorites | Get favorite entries |
| GET | /api/foods/search | Search food database | | GET | /api/foods/search | Search food database |
| GET | /api/summary/daily | Get daily summary | | GET | /api/summary/daily | Get daily summary |
| GET | /api/goals | Get user goals |
| GET | /api/streak | Get streak info |
| POST | /api/auth/login | User login |
| POST | /api/auth/register | User registration |
| GET | /api/auth/me | Get current user |
| GET | /api/admin/users | Get all users (admin) |
| POST | /api/admin/users/:id/reset-password | Reset user password |
## Default Users
- **Admin:** admin / admin123
- **User:** rob / meal123
## Running Locally ## Running Locally
@@ -77,6 +92,21 @@ cd server && npm start
cd client && npm run dev cd client && npm run dev
``` ```
## Deployment
### Server (VM at 10.10.10.143)
```bash
cd server
node index.js
```
### Build Frontend
```bash
cd client
npm run build
# Deploy dist/* to server public folder
```
## Environment Variables ## Environment Variables
See `.env.example` for required configuration. Server runs on port 3000 by default. No additional environment variables required for local setup.