# sujal0910/evolve_medullose architecture

> Architecture diagram of the GitHub repository sujal0910/evolve_medullose, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sujal0910/evolve_medullose
- Repository: https://github.com/sujal0910/evolve_medullose

## Overview

1. **Overall shape**
   - This repository is a **single Flask-style web application** deployed as one server process, not a multi-service system.
   - The app is centered in `app.py`, with HTML rendered from `templates/` and assets served from `static/`.

2. **Primary runtime boundary**
   - **Browser clients** hit the app over HTTP.
   - The server handles routing, page rendering, and any form submission logic in the backend.
   - There is no visible separate frontend framework, API gateway, or microservice split in the repository.

3. **Presentation layer**
   - `templates/` contains the full UI surface as server-rendered pages.
   - Key screens include:
     - landing/home pages
     - doctor and admin dashboards
     - appointment booking and appointment history
     - reminders
     - emergency
     - health prediction
     - report upload
     - video consultation
     - library/article browsing
   - `templates/base.html` likely provides the shared layout and navigation used across the site.

4. **Content/data pages**
   - The `articles/` directory suggests a content-driven section, likely used for health education or a library view.
   - `templates/library.html` and `templates/article_detail.html` indicate a simple content browsing flow: list page → detail page.

5. **Functional modules implied by routes**
   - The app appears organized around healthcare workflows:
     - **Find doctors**
     - **Book appointments**
     - **My appointments**
     - **Doctor portal/dashboard**
     - **Admin dashboard**
     - **Reminders**
     - **Upload reports**
     - **Emergency access**
     - **Health prediction**
     - **Video consultation**
   - These are likely route groups in `app.py`, each rendering a template and possibly processing form inputs.

6. **Data flow inside the app**
   - Most interactions are likely **request → backend route → template render**.
   - For form-based features such as booking, upload, reminders, or prediction, the likely flow is **browser form submission → backend validation/processing → confirmation or result page**.
   - Since no database files are visible, the repo does not clearly expose a standalone persistence layer, so storage may be minimal, file-based, or embedded in the app logic.

7. **Static resources**
   - `static/` and `static/images/` hold client-facing assets such as images, styles, or scripts.
   - These are served directly by the web server and support the template-based UI.

8. **Deployment/runtime**
   - `gunicorn.conf.py` shows the app is prepared for **Gunicorn-based production hosting**.
   - The README links to a live deployment on **Render**, so the production architecture is likely: **Render → Gunicorn → Flask app**.

9. **Technology boundary**
   - The project is strongly oriented around **server-side rendering** rather than a SPA architecture.
   - The repository structure suggests a traditional monolithic Python web app with Jinja templates, static assets, and route handlers in one backend codebase.

10. **Likely diagram emphasis**
   - An accurate architecture diagram should show:
     - **Users/browser**
     - **Flask backend (`app.py`)**
     - **Jinja templates**
     - **Static assets**
     - **Article/content files**
     - **Production entry via Gunicorn/Render**
   - There is no evidence in the file tree of separate services, message queues, or external databases that need to be drawn as independent subsystems.

Main entry points: [`app.py`](https://github.com/sujal0910/evolve_medullose/blob/main/app.py) (Flask app), [`static`](https://github.com/sujal0910/evolve_medullose/tree/main/static) (Static assets), [`gunicorn.conf.py`](https://github.com/sujal0910/evolve_medullose/blob/main/gunicorn.conf.py) (Gunicorn), [`templates`](https://github.com/sujal0910/evolve_medullose/tree/main/templates) (Web UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_browser(("Browser<br/>client"))
end

subgraph group_server["Server"]
  node_flask_app["Flask app<br/>web backend<br/>[app.py]"]
  node_gunicorn["Gunicorn<br/>wsgi server<br/>[gunicorn.conf.py]"]
end

subgraph group_ui["Templates"]
  node_rendered_ui["Web UI<br/>SSR pages"]
  node_base_layout["Base layout<br/>Jinja layout<br/>[base.html]"]
  node_home_page["Home page<br/>landing view<br/>[index.html]"]
  node_doctor_pages["Doctor views<br/>dashboard pages<br/>[doctor_portal.html]"]
  node_admin_page["Admin dashboard<br/>admin view"]
  node_booking_page["Booking flow<br/>appointment forms"]
  node_reminder_page["Reminders<br/>schedule view<br/>[reminders.html]"]
  node_emergency_page["Emergency<br/>urgent access<br/>[emergency.html]"]
  node_prediction_page["Prediction<br/>health tool"]
  node_report_page["Report upload<br/>file form<br/>[upload_report.html]"]
  node_video_page["Video consult<br/>consultation view"]
  node_library_page["Library<br/>content browse<br/>[library.html]"]
  node_article_page["Article detail<br/>content detail"]
end

subgraph group_content["Content"]
  node_articles_dir["Articles<br/>content files"]
  node_static_assets["Static assets<br/>images and assets"]
  node_images[("Images<br/>media assets")]
end

node_browser -->|"HTTP"| node_gunicorn
node_gunicorn -->|"serve"| node_flask_app
node_browser -->|"assets"| node_static_assets
node_flask_app -->|"render"| node_rendered_ui
node_rendered_ui -.->|"extends"| node_base_layout
node_flask_app -->|"landing"| node_home_page
node_flask_app -->|"doctor"| node_doctor_pages
node_flask_app -->|"admin"| node_admin_page
node_flask_app -->|"appointments"| node_booking_page
node_flask_app -->|"reminders"| node_reminder_page
node_flask_app -->|"emergency"| node_emergency_page
node_flask_app -->|"predict"| node_prediction_page
node_flask_app -->|"upload"| node_report_page
node_flask_app -->|"consult"| node_video_page
node_flask_app -->|"browse"| node_library_page
node_flask_app -->|"detail"| node_article_page
node_library_page -->|"reads"| node_articles_dir
node_flask_app -->|"serve"| node_static_assets
node_static_assets -.->|"contains"| node_images

click node_rendered_ui "https://github.com/sujal0910/evolve_medullose/tree/main/templates"
click node_base_layout "https://github.com/sujal0910/evolve_medullose/blob/main/templates/base.html"
click node_home_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/index.html"
click node_doctor_pages "https://github.com/sujal0910/evolve_medullose/blob/main/templates/doctor_portal.html"
click node_admin_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/admin_dashboard.html"
click node_booking_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/book_appointment.html"
click node_reminder_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/reminders.html"
click node_emergency_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/emergency.html"
click node_prediction_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/health_prediction.html"
click node_report_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/upload_report.html"
click node_video_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/video_consultation.html"
click node_library_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/library.html"
click node_article_page "https://github.com/sujal0910/evolve_medullose/blob/main/templates/article_detail.html"
click node_flask_app "https://github.com/sujal0910/evolve_medullose/blob/main/app.py"
click node_gunicorn "https://github.com/sujal0910/evolve_medullose/blob/main/gunicorn.conf.py"
click node_articles_dir "https://github.com/sujal0910/evolve_medullose/tree/main/articles"
click node_static_assets "https://github.com/sujal0910/evolve_medullose/tree/main/static"
click node_images "https://github.com/sujal0910/evolve_medullose/tree/main/static/images"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser toneBlue
class node_flask_app,node_gunicorn toneAmber
class node_rendered_ui,node_base_layout,node_home_page,node_doctor_pages,node_admin_page,node_booking_page,node_reminder_page,node_emergency_page,node_prediction_page,node_report_page,node_video_page,node_library_page,node_article_page toneMint
class node_articles_dir,node_static_assets,node_images toneRose
```

## Components

### Client

Browser-side entry point and static delivery

- **Browser**: client · Users interact with the site through HTTP requests

### Server

Flask app and production process boundary

- [Flask app](https://github.com/sujal0910/evolve_medullose/blob/main/app.py): web backend · Central request router and server-side logic · `app.py`
- [Gunicorn](https://github.com/sujal0910/evolve_medullose/blob/main/gunicorn.conf.py): wsgi server · Production application entry point · `gunicorn.conf.py`

### Templates

Server-rendered pages and shared layout

- [Web UI](https://github.com/sujal0910/evolve_medullose/tree/main/templates): SSR pages · Server-rendered pages for browsing, forms, and dashboards · `templates`
- [Base layout](https://github.com/sujal0910/evolve_medullose/blob/main/templates/base.html): Jinja layout · Shared header, navigation, and page shell · `templates/base.html`
- [Home page](https://github.com/sujal0910/evolve_medullose/blob/main/templates/index.html): landing view · Entry and landing screens · `templates/index.html`
- [Doctor views](https://github.com/sujal0910/evolve_medullose/blob/main/templates/doctor_portal.html): dashboard pages · Doctor portal and doctor dashboard screens · `templates/doctor_portal.html`
- [Admin dashboard](https://github.com/sujal0910/evolve_medullose/blob/main/templates/admin_dashboard.html): admin view · Administrative oversight screen · `templates/admin_dashboard.html`
- [Booking flow](https://github.com/sujal0910/evolve_medullose/blob/main/templates/book_appointment.html): appointment forms · Find doctors, book appointments, and view appointments · `templates/book_appointment.html`
- [Reminders](https://github.com/sujal0910/evolve_medullose/blob/main/templates/reminders.html): schedule view · Reminder management and alerts page · `templates/reminders.html`
- [Emergency](https://github.com/sujal0910/evolve_medullose/blob/main/templates/emergency.html): urgent access · Fast-access emergency information and actions · `templates/emergency.html`
- [Prediction](https://github.com/sujal0910/evolve_medullose/blob/main/templates/health_prediction.html): health tool · Health prediction input and results page · `templates/health_prediction.html`
- [Report upload](https://github.com/sujal0910/evolve_medullose/blob/main/templates/upload_report.html): file form · Report submission and upload page · `templates/upload_report.html`
- [Video consult](https://github.com/sujal0910/evolve_medullose/blob/main/templates/video_consultation.html): consultation view · Video consultation interface · `templates/video_consultation.html`
- [Library](https://github.com/sujal0910/evolve_medullose/blob/main/templates/library.html): content browse · Article listing and discovery page · `templates/library.html`
- [Article detail](https://github.com/sujal0910/evolve_medullose/blob/main/templates/article_detail.html): content detail · Single article reading page · `templates/article_detail.html`

### Content

Article and media assets

- [Articles](https://github.com/sujal0910/evolve_medullose/tree/main/articles): content files · Static article content used by the library flow · `articles`
- [Static assets](https://github.com/sujal0910/evolve_medullose/tree/main/static): images and assets · Styles, scripts, and images served directly · `static`
- [Images](https://github.com/sujal0910/evolve_medullose/tree/main/static/images): media assets · Image assets referenced by pages · `static/images`

## Connections

- Browser → Gunicorn: HTTP · Production requests enter the deployed app
- Gunicorn → Flask app: serve · Gunicorn hosts the Flask application
- Browser → Static assets: assets · Browsers fetch static files directly
- Flask app → Web UI: render · Routes return server-rendered pages
- Web UI → Base layout: extends · Pages share the common layout
- Flask app → Home page: landing · Serves home and landing screens
- Flask app → Doctor views: doctor · Serves doctor-facing views
- Flask app → Admin dashboard: admin · Serves admin dashboard views
- Flask app → Booking flow: appointments · Handles doctor discovery and booking flows
- Flask app → Reminders: reminders · Handles reminder workflow
- Flask app → Emergency: emergency · Serves emergency access screens
- Flask app → Prediction: predict · Handles health prediction requests
- Flask app → Report upload: upload · Processes report upload submissions
- Flask app → Video consult: consult · Serves video consultation flow
- Flask app → Library: browse · Serves article library listing
- Flask app → Article detail: detail · Serves article detail pages
- Library → Articles: reads · Library content is sourced from article files
- Flask app → Static assets: serve · Backend exposes static resources
- Static assets → Images: contains · Image directory is part of static assets
