A full-stack nutrition & wellness platform — track meals, manage plans, discover recipes, and reach your health goals.
| Area | What's Included |
|---|---|
| 🔐 Auth | JWT-based register / login / logout with secure HTTP cookies |
| 📊 Dashboard | Macro overview, calorie progress, and daily summary cards |
| 🍽️ Food Tracker | Log meals per day, search foods, track macros (protein, carbs, fat) |
| 📅 Meal Plans | Create, assign, and follow structured weekly meal plans |
| 🧑🍳 Recipes | Browse, create, and save community recipes with full nutrition info |
| 👤 Profile | Personal stats, goals, and preferences management |
| 🌙 Dark Mode | Full light/dark theme with system preference detection |
| 🌍 i18n Ready | Multi-language context built in |
| 📱 PWA | Installable as a Progressive Web App |
Expert-Review-Hub/
├── backend/ # Node.js + Express REST API
│ ├── api/ # Vercel serverless entry (index.ts)
│ ├── src/
│ │ ├── app.ts # Express app setup (CORS, logging, routes)
│ │ ├── index.ts # Server entry + graceful shutdown
│ │ ├── config/ # Centralized env config & validation
│ │ ├── controllers/ # Route handlers (auth, dashboard, foods, …)
│ │ ├── db/
│ │ │ ├── schema/ # Drizzle ORM schemas (users, foods, tracker, …)
│ │ │ ├── seeds/ # Seed scripts for development data
│ │ │ └── index.ts # DB connection pool
│ │ ├── errors/ # Typed error classes
│ │ ├── lib/ # Logger (Pino) & shared utilities
│ │ ├── middleware/ # Auth guard, error handler
│ │ ├── models/ # Data-shape types / DTOs
│ │ ├── routes/ # Route definitions (auth, foods, tracker, …)
│ │ ├── services/ # Base service + repository pattern
│ │ ├── types/ # Global TypeScript types
│ │ ├── utils/ # Helpers (hashing, JWT, …)
│ │ ├── validators/ # Zod request validators
│ │ └── openapi.yaml # OpenAPI 3.1 spec (auto-generated)
│ ├── drizzle.config.ts # Drizzle Kit configuration
│ ├── tsconfig.json
│ └── package.json
│
├── frontend/ # React 19 + Vite SPA
│ ├── src/
│ │ ├── App.tsx # Root router (Wouter)
│ │ ├── components/ # Shadcn/UI + custom components
│ │ ├── constants/ # API endpoints, query keys
│ │ ├── contexts/ # Theme, language, notifications
│ │ ├── hooks/ # useAuth, useQuery wrappers
│ │ ├── lib/ # Axios client, cn utility
│ │ ├── pages/ # Home, Dashboard, Tracker, MealPlans, Recipes, …
│ │ ├── types/ # Shared API response types
│ │ └── utils/ # Date helpers, formatters
│ ├── vite.config.ts
│ ├── tsconfig.json
│ └── package.json
│
├── docs/ # Project documentation
├── vercel.json # Vercel monorepo deployment config
├── .gitignore
└── README.md
| Technology | Purpose |
|---|---|
| Node.js + Express 5 | HTTP server & routing |
| TypeScript 5.9 | Type safety |
| Drizzle ORM | Type-safe PostgreSQL queries & migrations |
| PostgreSQL | Primary database |
| Pino | Structured JSON logging |
| Zod | Runtime schema & request validation |
| JWT + bcryptjs | Authentication & password hashing |
| OpenAPI / Orval | API spec & auto-generated client types |
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Vite 7 | Dev server & bundler |
| Tailwind CSS v4 | Utility-first styling |
| Shadcn/UI + Radix UI | Accessible component primitives |
| Wouter | Lightweight client-side router |
| TanStack Query v5 | Server state management & caching |
| Framer Motion | Animations & transitions |
| Recharts | Dashboard charts |
| React Hook Form + Zod | Forms & validation |
| Axios | HTTP client |
Prerequisites: Node.js ≥ 18, PostgreSQL running locally
git clone https://github.com/Mostafa-SAID7/Expert-Review-Hub.git
cd Expert-Review-Hubcd backend
npm install
# Copy env template
cp .env.example .env
# Edit .env and set your DATABASE_URL and JWT_SECRET
# Push schema to your database
npx drizzle-kit push
# Start dev server
npm run dev✅ API running at http://localhost:3000
cd ../frontend
npm install
# Create frontend env
echo "VITE_API_URL=http://localhost:3000" > .env
npm run dev✅ App running at http://localhost:5173
npm run dev # Start development server with hot-reload (tsx watch)
npm run build # Compile TypeScript → dist/
npm run start # Run production build
npm run typecheck # Run tsc type-check (no emit)npm run dev # Vite development server
npm run build # Production bundle
npm run preview # Preview production build locally
npm run typecheck # Run tsc type-check (no emit)npx drizzle-kit generate # Generate SQL migration files
npx drizzle-kit push # Push schema directly to DB (dev)
npx drizzle-kit migrate # Run migrations
npx drizzle-kit studio # Open Drizzle Studio (visual DB browser)| Method | Endpoint | Auth | Description |
|---|---|---|---|
POST |
/api/auth/register |
❌ | Create account |
POST |
/api/auth/login |
❌ | Sign in |
POST |
/api/auth/logout |
✅ | Sign out |
GET |
/api/dashboard |
✅ | Dashboard summary |
GET/POST |
/api/tracker |
✅ | Food log entries |
GET/POST |
/api/plans |
✅ | Meal plans |
GET/POST |
/api/recipes |
✅ | Recipes |
GET/POST |
/api/foods |
✅ | Food database |
GET/PUT |
/api/profile |
✅ | User profile |
GET |
/api/health |
❌ | Health check |
See 📖 API Reference for full request/response schemas.
The project is configured for Vercel monorepo deployment via vercel.json:
- Frontend → Vite static build
- Backend → Serverless function via
backend/api/index.ts - All
/api/*traffic is routed to the backend service
# Deploy with Vercel CLI
npx vercel --prodSee 📖 Deployment Guide for full instructions.
| Document | Description |
|---|---|
| SETUP.md | Detailed local dev setup & troubleshooting |
| API.md | Full REST API reference |
| ARCHITECTURE.md | System design & data models |
| DEPLOYMENT.md | Deployment to Vercel & other platforms |
Contributions are welcome! Please read CONTRIBUTING.md and follow the Code of Conduct.
- Fork the repo
- Create a feature branch:
git checkout -b feat/your-feature - Commit changes:
git commit -m "feat: add your feature" - Push:
git push origin feat/your-feature - Open a Pull Request
This project is licensed under the MIT License — see LICENSE for details.
Built with ❤️ by Mostafa SAID