How tejaswikg08dev/health-tracker works
This is a personal health and habit tracker: users authenticate, create habits, record check-ins, and review analytics, with AI coaching, document-grounded answers, reports, notifications, and exports as supporting capabilities. The React app routes users to feature pages and services call the FastAPI API; backend modules handle domain work against shared PostgreSQL/Redis infrastructure. README documents several integrations and API capabilities not represented in sampled implementations, so those are included at module level; only source-supported wiring is drawn. The frontend-to-API and many module internals are inferred from documented structure where excerpts are partial.
Main entry points: main.py FastAPI Application · database.py PostgreSQL · service.py AI Service · App.tsx React App
Components 24
Web Client
- React App
frontend/src/App.tsx - Auth Screens
frontend/src/pages/LoginPage.tsx - Habit Check-ins
frontend/src/pages/CheckInPage.tsx - Analytics Views
frontend/src/pages/AnalyticsPage.tsx - AI Chat UI
frontend/src/pages/ChatPage.tsx - API Services
frontend/src/services/api.ts
Health Tracking
- Authentication
backend/app/modules/auth - Habit Management
backend/app/modules/habits - Daily Logs
- Analytics
backend/app/modules/analytics
AI Insights
- AI Service
backend/app/modules/ai/service.py - ReAct Coach
backend/app/modules/ai/agents/health_coach.py - Document RAG
backend/app/modules/ai/rag - Weekly Report Flow
backend/app/modules/ai/workflows/weekly_report - LLM Providers
backend/app/modules/ai/llm
User Delivery
- Notifications
backend/app/modules/notifications - Data Export
backend/app/modules/export - S3-Compatible Storage
backend/app/modules/export/storage.py - Scheduled / Async Tasks
lambda_functions
Backend Runtime
- PostgreSQL
backend/app/database.py - Redis Services
backend/app/redis_client.py - FastAPI Application
backend/app/main.py
Other components
- Health Tracker User
- Email Service
Connections 39
- Health Tracker User → React App: uses
- React App → Auth Screens: routes to
- React App → Habit Check-ins: routes to
- React App → Analytics Views: routes to
- React App → AI Chat UI: routes to
- Auth Screens → API Services: requests
- Habit Check-ins → API Services: requests
- Analytics Views → API Services: requests
- AI Chat UI → API Services: requests
- API Services → FastAPI Application: calls
- FastAPI Application → Authentication: dispatches
- FastAPI Application → Habit Management: dispatches
- FastAPI Application → Daily Logs: dispatches
- FastAPI Application → Analytics: dispatches
- FastAPI Application → AI Service: dispatches
- FastAPI Application → Notifications: dispatches
- FastAPI Application → Data Export: dispatches
- Authentication → PostgreSQL: reads/writes
- Habit Management → PostgreSQL: reads/writes
- Daily Logs → PostgreSQL: reads/writes
- Analytics → PostgreSQL: queries
- Analytics → Redis Services: caches
- AI Service → LLM Providers: requests completions
- AI Service → ReAct Coach: invokes
- AI Service → Document RAG: processes documents
- AI Service → Weekly Report Flow: runs report
- AI Service → PostgreSQL: reads/writes
- AI Service → Redis Services: tracks usage
- ReAct Coach → Daily Logs: queries logs
- Weekly Report Flow → LLM Providers: analyzes and writes
- Weekly Report Flow → PostgreSQL: collects data
- Document RAG → PostgreSQL: stores vectors
- Data Export → S3-Compatible Storage: uploads files
- Data Export → PostgreSQL: reads data
- Notifications → Email Service: sends messages
- Scheduled / Async Tasks → PostgreSQL: reads/writes
- Scheduled / Async Tasks → Email Service: sends messages
- Scheduled / Async Tasks → S3-Compatible Storage: uploads exports
- Scheduled / Async Tasks → LLM Providers: generates reports