How sandipkatel/nirogya---a-personal-health-monitor works
Project Type and Purpose
• This is a standalone desktop/mobile app (Kivy-based) for personal health monitoring—symptom checking, disease prediction, metric calculation (BMI, BP), reminders, & data visualization.
Decompose the File Structure into High‐Level Layers
A. Presentation Layer (UI)
• main.py – app entry point, Kivy App class
• style.kv – UI layout & styling
• visual.py & src/display.py – screen management & UI rendering
B. Controller / Orchestration Layer
• src/manager.py – central controller, routes events from UI to services
C. Domain & Service Layer
• src/predictor.py – disease identification logic (uses CSV symptom data)
• src/pressure.py – blood‐pressure calculations
• src/scheduler.py – water/medicine/appointment reminders
• src/value.py – models for health metrics (e.g., BMI, heart rate)
• src/graph.py – data visualization routines (charts/plots)
D. Data Access & Persistence Layer
• src/file.py – reading/writing JSON (appointments) & CSV (datasets)
• dataset/ – source CSV/JSON for symptoms, prevention, cure, hospitals, appointments
• dependencies/txt_files & dependencies/pics – static reference data & assets
E. Utilities / Algorithm Library
• src/DSA_Stuff/ – AVLTree, binary_search, merge_sort for underlying data structures/algorithms
Component Relationships & Data Flow
• UI (Presentation) → Manager (Controller) → invokes Service modules (Predictor, Pressure, Scheduler, Graph)
• Services → File module → dataset & dependencies for lookup & persistence
• Utility algorithms feed into Predictor & Graph as needed
• Scheduler triggers notifications → UI
• Graph outputs → UI for display
Architectural Patterns
• Layered architecture (UI / Controller / Services / Data)
• MVC‐style separation (View: Kivy screens; Controller: manager.py; Model/Services: predictor, value, pressure)
• Event‐driven (Kivy callbacks → Manager methods → Service logic)
• Reusable utility library (DSA_Stuff) decoupled from domain logic
Essential Elements
• Layers: Presentation, Controller, Services, Data, Utilities
• Main modules & their grouping
• Data sources (dataset/, dependencies/)