A modern, AI-inspired calorie and protein tracking application built with CoffeeScript frontend (Backbone.js) and Ruby on Rails JSON API backend.
- 🤖 AI-Inspired Design: Modern interface with neon colors and futuristic styling
- 🌓 Dark/Light Mode: Toggle between dark and light themes
- 📊 Progress Tracking: Visual progress circles with color-coded status
- 🍽️ Meal Categories: Track breakfast, lunch, dinner, pre/post-workout, and snacks
- 🎯 Goal Setting: Set and track daily calorie and protein goals
- 📱 Responsive Design: Works on desktop and mobile devices
- 🔒 Authentication: Secure user registration and login system
- 🔴 Red (0-50%): Too far from goal - needs attention
- 🟡 Yellow (51-80%): Getting closer to goal
- 🟢 Green (81-100%): Goal achieved!
- 💙 Blue Neon (>100%): Goal exceeded with animated glow effect
- Ruby on Rails 7.1+ (API mode)
- SQLite3 database
- JWT authentication
- CORS enabled for frontend
- CoffeeScript compiled to JavaScript
- Backbone.js for MVC structure
- Modern CSS with CSS Grid and Flexbox
- Neon color scheme with AI-inspired design
- Font Awesome icons
- Google Fonts (Inter + JetBrains Mono)
-
Install Dependencies
bundle install npm install -g coffeescript
-
Database Setup
rails db:migrate rails db:seed
-
Compile CoffeeScript
coffee -c -o public/js app/coffeescript/app.coffee
-
Start Server
rails server
-
Access Application Open http://localhost:3000 in your browser
Use the following credentials to test the application:
- Email:
test@example.com - Password:
password123
POST /api/v1/login- User loginPOST /api/v1/users- User registration
GET /api/v1/goals- Get user goalsPOST /api/v1/goals- Create/update goals
GET /api/v1/food_logs?date=YYYY-MM-DD- Get food logs for datePOST /api/v1/food_logs- Create food log entryDELETE /api/v1/food_logs/:id- Delete food log entry
The main application logic is in app/coffeescript/app.coffee. To make changes:
- Edit the CoffeeScript file
- Recompile:
coffee -c -o public/js app/coffeescript/app.coffee - Refresh browser
To add new meal categories, update:
FoodLog::MEAL_TYPESinapp/models/food_log.rb- Add corresponding HTML section in
public/index.html - Update CoffeeScript meal types array
The application follows an AI-inspired design with:
- Neon accent colors for interactive elements
- Dark theme by default with smooth transitions
- Futuristic typography using Inter and JetBrains Mono
- Glowing effects for exceeded goals
- Smooth animations and hover effects
- Card-based layout with soft shadows and blur effects
- Chrome 70+
- Firefox 65+
- Safari 12+
- Edge 79+
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is available as open source under the terms of the MIT License.