# kodaqow/studyflow-app architecture

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

- Interactive diagram: https://gitdiagram.com/kodaqow/studyflow-app
- Repository: https://github.com/kodaqow/studyflow-app

## Overview

StudyFlow is a web app intended to support lecturer-led courses and student self-study. Its documented workflow is: lecturers create courses and access codes, add materials and practice content; students join using a code, review materials, and practice with flashcards or quizzes. A Pomodoro timer is another documented study aid. The checked-in runtime is currently a scaffold: the server serves the landing page and exposes a status endpoint, while API routes are commented out and the feature directories contain no shown implementation. Feature links below reflect README documentation, not verified runtime calls.

Main entry points: [`public/student`](https://github.com/kodaqow/studyflow-app/tree/main/public/student) (Student interface), [`public/lecturer`](https://github.com/kodaqow/studyflow-app/tree/main/public/lecturer) (Lecturer interface), [`src/server.js`](https://github.com/kodaqow/studyflow-app/blob/main/src/server.js) (Express server), [`public/html/landing-page.html`](https://github.com/kodaqow/studyflow-app/blob/main/public/html/landing-page.html) (Landing page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_landing["Landing page<br/>[landing-page.html]"]
  node_landing_js["Landing script<br/>[landing-page.js]"]
end

subgraph group_teaching["Course authoring"]
  node_lecturer_ui["Lecturer interface"]
  node_course_authoring["Course authoring"]
  node_access_codes["Access codes"]
  node_materials["Study materials"]
end

subgraph group_learning["Student learning"]
  node_student_ui["Student interface"]
  node_course_join["Course joining"]
  node_material_review["Material review"]
  node_flashcards["Flashcards"]
  node_quizzes["Quizzes"]
  node_pomodoro["Pomodoro timer"]
end

subgraph group_backend["Server foundation"]
  node_server["Express server<br/>[server.js]"]
  node_auth["JWT verification<br/>[auth.js]"]
  node_role_check["Role checks<br/>[roles.js]"]
  node_api_routes["API routes"]
  node_sql_store[("SQL database")]
end

node_lecturers(("Lecturers"))
node_students(("Students"))

node_lecturers -->|"use authoring"| node_lecturer_ui
node_lecturer_ui -->|"create courses"| node_course_authoring
node_lecturer_ui -->|"generate codes"| node_access_codes
node_lecturer_ui -->|"upload materials"| node_materials
node_lecturers -->|"create sets"| node_flashcards
node_lecturers -->|"create questions"| node_quizzes
node_students -->|"use learning tools"| node_student_ui
node_student_ui -->|"join by code"| node_course_join
node_student_ui -->|"view materials"| node_material_review
node_student_ui -->|"practice terms"| node_flashcards
node_student_ui -->|"take quizzes"| node_quizzes
node_student_ui -->|"use timer"| node_pomodoro
node_server -->|"serves page"| node_landing
node_server -->|"serves static files"| node_landing_js
node_server -.->|"planned route mount"| node_api_routes

click node_landing "https://github.com/kodaqow/studyflow-app/blob/main/public/html/landing-page.html"
click node_landing_js "https://github.com/kodaqow/studyflow-app/blob/main/public/js/landing-page.js"
click node_lecturer_ui "https://github.com/kodaqow/studyflow-app/tree/main/public/lecturer"
click node_course_authoring "https://github.com/kodaqow/studyflow-app/tree/main/src/controllers"
click node_access_codes "https://github.com/kodaqow/studyflow-app/tree/main/src/controllers"
click node_materials "https://github.com/kodaqow/studyflow-app/tree/main/public/lecturer"
click node_student_ui "https://github.com/kodaqow/studyflow-app/tree/main/public/student"
click node_course_join "https://github.com/kodaqow/studyflow-app/tree/main/src/controllers"
click node_material_review "https://github.com/kodaqow/studyflow-app/tree/main/public/student"
click node_flashcards "https://github.com/kodaqow/studyflow-app/tree/main/public/student"
click node_quizzes "https://github.com/kodaqow/studyflow-app/tree/main/public/student"
click node_pomodoro "https://github.com/kodaqow/studyflow-app/tree/main/public/student"
click node_server "https://github.com/kodaqow/studyflow-app/blob/main/src/server.js"
click node_auth "https://github.com/kodaqow/studyflow-app/blob/main/src/middleware/auth.js"
click node_role_check "https://github.com/kodaqow/studyflow-app/blob/main/src/middleware/roles.js"
click node_api_routes "https://github.com/kodaqow/studyflow-app/tree/main/src/routes"
click node_sql_store "https://github.com/kodaqow/studyflow-app/tree/main/database"

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_landing,node_landing_js toneBlue
class node_lecturer_ui,node_course_authoring,node_access_codes,node_materials toneAmber
class node_student_ui,node_course_join,node_material_review,node_flashcards,node_quizzes,node_pomodoro toneMint
class node_server,node_auth,node_role_check,node_api_routes,node_sql_store toneRose
class node_lecturers,node_students toneIndigo
```

## Components

### Web entry

- [Landing page](https://github.com/kodaqow/studyflow-app/blob/main/public/html/landing-page.html): `public/html/landing-page.html`
- [Landing script](https://github.com/kodaqow/studyflow-app/blob/main/public/js/landing-page.js): `public/js/landing-page.js`

### Course authoring

- [Lecturer interface](https://github.com/kodaqow/studyflow-app/tree/main/public/lecturer): `public/lecturer`
- [Course authoring](https://github.com/kodaqow/studyflow-app/tree/main/src/controllers): `src/controllers`
- [Access codes](https://github.com/kodaqow/studyflow-app/tree/main/src/controllers): `src/controllers`
- [Study materials](https://github.com/kodaqow/studyflow-app/tree/main/public/lecturer): `public/lecturer`

### Student learning

- [Student interface](https://github.com/kodaqow/studyflow-app/tree/main/public/student): `public/student`
- [Course joining](https://github.com/kodaqow/studyflow-app/tree/main/src/controllers): `src/controllers`
- [Material review](https://github.com/kodaqow/studyflow-app/tree/main/public/student): `public/student`
- [Flashcards](https://github.com/kodaqow/studyflow-app/tree/main/public/student): `public/student`
- [Quizzes](https://github.com/kodaqow/studyflow-app/tree/main/public/student): `public/student`
- [Pomodoro timer](https://github.com/kodaqow/studyflow-app/tree/main/public/student): `public/student`

### Server foundation

- [Express server](https://github.com/kodaqow/studyflow-app/blob/main/src/server.js): `src/server.js`
- [JWT verification](https://github.com/kodaqow/studyflow-app/blob/main/src/middleware/auth.js): `src/middleware/auth.js`
- [Role checks](https://github.com/kodaqow/studyflow-app/blob/main/src/middleware/roles.js): `src/middleware/roles.js`
- [API routes](https://github.com/kodaqow/studyflow-app/tree/main/src/routes): `src/routes`
- [SQL database](https://github.com/kodaqow/studyflow-app/tree/main/database): `database`

### Other components

- **Lecturers**
- **Students**

## Connections

- Lecturers → Lecturer interface: use authoring (evidence: `README.md`)
- Lecturer interface → Course authoring: create courses (evidence: `README.md`)
- Lecturer interface → Access codes: generate codes (evidence: `README.md`)
- Lecturer interface → Study materials: upload materials (evidence: `README.md`)
- Lecturers → Flashcards: create sets (evidence: `README.md`)
- Lecturers → Quizzes: create questions (evidence: `README.md`)
- Students → Student interface: use learning tools (evidence: `README.md`)
- Student interface → Course joining: join by code (evidence: `README.md`)
- Student interface → Material review: view materials (evidence: `README.md`)
- Student interface → Flashcards: practice terms (evidence: `README.md`)
- Student interface → Quizzes: take quizzes (evidence: `README.md`)
- Student interface → Pomodoro timer: use timer (evidence: `README.md`)
- Express server → Landing page: serves page (evidence: `src/server.js`)
- Express server → Landing script: serves static files (evidence: `src/server.js`)
- Express server → API routes: planned route mount (evidence: `src/server.js`)
