# meghna120105/studyflow-ai architecture

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

- Interactive diagram: https://gitdiagram.com/meghna120105/studyflow-ai
- Repository: https://github.com/meghna120105/studyflow-ai

## Overview

AI Study Planner turns syllabus material into editable curricula and personalized timetables, then supports progress tracking, missed-task rescheduling, persistence, and exports. The main workflow is shared by the teacher, student, competitive-exam, and legacy single-subject portals. README documents major capabilities, while sampled code and the source index establish many portal dependencies; some detailed wiring is therefore represented only where explicitly documented.

Main entry points: [`modules/competitive_portal.py`](https://github.com/meghna120105/studyflow-ai/blob/main/modules/competitive_portal.py) (Competitive Portal), [`app.py`](https://github.com/meghna120105/studyflow-ai/blob/main/app.py) (Streamlit App), [`modules/student_portal.py`](https://github.com/meghna120105/studyflow-ai/blob/main/modules/student_portal.py) (Student Portal), [`modules/teacher_portal.py`](https://github.com/meghna120105/studyflow-ai/blob/main/modules/teacher_portal.py) (Teacher Portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_teacher["Teacher Portal<br/>[teacher_portal.py]"]
  node_student["Student Portal<br/>[student_portal.py]"]
  node_competitive["Competitive Portal"]
  node_single["Single-Subject Portal"]
  node_app["Streamlit App<br/>[app.py]"]
  node_auth["Authentication UI<br/>[auth_ui.py]"]
  node_shared_ui["Shared UI Helpers<br/>[ui.py]"]
end

subgraph group_curriculum["Curriculum Intake"]
  node_pdf["PDF Parser<br/>[pdf_parser.py]"]
  node_extractor["Syllabus Extractor<br/>[ai_extractor.py]"]
  node_sample["Sample Syllabi<br/>[sample_data.py]"]
end

subgraph group_planning["Study Planning"]
  node_scheduler["Timetable Scheduler<br/>[scheduler.py]"]
end

subgraph group_persistence["Accounts and Persistence"]
  node_database[("SQLite Persistence<br/>[database.py]")]
end

subgraph group_outputs["Tracking and Outputs"]
  node_exporter["Schedule Exporters<br/>[exporter.py]"]
end

node_learner(("Student or Aspirant"))
node_faculty(("Faculty"))
node_llm{{"LLM Providers"}}
node_export_files["PDF CSV iCal"]

node_learner -->|"opens planner"| node_app
node_faculty -->|"opens planner"| node_app
node_app -->|"renders login"| node_auth
node_app -->|"routes portal"| node_teacher
node_app -->|"routes portal"| node_student
node_app -->|"routes portal"| node_competitive
node_app -->|"routes portal"| node_single
node_teacher -->|"parses syllabus"| node_pdf
node_teacher -->|"extracts topics"| node_extractor
node_teacher -->|"publishes curricula"| node_database
node_teacher -->|"loads samples"| node_sample
node_student -->|"loads curricula"| node_database
node_student -->|"generates timetable"| node_scheduler
node_student -->|"reschedules tasks"| node_scheduler
node_student -->|"saves progress"| node_database
node_competitive -->|"parses syllabus"| node_pdf
node_competitive -->|"extracts topics"| node_extractor
node_competitive -->|"plans study"| node_scheduler
node_competitive -->|"saves plan"| node_database
node_competitive -->|"loads samples"| node_sample
node_single -->|"parses syllabus"| node_pdf
node_single -->|"extracts topics"| node_extractor
node_single -->|"generates timetable"| node_scheduler
node_single -->|"exports schedule"| node_exporter
node_teacher -->|"uses helpers"| node_shared_ui
node_student -->|"uses helpers"| node_shared_ui
node_competitive -->|"uses helpers"| node_shared_ui
node_extractor -.->|"requests extraction"| node_llm
node_app -->|"saves user plan"| node_database
node_student -->|"exports schedule"| node_exporter
node_competitive -->|"exports schedule"| node_exporter
node_exporter -->|"generates formats"| node_export_files

click node_teacher "https://github.com/meghna120105/studyflow-ai/blob/main/modules/teacher_portal.py"
click node_student "https://github.com/meghna120105/studyflow-ai/blob/main/modules/student_portal.py"
click node_competitive "https://github.com/meghna120105/studyflow-ai/blob/main/modules/competitive_portal.py"
click node_single "https://github.com/meghna120105/studyflow-ai/blob/main/modules/single_subject_portal.py"
click node_app "https://github.com/meghna120105/studyflow-ai/blob/main/app.py"
click node_auth "https://github.com/meghna120105/studyflow-ai/blob/main/modules/auth_ui.py"
click node_pdf "https://github.com/meghna120105/studyflow-ai/blob/main/modules/pdf_parser.py"
click node_extractor "https://github.com/meghna120105/studyflow-ai/blob/main/modules/ai_extractor.py"
click node_sample "https://github.com/meghna120105/studyflow-ai/blob/main/modules/sample_data.py"
click node_scheduler "https://github.com/meghna120105/studyflow-ai/blob/main/modules/scheduler.py"
click node_database "https://github.com/meghna120105/studyflow-ai/blob/main/modules/database.py"
click node_shared_ui "https://github.com/meghna120105/studyflow-ai/blob/main/modules/ui.py"
click node_exporter "https://github.com/meghna120105/studyflow-ai/blob/main/modules/exporter.py"

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_teacher,node_student,node_competitive,node_single,node_app,node_auth,node_shared_ui toneBlue
class node_pdf,node_extractor,node_sample toneAmber
class node_scheduler toneMint
class node_database toneRose
class node_exporter,node_learner,node_faculty,node_llm,node_export_files toneIndigo
```

## Components

### User Experience

- [Teacher Portal](https://github.com/meghna120105/studyflow-ai/blob/main/modules/teacher_portal.py): `modules/teacher_portal.py`
- [Student Portal](https://github.com/meghna120105/studyflow-ai/blob/main/modules/student_portal.py): `modules/student_portal.py`
- [Competitive Portal](https://github.com/meghna120105/studyflow-ai/blob/main/modules/competitive_portal.py): `modules/competitive_portal.py`
- [Single-Subject Portal](https://github.com/meghna120105/studyflow-ai/blob/main/modules/single_subject_portal.py): `modules/single_subject_portal.py`
- [Streamlit App](https://github.com/meghna120105/studyflow-ai/blob/main/app.py): `app.py`
- [Authentication UI](https://github.com/meghna120105/studyflow-ai/blob/main/modules/auth_ui.py): `modules/auth_ui.py`
- [Shared UI Helpers](https://github.com/meghna120105/studyflow-ai/blob/main/modules/ui.py): `modules/ui.py`

### Curriculum Intake

- [PDF Parser](https://github.com/meghna120105/studyflow-ai/blob/main/modules/pdf_parser.py): `modules/pdf_parser.py`
- [Syllabus Extractor](https://github.com/meghna120105/studyflow-ai/blob/main/modules/ai_extractor.py): `modules/ai_extractor.py`
- [Sample Syllabi](https://github.com/meghna120105/studyflow-ai/blob/main/modules/sample_data.py): `modules/sample_data.py`

### Study Planning

- [Timetable Scheduler](https://github.com/meghna120105/studyflow-ai/blob/main/modules/scheduler.py): `modules/scheduler.py`

### Accounts and Persistence

- [SQLite Persistence](https://github.com/meghna120105/studyflow-ai/blob/main/modules/database.py): `modules/database.py`

### Tracking and Outputs

- [Schedule Exporters](https://github.com/meghna120105/studyflow-ai/blob/main/modules/exporter.py): `modules/exporter.py`

### Other components

- **Student or Aspirant**
- **Faculty**
- **LLM Providers**
- **PDF CSV iCal**

## Connections

- Student or Aspirant → Streamlit App: opens planner (evidence: `README.md`)
- Faculty → Streamlit App: opens planner (evidence: `README.md`)
- Streamlit App → Authentication UI: renders login (evidence: `app.py`)
- Streamlit App → Teacher Portal: routes portal (evidence: `app.py`)
- Streamlit App → Student Portal: routes portal (evidence: `app.py`)
- Streamlit App → Competitive Portal: routes portal (evidence: `app.py`)
- Streamlit App → Single-Subject Portal: routes portal (evidence: `app.py`)
- Teacher Portal → PDF Parser: parses syllabus (evidence: `README.md`)
- Teacher Portal → Syllabus Extractor: extracts topics (evidence: `README.md`)
- Teacher Portal → SQLite Persistence: publishes curricula (evidence: `modules/teacher_portal.py`)
- Teacher Portal → Sample Syllabi: loads samples (evidence: `modules/teacher_portal.py`)
- Student Portal → SQLite Persistence: loads curricula (evidence: `modules/student_portal.py`)
- Student Portal → Timetable Scheduler: generates timetable (evidence: `README.md`)
- Student Portal → Timetable Scheduler: reschedules tasks (evidence: `modules/student_portal.py`)
- Student Portal → SQLite Persistence: saves progress (evidence: `modules/student_portal.py`)
- Competitive Portal → PDF Parser: parses syllabus (evidence: `modules/competitive_portal.py`)
- Competitive Portal → Syllabus Extractor: extracts topics (evidence: `modules/competitive_portal.py`)
- Competitive Portal → Timetable Scheduler: plans study (evidence: `modules/competitive_portal.py`)
- Competitive Portal → SQLite Persistence: saves plan (evidence: `modules/competitive_portal.py`)
- Competitive Portal → Sample Syllabi: loads samples (evidence: `modules/competitive_portal.py`)
- Single-Subject Portal → PDF Parser: parses syllabus (evidence: `modules/single_subject_portal.py`)
- Single-Subject Portal → Syllabus Extractor: extracts topics (evidence: `modules/single_subject_portal.py`)
- Single-Subject Portal → Timetable Scheduler: generates timetable (evidence: `modules/single_subject_portal.py`)
- Single-Subject Portal → Schedule Exporters: exports schedule (evidence: `modules/single_subject_portal.py`)
- Teacher Portal → Shared UI Helpers: uses helpers (evidence: `modules/teacher_portal.py`)
- Student Portal → Shared UI Helpers: uses helpers (evidence: `modules/student_portal.py`)
- Competitive Portal → Shared UI Helpers: uses helpers (evidence: `modules/competitive_portal.py`)
- Syllabus Extractor → LLM Providers: requests extraction (evidence: `README.md`)
- Streamlit App → SQLite Persistence: saves user plan (evidence: `app.py`)
- Student Portal → Schedule Exporters: exports schedule (evidence: `modules/student_portal.py`)
- Competitive Portal → Schedule Exporters: exports schedule (evidence: `modules/competitive_portal.py`)
- Schedule Exporters → PDF CSV iCal: generates formats (evidence: `README.md`)
