# k3maal/mobile-app-with-flask architecture

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

- Interactive diagram: https://gitdiagram.com/k3maal/mobile-app-with-flask
- Repository: https://github.com/k3maal/mobile-app-with-flask

## Overview

This is a student–teacher project tracking application. Students register or sign in, create projects with learning goals and work-process selections, then edit, complete, and review them; teachers browse projects, make startup and final decisions, and send feedback. The React client routes these workflows through a fetch-based API to Flask endpoints backed by SQLite. The README is empty, so capabilities and relationships below are based on the supplied source excerpts and SOURCE INDEX; unsampled components are not assumed to have additional behavior.

Main entry points: [`frontend/src/services/api.js`](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/services/api.js) (HTTP API client), [`frontend/src/App.jsx`](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/App.jsx) (App routes), [`backend/app.py`](https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/app.py) (Flask app), [`frontend/src/pages/Login.jsx`](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/Login.jsx) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["App routes<br/>[App.jsx]"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_navbar["Role navigation<br/>[Navbar.jsx]"]
  node_api["HTTP API client<br/>[api.js]"]
end

subgraph group_student["Student workflow"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_register["Registration<br/>[Register.jsx]"]
  node_studentdash["Student dashboard"]
  node_create["Project creation<br/>[CreateProject.jsx]"]
end

subgraph group_teacher["Teacher workflow"]
  node_detail["Project detail<br/>[ProjectDetail.jsx]"]
  node_teacherdash["Teacher dashboard"]
end

subgraph group_server["Flask services"]
  node_flask["Flask app<br/>[app.py]"]
  node_authroutes["Account endpoints<br/>[auth.py]"]
  node_studentroutes["Student project endpoints<br/>[student.py]"]
  node_teacherroutes["Teacher endpoints<br/>[docent.py]"]
  node_database[("SQLite data<br/>[database.py]")]
end

node_user(("Student / teacher"))

node_user -->|"signs in"| node_login
node_user -->|"creates account"| node_register
node_user -->|"submits project"| node_create
node_user -->|"reviews project"| node_detail
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_studentdash
node_app -->|"routes to"| node_teacherdash
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_detail
node_navbar -->|"reads session"| node_authstate
node_login -->|"calls login"| node_api
node_login -->|"sets session"| node_authstate
node_register -->|"registers account"| node_api
node_studentdash -->|"loads projects"| node_api
node_create -->|"creates project"| node_api
node_detail -->|"manages project"| node_api
node_teacherdash -->|"loads projects"| node_api
node_api -->|"HTTP account calls"| node_authroutes
node_api -->|"HTTP student calls"| node_studentroutes
node_api -->|"HTTP teacher calls"| node_teacherroutes
node_flask -->|"registers blueprint"| node_authroutes
node_flask -->|"registers blueprint"| node_studentroutes
node_flask -->|"registers blueprint"| node_teacherroutes
node_flask -->|"initializes schema"| node_database
node_authroutes -->|"reads and writes"| node_database
node_studentroutes -->|"reads and writes"| node_database
node_teacherroutes -->|"reads and writes"| node_database

click node_app "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/App.jsx"
click node_authstate "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/context/AuthContext.jsx"
click node_navbar "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/components/Navbar.jsx"
click node_login "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/Login.jsx"
click node_register "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/Register.jsx"
click node_studentdash "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/StudentDashboard.jsx"
click node_create "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/CreateProject.jsx"
click node_detail "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/ProjectDetail.jsx"
click node_teacherdash "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/TeacherDashboard.jsx"
click node_api "https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/services/api.js"
click node_flask "https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/app.py"
click node_authroutes "https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/routes/auth.py"
click node_studentroutes "https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/routes/student.py"
click node_teacherroutes "https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/routes/docent.py"
click node_database "https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/database.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_app,node_authstate,node_navbar,node_api toneBlue
class node_login,node_register,node_studentdash,node_create toneAmber
class node_detail,node_teacherdash toneMint
class node_flask,node_authroutes,node_studentroutes,node_teacherroutes,node_database toneRose
class node_user toneIndigo
```

## Components

### React client

- [App routes](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth state](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Role navigation](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [HTTP API client](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Student workflow

- [Sign in](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Registration](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/Register.jsx): `frontend/src/pages/Register.jsx`
- [Student dashboard](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/StudentDashboard.jsx): `frontend/src/pages/StudentDashboard.jsx`
- [Project creation](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/CreateProject.jsx): `frontend/src/pages/CreateProject.jsx`

### Teacher workflow

- [Project detail](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/ProjectDetail.jsx): `frontend/src/pages/ProjectDetail.jsx`
- [Teacher dashboard](https://github.com/k3maal/mobile-app-with-flask/blob/main/frontend/src/pages/TeacherDashboard.jsx): `frontend/src/pages/TeacherDashboard.jsx`

### Flask services

- [Flask app](https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/app.py): `backend/app.py`
- [Account endpoints](https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/routes/auth.py): `backend/routes/auth.py`
- [Student project endpoints](https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/routes/student.py): `backend/routes/student.py`
- [Teacher endpoints](https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/routes/docent.py): `backend/routes/docent.py`
- [SQLite data](https://github.com/k3maal/mobile-app-with-flask/blob/main/backend/database.py): `backend/database.py`

### Other components

- **Student / teacher**

## Connections

- Student / teacher → Sign in: signs in
- Student / teacher → Registration: creates account
- Student / teacher → Project creation: submits project (evidence: `frontend/src/pages/CreateProject.jsx`)
- Student / teacher → Project detail: reviews project (evidence: `frontend/src/pages/ProjectDetail.jsx`)
- App routes → Sign in: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Registration: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Student dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Teacher dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Project creation: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Project detail: routes to (evidence: `frontend/src/App.jsx`)
- Role navigation → Auth state: reads session (evidence: `frontend/src/components/Navbar.jsx`)
- Sign in → HTTP API client: calls login (evidence: `frontend/src/pages/Login.jsx`)
- Sign in → Auth state: sets session (evidence: `frontend/src/pages/Login.jsx`)
- Registration → HTTP API client: registers account (evidence: `frontend/src/pages/Register.jsx`)
- Student dashboard → HTTP API client: loads projects (evidence: `frontend/src/pages/StudentDashboard.jsx`)
- Project creation → HTTP API client: creates project (evidence: `frontend/src/pages/CreateProject.jsx`)
- Project detail → HTTP API client: manages project (evidence: `frontend/src/pages/ProjectDetail.jsx`)
- Teacher dashboard → HTTP API client: loads projects (evidence: `frontend/src/pages/TeacherDashboard.jsx`)
- HTTP API client → Account endpoints: HTTP account calls (evidence: `frontend/src/services/api.js`)
- HTTP API client → Student project endpoints: HTTP student calls (evidence: `frontend/src/services/api.js`)
- HTTP API client → Teacher endpoints: HTTP teacher calls (evidence: `frontend/src/services/api.js`)
- Flask app → Account endpoints: registers blueprint (evidence: `backend/app.py`)
- Flask app → Student project endpoints: registers blueprint (evidence: `backend/app.py`)
- Flask app → Teacher endpoints: registers blueprint (evidence: `backend/app.py`)
- Flask app → SQLite data: initializes schema (evidence: `backend/app.py`)
- Account endpoints → SQLite data: reads and writes (evidence: `backend/routes/auth.py`)
- Student project endpoints → SQLite data: reads and writes (evidence: `backend/routes/student.py`)
- Teacher endpoints → SQLite data: reads and writes (evidence: `backend/routes/docent.py`)
