How health-mate-project/healthmate works
Main Components
a) Frontend Layer:
• Static HTML pages (login.html, signup.html, main.html)
• Client-side JavaScript
• CSS styling
b) Backend Layer:
• FastAPI server (main.py)
• Authentication system
• ChatGPT integration
• Health recommendation system
c) Database Layer:
• SQLite database (users.db)
d) External Services:
• ChatGPT API
[Client Layer]
• ↕️ HTTP/REST
[Application Layer]
• ↕️ SQL
[Data Layer]
• ↔️ External Services
Detailed Component Breakdown
Client Layer:
• UI components for user input
• Static asset handling
Application Layer (FastAPI):
• User Authentication Controller
• Health Recommendation Service
• ChatGPT Integration Service
• API Routes (/user/signup, /user/login, /chat, /healthmate)
Data Layer:
• SQLite database with user table
• Relevant database schema as shown in README
External Services:
• ChatGPT API connection
Flow Representation
• User authentication flow
• Health recommendation request/response flow
• ChatGPT API communication
• Database operations
Additional Elements
Include:
• API endpoints listing
• Database schema representation
• Security boundaries
• Request/response flow indicators
Technical Details to Highlight
• FastAPI framework usage
• RESTful API architecture
• Static file serving
• Database interactions
• External API integration