How aakash-jha3903/sanjeevni_ai__hack_191 works
Project Type & Purpose
• This is a monolithic, full-stack web application built with Python Django. It integrates AI/ML-based disease prediction, user authentication & role management, appointment booking, video consultations, and payment processing into one healthcare platform.
High-Level Architecture
• The system follows the classic three-tier pattern:
• Presentation Layer (Frontend: HTML, CSS, JS, Bootstrap/Tailwind)
• Application Layer (Backend: Django MVC apps)
• Data Layer (Database + File Storage)
• In addition, it interfaces with several external services (ML libraries, payment gateway, Jitsi, email/TTS).
Main Components
a. Client Browsers & Mobile (Patients, Doctors, Admins)
• Interact via web UI; static assets served from Django’s static file server (or a CDN in production).
b. Django Web Server
• URL Routing (appoint/urls.py)
• Apps:
• ML (disease prediction endpoints, model training scripts)
• account (user registration, authentication, profile, signals)
• appoint_app (appointment CRUD, video call orchestration)
• payments (Paystack integration, transaction models)
• theme (shared templates & CSS)
c. Database
• SQLite in development (db.sqlite3); replace with PostgreSQL/MySQL in production.
• Django ORM handles models in each app.
d. Media & Static File Storage
• Profile photos, uploads, ML static media (speech.mp3, video.mp4)
e. External Services
• ML/DL frameworks (Scikit-learn, TensorFlow)
• Text-to-Speech (gTTS)
• Video Conferencing (Jitsi)
• Payment Gateway (Paystack)
• Email/SMTP for password resets & prescriptions
Component Interactions & Data Flow
1. User → HTTP(S) Request → Web Server
• Static content (CSS/JS/images) served directly
• Dynamic pages handled via Django views
2. View Logic → Business Logic
• Authentication & session management (account app)
• Appointment logic & scheduling (appoint_app) → May trigger Jitsi URL generation
• Payment initiation (payments) → Redirect to Paystack, webhook callbacks
• ML inference (ML app) → Loads pre-trained model, processes input (symptoms CSV or MRI upload), returns predictions and precaution data
3. Business Logic → Data Layer
• Reads/writes to DB models (users, appointments, prescriptions, payments)
• Stores uploaded files in media folder or cloud storage
4. External API Calls
• TTS engine (gTTS) for nurse avatar voice
• SMTP for emails
• Paystack for payment confirmation
• Jitsi for video call sessions
Architectural Patterns & Principles
• Monolithic MVC: Clear separation between Models, Views, Templates.
• Modular Django apps: Each domain area encapsulated in its own app.
• Reusable templates via “theme” app.
• Asynchronous model training separated from inference (training scripts vs. real-time API).
• Use of signals for decoupled events (e.g., send email after prescription creation).
Detail Checklist
• User → Web Server → DB
• Web Server → ML inference → Web Server
• Web Server → Paystack ↔ Web Server (webhook)
• Web Server → Jitsi (video call) → Clients
• Web Server → SMTP/gTTS