How thedoc004/flops works
Flops is a nutrition and fitness tracking application with meal planning and logging, nutrition analysis, workout tracking, and coaching. The principal user workflow is to sign in, record or build a meal, and review its nutrition and adherence alongside training and progress. The client routes users to distinct product areas; shared API modules and server routes represent the backend boundary. The README is empty and source excerpts are partial, so backend wiring beyond the shown authentication, AI, and MCP code is intentionally limited.
Main entry points: App.jsx Application router · api Client API modules · routes HTTP route handlers · auth Sign-in and onboarding
Components 27
Access and navigation
- Application router
client/src/app/App.jsx - Sign-in and onboarding
client/src/features/auth
Nutrition and progress
- Daily dashboard
client/src/features/dashboard - Meal builder
client/src/features/meal-builder - Meal logging
client/src/features/meal-logging - AI meal logger
client/src/features/ai-macro-logger - Recipes and ingredients
client/src/features/recipes - Ingredient library
client/src/features/ingredients - Barcode lookup
client/src/features/barcode - Nutrition label scan
client/src/features/label-ocr - Goals and adherence
client/src/features/goals - History and reports
client/src/features/history - Supplement tracking
client/src/features/supplements
Training and coaching
- Workout tracking
client/src/features/training-workouts - Coach workspace
client/src/features/coach
Backend services
- Client API modules
client/src/shared/api - HTTP route handlers
server/routes - Authentication service
server/authService.js - Meal estimate service
server/aiMacroService.js - AI provider client
server/aiClient.js - MCP interface
server/mcp/createMcpRouter.js - MCP tools
server/mcp/createMcpServer.js - Application database
server/db.js
Other components
- User
- AI provider
- NIH DSLD
- Open Food Facts
Connections 31
- User → Application router: uses
- Application router → Sign-in and onboarding: routes unauthenticated
- Application router → Daily dashboard: routes
- Application router → Meal builder: routes
- Application router → Meal logging: routes
- Application router → AI meal logger: routes
- Application router → Recipes and ingredients: routes
- Application router → Ingredient library: routes
- Application router → Barcode lookup: routes
- Application router → Nutrition label scan: routes
- Application router → Goals and adherence: routes
- Application router → History and reports: routes
- Application router → Supplement tracking: routes
- Application router → Workout tracking: routes
- Application router → Coach workspace: routes
- Sign-in and onboarding → Client API modules: uses
- Meal builder → Client API modules: uses
- Meal logging → Client API modules: uses
- AI meal logger → Client API modules: uses
- Daily dashboard → Client API modules: uses
- Workout tracking → Client API modules: uses
- Coach workspace → Client API modules: uses
- Client API modules → HTTP route handlers: requests
- HTTP route handlers → Authentication service: calls
- Authentication service → Application database: reads and writes
- HTTP route handlers → Meal estimate service: dispatches estimates
- Meal estimate service → AI provider client: requests completion
- AI provider client → AI provider: calls
- MCP interface → MCP tools: creates server
- User → NIH DSLD: supplement lookup
- Barcode lookup → Open Food Facts: product lookup