A cutting-edge full-stack nutrition analysis web application featuring AI-powered food recognition, 3D robotics-style interface, and comprehensive health tracking capabilities.
- Smart Food Recognition: Camera-based food identification using AI
- Nutritional Analysis: Detailed breakdown of macros, vitamins, and minerals
- Personalized Recommendations: AI-driven dietary suggestions
- Real-time Health Scoring: Dynamic nutrition quality assessment
- Three.js 3D Background: Immersive cyberpunk-style visual effects
- Animated Particles: Dynamic floating elements and energy waves
- Holographic UI Elements: Futuristic glass-morphism design
- Matrix Rain Effects: Digital code rain animations
- Real-time Charts: Interactive nutrition breakdowns with Chart.js
- Progress Tracking: Weekly and monthly health trends
- Goal Management: Customizable daily nutrition targets
- Activity Timeline: Comprehensive meal and exercise logging
- Responsive Design: Mobile-first approach with adaptive layouts
- Dark Theme: Eye-friendly cyberpunk color scheme
- Keyboard Shortcuts: Power-user navigation features
- Progressive Web App: Offline capabilities and app-like experience
- HTML5: Semantic markup and accessibility
- CSS3: Advanced animations and glass-morphism effects
- JavaScript (ES6+): Modern async/await patterns
- Three.js: 3D graphics and particle systems
- Chart.js: Interactive data visualizations
- Node.js: Runtime environment
- Express.js: Web application framework
- MongoDB: Document database (optional)
- Mongoose: MongoDB object modeling
- CORS: Cross-origin resource sharing
- dotenv: Environment configuration
- Nodemon: Auto-restart development server
- Concurrently: Run multiple commands simultaneously
- Live Server: Frontend development server
- Node.js 16.0.0 or higher
- npm or yarn package manager
- Modern web browser with ES6+ support
- Camera access (optional, for food scanning)
-
Clone the repository
git clone <repository-url> cd nutrition-analyzer-dashboard
-
Install dependencies
npm install
-
Configure environment (optional)
cp .env.example .env # Edit .env with your configuration -
Start the application
npm run dev
-
Open your browser
http://localhost:5000
Create a .env file in the root directory:
# Server Configuration
NODE_ENV=development
PORT=5000
# Database (optional - uses in-memory store if not provided)
MONGODB_URI=mongodb://localhost:27017/nutrition_analyzer
# Security
JWT_SECRET=your_jwt_secret_here
BCRYPT_ROUNDS=12
# API Keys (for future integrations)
OPENAI_API_KEY=your_openai_key_here
NUTRITIONIX_API_KEY=your_nutritionix_key_hereThe application works without MongoDB using an in-memory data store. For persistent data:
- Install MongoDB locally or use MongoDB Atlas
- Set MONGODB_URI in your
.envfile - Restart the application
- Dashboard: Overview of daily nutrition and progress
- Food Scanner: AI-powered camera food recognition
- Nutrition Analysis: Manual food search and detailed breakdowns
- Meal Planning: Future feature for meal preparation
- Health Trends: Long-term analytics and insights
- AI Recommendations: Personalized dietary advice
Ctrl+S: Save current dataCtrl+K: Focus search inputAlt+1: Navigate to DashboardAlt+2: Navigate to Food ScannerAlt+3: Navigate to Nutrition AnalysisCtrl+/: Show shortcuts help
- Click "Start Camera" in the Food Scanner section
- Position food item within the scanning frame
- Click "Capture" to take a photo
- Wait for AI analysis results
- Review nutritional breakdown and recommendations
- Add to daily log or save for later
GET /api/healthGET /api/user/nutrition-dataGET /api/foods/search?query=chickenGET /api/foods/:idPOST /api/analyze/food-image
Content-Type: application/json
{
"imageData": "data:image/jpeg;base64,..."
}POST /api/nutrition/log-food
Content-Type: application/json
{
"foodId": 1,
"servingSize": 150,
"mealType": "lunch"
}GET /api/ai/recommendationsnutrition-analyzer-dashboard/
โโโ frontend/ # Client-side application
โ โโโ index.html # Main HTML file
โ โโโ styles/ # CSS stylesheets
โ โ โโโ main.css # Core styles and variables
โ โ โโโ 3d-background.css # 3D effects and animations
โ โ โโโ dashboard.css # Dashboard-specific styles
โ โโโ js/ # JavaScript modules
โ โโโ main.js # Application orchestrator
โ โโโ dashboard.js # Dashboard functionality
โ โโโ 3d-background.js # 3D graphics and effects
โ โโโ food-scanner.js # Camera and AI analysis
โ โโโ nutrition-analyzer.js # Food search and analysis
โโโ backend/ # Server-side application
โ โโโ server.js # Express.js server
โโโ .github/ # GitHub configuration
โ โโโ copilot-instructions.md # AI assistant instructions
โโโ package.json # Node.js dependencies and scripts
โโโ .env.example # Environment variables template
โโโ README.md # Project documentation
npm start: Start production servernpm run dev: Start development server with hot reloadnpm run dev-server: Start backend onlynpm run dev-client: Start frontend onlynpm run build: Install dependencies (build step)
- Meal Planning AI: Automated meal plan generation
- Barcode Scanner: Product identification via UPC codes
- Social Features: Share meals and compete with friends
- Wearable Integration: Sync with fitness trackers
- Recipe Generator: AI-powered recipe creation
- Allergen Detection: Food allergy warnings
- Nutritionist Chat: AI nutritionist consultation
- PWA Support: Full offline functionality
- Voice Commands: Voice-controlled navigation
- AR Food Overlay: Augmented reality nutrition labels
- Machine Learning: Improved food recognition accuracy
- Multi-language: Internationalization support
- Data Export: CSV/PDF report generation
Camera not working:
- Ensure browser has camera permissions
- Check if camera is in use by another application
- Try using HTTPS (required for camera on some browsers)
3D effects not showing:
- Verify WebGL support in browser
- Update graphics drivers
- Disable hardware acceleration if issues persist
API errors:
- Check if server is running on port 5000
- Verify network connectivity
- Review browser console for error messages
For slower devices:
- Disable 3D background in preferences
- Use fewer particles in animations
- Enable reduced motion mode
For better accuracy:
- Use good lighting for food scanning
- Position food clearly in camera frame
- Take multiple photos for verification
We welcome contributions to NutriBot! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Follow coding standards
- Add tests for new features
- Submit a pull request
- Use ES6+ JavaScript features
- Follow CSS BEM methodology
- Write descriptive commit messages
- Document new functions and APIs
- Test on multiple browsers
This project is licensed under the MIT License - see the LICENSE file for details.
- Three.js community for 3D graphics inspiration
- Chart.js for beautiful data visualizations
- OpenAI for AI integration possibilities
- MongoDB for flexible data storage
- Express.js for robust backend framework
For support, email support@nutribot.com or join our Discord community.
Built with โค๏ธ by the NutriBot Team
Making nutrition analysis accessible, engaging, and intelligent for everyone.