A macro tracker and meal planner with an 80s arcade look. Put in your stats and goal, it calculates your calorie and macro targets, builds a 3-day meal plan to hit them, and lets you log what you actually ate.
I'm a personal trainer. I built this because my clients kept asking the same two questions: how much should I eat, and what should I eat.
Live demo: https://retro-macros.onrender.com (click "Explore the demo", no account needed)
- Macro calculator. Choose a BMR formula (Mifflin-St Jeor, Harris-Benedict, or Katch-McArdle), then it adjusts for activity and goal. Macro sliders have to add up to 100%.
- Meal plans. 3 days of meals with macros per meal that add up to your daily targets. Generated by the Claude API, or by a built-in generator so the demo doesn't cost money.
- Grocery list. Combines ingredients across the plan into amounts you'd actually buy.
- Food log. Type what you ate in plain English and it estimates the macros. If parsing fails, a rule-based fallback takes over.
- Swaps. Swap an ingredient or a whole meal. It remembers what you keep.
- Admin dashboard. User stats and a per-user view.
Java 17, Spring Boot 3.3, Spring Security, Google OAuth 2.0, Spring Data JPA / Hibernate, PostgreSQL, Thymeleaf, Bootstrap 5, Claude API, Maven, Render
- Google sign-in only. No passwords stored. Spring Security handles the OAuth 2.0 flow.
- Locked down by default. Only the home, about, and login pages are public. Everything else requires login.
- Admin role check. Admin pages return a 403 for non-admins.
- No secrets in code. Keys and credentials come from environment variables.
- Demo account. It logs in through the same OAuth path as a real user, so there's no special-case code. It resets every time someone uses it.
Requires Java 17 and Maven.
git clone https://github.com/TMGan/RetroMacros.git
cd RetroMacros
mvn spring-boot:run -Dspring-boot.run.arguments="--ai.mock=true --demo.enabled=true"Open http://localhost:8080. Uses an in-memory database, no setup needed.
- JUnit and Mockito tests
- Move admin checks into
SecurityConfigrole rules