How ayyappa-1085/daily_tracker works
FocusDay is a React productivity and habit-tracking app backed by an Express API and MongoDB. Users sign in, manage daily tasks and measurable habits, log meals and weight, review analytics, and ask an AI coach grounded in their records. The API enforces user isolation and planning rules; task updates also synchronize study and DSA habit records. Client-side caching and queued mutations support responsive updates. Some client-to-API wiring and unsampled routes are not visible in the excerpts, so those links are omitted or marked unverified.
Main entry points: App.jsx App shell · server.js Express API · coach.js Coach service · analytics.js Analytics
Components 25
Client experience
- App shell
client/src/App.jsx - Today tasks
client/src/components/Today.jsx - Habit tracking
client/src/components/Habits.jsx - Meal logging
client/src/components/Meals.jsx - Analytics view
client/src/components/Analytics.jsx - Coach chat
client/src/components/Coach.jsx - Local cache
client/src/utils/cache.js - Mutation queue
client/src/utils/mutationQueue.js
API workflows
- Express API
server/server.js - Authentication
server/routes/auth.js - Task workflow
server/routes/tasks.js - Habit workflow
server/routes/habits.js - Meal workflow
server/routes/meals.js - Analytics
server/routes/analytics.js - Weight logging
server/routes/weight.js - Coach service
server/routes/coach.js - Task-habit sync
server/utils/taskHabits.js
MongoDB records
- User records
server/models/User.js - Task records
server/models/Task.js - Habit definitions
server/models/Habit.js - Habit records
server/models/HabitRecord.js - Meal records
server/models/MealRecord.js - Weight records
server/models/WeightRecord.js
Other components
- App user
- Gemini AI
Connections 35
- App user → App shell: uses
- App shell → Today tasks: renders
client/src/App.jsx - App shell → Habit tracking: renders
client/src/App.jsx - App shell → Meal logging: renders
client/src/App.jsx - App shell → Analytics view: renders
client/src/App.jsx - App shell → Coach chat: renders
client/src/App.jsx - App shell → Local cache: reads and writes
client/src/App.jsx - App shell → Mutation queue: queues changes
client/src/App.jsx - App shell → Express API: calls API
- Express API → Authentication: mounts
server/server.js - Express API → Task workflow: mounts
server/server.js - Express API → Habit workflow: mounts
server/server.js - Express API → Analytics: mounts
server/server.js - Express API → Meal workflow: mounts
server/server.js - Express API → Weight logging: mounts
server/server.js - Express API → Coach service: mounts
server/server.js - Authentication → User records: creates and reads
server/routes/auth.js - Task workflow → Task records: reads and writes
server/routes/tasks.js - Task workflow → Task-habit sync: synchronizes
server/routes/tasks.js - Task-habit sync → Task records: reads tasks
server/utils/taskHabits.js - Task-habit sync → Habit definitions: ensures defaults
server/utils/taskHabits.js - Task-habit sync → Habit records: updates records
server/utils/taskHabits.js - Habit workflow → Habit definitions: uses
server/routes/habits.js - Habit workflow → Habit records: uses
server/routes/habits.js - Meal workflow → Meal records: uses
server/routes/meals.js - Analytics → Task records: reads
server/routes/analytics.js - Analytics → Habit definitions: reads
server/routes/analytics.js - Analytics → Habit records: reads
server/routes/analytics.js - Weight logging → Weight records: uses
server/routes/weight.js - Coach service → Task records: reads
server/routes/coach.js - Coach service → Habit definitions: reads
server/routes/coach.js - Coach service → Habit records: reads
server/routes/coach.js - Coach service → Meal records: reads
server/routes/coach.js - Coach service → Weight records: reads
server/routes/coach.js - Coach service → Gemini AI: requests reply
server/routes/coach.js