Skip to content

Aryan9901/Nutripick

Repository files navigation

🥗 NutriPick - Smart Food Health Analysis Platform

Make informed dietary choices with AI-powered food analysis, restaurant health scoring, and personalized recommendations.

Status Version License


🌟 Features

🍽️ Restaurant Health Scoring

  • Browse healthy restaurants near you
  • View detailed menu analysis
  • Get health scores for each dish
  • Find restaurants serving specific dishes

🏢 Canteen Management

  • Track daily meal offerings
  • Analyze nutritional quality
  • Get improvement recommendations
  • View statistics and trends

📸 AI Food Analysis

  • Upload food images for instant analysis
  • Get detailed nutritional information
  • Understand health benefits and risks
  • Receive personalized recommendations

📦 Product Scanner

  • Scan barcodes for product info
  • View ingredients and nutritional facts
  • Get health scores
  • Find healthier alternatives

🔍 Smart Search

  • Find dishes by health conditions
  • Search restaurants by dietary needs
  • Cross-feature discovery
  • Location-based results

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB 5.0+
  • npm or yarn

Installation

# 1. Clone the repository
git clone <repository-url>
cd nutripick

# 2. Install dependencies
cd server && npm install
cd ../frontend && npm install

# 3. Configure environment variables
# Copy .env.example to .env in both server and frontend folders
# Update with your MongoDB URL and Groq API key

# 4. Initialize database
cd server
npm run db:generate
npm run db:push

# 5. Start the application
# Terminal 1 - Backend
cd server && npm run dev

# Terminal 2 - Frontend
cd frontend && npm run dev

Access the Application


📁 Project Structure

nutripick/
├── server/              # Backend (Node.js + Express + MongoDB)
│   ├── controllers/     # Business logic
│   ├── routes/          # API routes
│   ├── prisma/          # Database schema
│   └── index.js         # Server entry point
│
├── frontend/            # Frontend (Next.js + TypeScript)
│   ├── app/             # Pages
│   ├── components/      # React components
│   ├── lib/             # Utilities
│   └── types/           # TypeScript types
│
└── docs/                # Documentation

🎨 Tech Stack

Backend

  • Runtime: Node.js 18+
  • Framework: Express.js
  • Database: MongoDB with Prisma ORM
  • AI: Groq AI for food analysis
  • File Upload: Multer

Frontend

  • Framework: Next.js 15
  • Language: TypeScript
  • Styling: Tailwind CSS
  • UI Components: shadcn/ui
  • HTTP Client: Axios

📊 API Endpoints

Food Analysis

POST   /api/food/analyze          # Analyze food image
GET    /api/food/analyses         # Get all analyses
GET    /api/food/analyses/:id     # Get specific analysis
GET    /api/food/search           # Search analyses

Eateries

POST   /api/eateries              # Create eatery
GET    /api/eateries              # Get all eateries
GET    /api/eateries/:id          # Get eatery details
PUT    /api/eateries/:id          # Update eatery
DELETE /api/eateries/:id          # Delete eatery
GET    /api/eateries/search       # Search eateries

Canteen

POST   /api/canteen/analyze       # Analyze meal image
GET    /api/canteen/meals         # Get all meals
GET    /api/canteen/stats         # Get statistics

Products

POST   /api/products/scan         # Scan barcode
GET    /api/products/:id          # Get product details
GET    /api/products/search       # Search products

Total: 43 API endpoints

See API_TESTING_GUIDE.md for detailed documentation.


🎯 Key Features

✨ Bento Grid Showcase

The homepage features a beautiful, dynamic bento grid that showcases:

  • Top Restaurants - Highest-rated healthy eateries
  • Canteen Meals - Today's meal offerings
  • Food Analyses - Recent AI-powered insights
  • Products - Scanned packaged products

Smart Behavior: The showcase section only appears when data exists, preventing empty states.

🔗 Cross-Feature Integration

All features are interconnected through the database:

  • Food analyses link to menu items and canteen meals
  • Restaurants display health scores from menu analysis
  • Search across all features simultaneously
  • Recommendations based on stored data

🎨 Beautiful UI/UX

  • Responsive design (mobile, tablet, desktop)
  • Dark mode support
  • Smooth animations and transitions
  • Loading states and error handling
  • Accessibility compliant

📚 Documentation

Comprehensive documentation is available:


🧪 Testing

Run Tests

# Backend tests
cd server
npm test

# Frontend tests
cd frontend
npm test

Manual Testing

Follow the comprehensive testing guide in TESTING_GUIDE.md.


🚀 Deployment

Environment Variables

Backend (.env):

DATABASE_URL="mongodb://localhost:27017/nutripick"
GROQ_API_KEY="your_groq_api_key"
PORT=4000
NODE_ENV=production

Frontend (.env):

NEXT_PUBLIC_API_URL=http://localhost:4000/api

Build for Production

# Backend
cd server
npm run db:generate
npm start

# Frontend
cd frontend
npm run build
npm start

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Groq AI - For powerful food analysis capabilities
  • MongoDB - For flexible data storage
  • Next.js - For amazing React framework
  • shadcn/ui - For beautiful UI components
  • Tailwind CSS - For utility-first styling

📞 Support

For issues, questions, or suggestions:

  1. Check the documentation
  2. Review SETUP_GUIDE.md for installation help
  3. Check CURRENT_STATUS.md for known issues
  4. Open an issue on GitHub

🎉 Status

Current Version: 2.0.0
Status: ✅ Production Ready
Last Updated: May 18, 2026

What's New in v2.0

  • ✅ Complete MongoDB integration
  • ✅ 43 RESTful API endpoints
  • ✅ Beautiful bento grid showcase
  • ✅ Dynamic data-driven homepage
  • ✅ Cross-feature data linking
  • ✅ Comprehensive documentation
  • ✅ Production-ready code

🔮 Roadmap

Phase 1: User Accounts (Planned)

  • User registration and authentication
  • Personal preferences and history
  • Favorites and saved items

Phase 2: Advanced Features (Planned)

  • Meal planning
  • Nutrition tracking
  • Social features
  • Advanced ML recommendations

Phase 3: Mobile App (Planned)

  • React Native mobile app
  • Native camera integration
  • Offline mode

Made with ❤️ for healthier eating choices


📸 Screenshots

Homepage with Bento Grid

Homepage

Food Analysis

Food Analysis

Restaurant Details

Restaurant

Canteen Dashboard

Canteen


Start making healthier food choices today with NutriPick! 🥗✨

Releases

Packages

Used by

Contributors

Languages