How nikhil0718-tech/rxguardian works
RxGuardian is a medication-management product for patients, doctors, and guardians. Its main workflow is prescription creation, patient reminder tracking and medicine verification, with missed doses escalating to guardian alerts; role-based dashboards expose adherence and status. A separate AI engine provides medicine-image OCR and prediction, while assistant and RAG modules support medicine queries. The excerpts show app routing, prescription persistence, reminder verification, and alert logic. Some frontend-to-backend and AI integration details are not evidenced in the sampled source, so those links are omitted or marked unverified.
Main entry points: App.jsx Web route dispatcher · main.py FastAPI application · reminder_routes.py Reminder and verification routes · api.js HTTP API client
Components 25
Role-based web app
- Web route dispatcher
frontend/src/App.jsx - Registration
frontend/src/pages/Auth/Register.jsx - Auth API client
frontend/src/services/authService.js - Patient dashboard
frontend/src/pages/Patient/PatientDashboard.jsx - Medicine upload
frontend/src/pages/Patient/UploadMedicine.jsx - Prescription creation
frontend/src/pages/Doctor/CreatePrescription.jsx - Guardian dashboard
frontend/src/pages/Guardian/GuardianDashboard.jsx - HTTP API client
frontend/src/api/api.js
Backend API
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/routes/auth_routes.py - SQL database session
backend/app/config/database.py
Medication care
- Prescription routes
backend/app/routes/prescription_routes.py - Reminder and verification routes
backend/app/routes/reminder_routes.py - Reminder scheduling
backend/app/utils/reminder_scheduler.py - Adherence calculation
backend/app/utils/adherence_engine.py - Guardian alert routes
backend/app/routes/guardian_alert_routes.py - Guardian alert generation
backend/app/utils/guardian_alert_engine.py - Reminder records
backend/app/models/reminder_model.py - Prescription records
backend/app/models/prescription_model.py - Guardian alert records
backend/app/models/guardian_alert_model.py
AI and assistance
- Medicine image OCR
backend/ai_engine/ocr/easyocr_engine.py - Medicine prediction
backend/ai_engine/inference/predictor.py - Prescription verification
backend/ai_engine/inference/verification_engine.py - Assistant and RAG
backend/app/rag/rag_service.py
Other components
- Patients, doctors, guardians
Connections 34
- Patients, doctors, guardians → Web route dispatcher: use roles
frontend/src/App.jsx - Web route dispatcher → Registration: routes to
frontend/src/App.jsx - Web route dispatcher → Patient dashboard: routes to
frontend/src/App.jsx - Web route dispatcher → Medicine upload: routes to
frontend/src/App.jsx - Web route dispatcher → Prescription creation: routes to
frontend/src/App.jsx - Web route dispatcher → Guardian dashboard: routes to
frontend/src/App.jsx - Registration → Auth API client: calls
frontend/src/pages/Auth/Register.jsx - Auth API client → HTTP API client: sends requests
frontend/src/services/authService.js - Prescription creation → HTTP API client: uses
frontend/src/pages/Doctor/CreatePrescription.jsx - Patient dashboard → HTTP API client: uses
frontend/src/pages/Patient/PatientDashboard.jsx - Guardian dashboard → HTTP API client: uses
frontend/src/pages/Guardian/GuardianDashboard.jsx - HTTP API client → FastAPI application: calls API
- FastAPI application → Authentication routes: mounts routes
backend/app/main.py - FastAPI application → Prescription routes: mounts routes
backend/app/main.py - FastAPI application → Reminder and verification routes: mounts routes
backend/app/main.py - FastAPI application → Guardian alert routes: mounts routes
backend/app/main.py - Prescription routes → Prescription records: creates records
backend/app/routes/prescription_routes.py - Prescription routes → Reminder records: creates reminders
backend/app/routes/prescription_routes.py - Reminder and verification routes → Reminder records: reads and updates
backend/app/routes/reminder_routes.py - Reminder and verification routes → Guardian alert records: updates alerts
backend/app/routes/reminder_routes.py - Reminder and verification routes → Guardian alert generation: invokes
backend/app/routes/reminder_routes.py - Guardian alert generation → Guardian alert records: creates alerts
backend/app/utils/guardian_alert_engine.py - Guardian alert generation → Reminder records: checks reminder
backend/app/utils/guardian_alert_engine.py - Adherence calculation → Reminder records: reads status
backend/app/utils/adherence_engine.py - FastAPI application → Reminder scheduling: starts scheduler
backend/app/main.py - Prescription routes → SQL database session: gets session
backend/app/routes/prescription_routes.py - Reminder and verification routes → SQL database session: gets session
backend/app/routes/reminder_routes.py - Prescription records → SQL database session: uses ORM base
backend/app/models/prescription_model.py - Reminder records → SQL database session: uses ORM base
backend/app/models/reminder_model.py - Guardian alert records → SQL database session: uses ORM base
backend/app/models/guardian_alert_model.py - Reminder and verification routes → Prescription verification: verification integration
- Prescription verification → Medicine image OCR: uses OCR
backend/ai_engine/inference/verification_engine.py - Prescription verification → Medicine prediction: uses prediction
backend/ai_engine/inference/verification_engine.py - Assistant and RAG → Patients, doctors, guardians: answers queries