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/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ── utils/ # Helper functions & API client
│ │ ├── components/ # Reusable UI components (Layout)
│ │ ├── pages/ # Page components (Daily, AddEntry, EntryDetail, etc.)
│ │ ── api.js # API client
│ │ └── App.jsx # Main app with routing
│ ├── 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
### Current Version
- Manual food entry (name, description, macros)
- Daily view of entries with date picker
- Macro tracking (calories, protein, carbs, fat)
- 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
- 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
### Planned
- Weekly summary charts
- Leaderboard
- Goals tracking
- Streak tracking
- Photo gallery
## 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
@@ -60,8 +61,22 @@ meal-tracker/
| POST | /api/entries | Create new entry |
| GET | /api/entries/:id | Get single 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/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
@@ -77,6 +92,21 @@ cd server && npm start
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
See `.env.example` for required configuration.
Server runs on port 3000 by default. No additional environment variables required for local setup.