How mataminus-capstone/jagamata_flask works
Jagamata is a Flask eye-health application with web pages and a mobile-facing API. Users can authenticate, ask eye-health questions, submit images for detection, and review related health content; the app also supports clinics, medicines, drowsiness checks, and feedback. The application factory registers the route modules, which dispatch to controllers or service logic. Models persist user and feature data. The excerpts show several service implementations, but not all controller or route behavior, so uncertain links are omitted.
Main entry points: models.py Application data · routes API routes · web_routes.py Web routes · auth_service.py Auth service
Components 26
Application entry
- Flask app
app.py - API routes
routes - Web routes
routes/web_routes.py
Identity and access
- Auth routes
routes/auth_routes.py - Auth controller
controllers/auth_controller.py - Auth service
services/auth_service.py - JWT service
services/jwt_service.py
Eye-health services
- Chat routes
routes/chatbot_routes.py - Chat controller
controllers/chatbot_controller.py - Chatbot service
services/chatbot_service.py - Detection routes
routes/detection_routes.py - Detection controller
controllers/detection_controller.py - Detection service
services/detection_service.py - Drowsiness routes
routes/drowsiness_routes.py - Drowsiness controller
controllers/drowsiness_controller.py - Drowsiness service
services/drowsiness_service.py
Content and community
- Article controller
controllers/article_controller.py - Feedback controller
controllers/feedback_controller.py - User controller
controllers/user_controller.py - Clinic controller
controllers/clinic_controller.py
Persistence and integrations
- Application data
models.py - Cloudinary
- Google OAuth
- Gemini
- Sentiment analysis
services/sentiment_service.py
Other components
- User
Connections 32
- User → Flask app: uses
app.py - Flask app → API routes: registers
app.py - Flask app → Web routes: registers
app.py - API routes → Auth routes: includes
- API routes → Chat routes: includes
- API routes → Detection routes: includes
- API routes → Drowsiness routes: includes
- Auth routes → Auth controller: dispatches
routes/auth_routes.py - Auth controller → Auth service: uses
controllers/auth_controller.py - Auth controller → JWT service: uses
controllers/auth_controller.py - Auth service → Application data: queries
services/auth_service.py - Auth service → Google OAuth: verifies tokens
services/auth_service.py - Auth service → Google OAuth: requests user info
services/auth_service.py - Chat routes → Chat controller: dispatches
routes/chatbot_routes.py - Chat controller → Chatbot service: uses
controllers/chatbot_controller.py - Chatbot service → Gemini: generates replies
- Detection routes → Detection controller: dispatches
routes/detection_routes.py - Detection controller → Detection service: uses
controllers/detection_controller.py - Detection controller → Application data: stores history
controllers/detection_controller.py - Detection controller → Cloudinary: uploads images
controllers/detection_controller.py - Drowsiness routes → Drowsiness controller: dispatches
routes/drowsiness_routes.py - Drowsiness controller → Drowsiness service: uses
controllers/drowsiness_controller.py - Web routes → Application data: queries
routes/web_routes.py - Web routes → Cloudinary: uploads images
routes/web_routes.py - Web routes → Chatbot service: uses
routes/web_routes.py - Article controller → Application data: reads and writes
controllers/article_controller.py - Article controller → Cloudinary: uploads images
controllers/article_controller.py - Feedback controller → Sentiment analysis: analyzes text
controllers/feedback_controller.py - Feedback controller → Application data: stores feedback
controllers/feedback_controller.py - User controller → Application data: manages users
controllers/user_controller.py - Clinic controller → Application data: manages clinics
controllers/clinic_controller.py - Clinic controller → Cloudinary: uploads images
controllers/clinic_controller.py