# pragati-bansal/student-performance-analyzer architecture

> Architecture diagram of the GitHub repository pragati-bansal/student-performance-analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pragati-bansal/student-performance-analyzer
- Repository: https://github.com/pragati-bansal/student-performance-analyzer

## Overview

Student Performance Analyzer is a Flask-backed student records and academic analytics application. Users view dashboard metrics, rankings, class performance, weak subjects, and student profiles, and can enroll students or record marks. The browser calls the REST API; request handlers delegate analytics queries and mark insertion to the analysis layer, while student enrollment writes directly through the request database connection. Although the README describes MySQL, the sampled connection code uses SQLite and a repository database file. Attendance is mentioned broadly but no attendance workflow is evidenced in the sampled sources.

Main entry points: [`backend/app.py`](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/app.py) (REST API & Swagger), [`database.db`](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/database.db) (Application database), [`backend/analysis.py`](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/analysis.py) (Performance queries), [`frontend/app.js`](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/frontend/app.js) (Analytics dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser interface"]
  node_ui_analytics["Analytics dashboard<br/>[app.js]"]
  node_ui_students["Student records UI<br/>[app.js]"]
end

subgraph group_api["HTTP API"]
  node_rest_api["REST API &amp; Swagger<br/>[app.py]"]
  node_connection["Request connections<br/>[db_config.py]"]
end

subgraph group_domain["Analytics and records"]
  node_analytics["Performance queries<br/>[analysis.py]"]
  node_insights["Student insights<br/>[analysis.py]"]
  node_marks["Assessment recording<br/>[analysis.py]"]
end

subgraph group_persistence["SQLite persistence"]
  node_sqlite[("Application database<br/>[database.db]")]
  node_schema["Database schema<br/>[schema.sql]"]
  node_sample_data["Sample records<br/>[sample_data.sql]"]
end

node_user(("School user"))

node_user -->|"views"| node_ui_analytics
node_user -->|"manages"| node_ui_students
node_ui_analytics -->|"requests analytics"| node_rest_api
node_ui_students -->|"requests records"| node_rest_api
node_rest_api -->|"calls queries"| node_analytics
node_rest_api -->|"records marks"| node_marks
node_analytics -->|"generates insights"| node_insights
node_analytics -->|"queries"| node_sqlite
node_marks -->|"inserts marks"| node_sqlite
node_rest_api -->|"inserts students"| node_sqlite
node_rest_api -->|"opens requests"| node_connection
node_connection -->|"connects to"| node_sqlite

click node_ui_analytics "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/frontend/app.js"
click node_ui_students "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/frontend/app.js"
click node_rest_api "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/app.py"
click node_connection "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/db_config.py"
click node_analytics "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/analysis.py"
click node_insights "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/analysis.py"
click node_marks "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/analysis.py"
click node_sqlite "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/database.db"
click node_schema "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/database/schema.sql"
click node_sample_data "https://github.com/pragati-bansal/student-performance-analyzer/blob/main/database/sample_data.sql"

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_ui_analytics,node_ui_students,node_user toneBlue
class node_rest_api,node_connection toneAmber
class node_analytics,node_insights,node_marks toneMint
class node_sqlite,node_schema,node_sample_data toneRose
```

## Components

### Browser interface

- [Analytics dashboard](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/frontend/app.js): `frontend/app.js`
- [Student records UI](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/frontend/app.js): `frontend/app.js`

### HTTP API

- [REST API & Swagger](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/app.py): `backend/app.py`
- [Request connections](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/db_config.py): `backend/db_config.py`

### Analytics and records

- [Performance queries](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/analysis.py): `backend/analysis.py`
- [Student insights](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/analysis.py): `backend/analysis.py`
- [Assessment recording](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/backend/analysis.py): `backend/analysis.py`

### SQLite persistence

- [Application database](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/database.db): `database.db`
- [Database schema](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/database/schema.sql): `database/schema.sql`
- [Sample records](https://github.com/pragati-bansal/student-performance-analyzer/blob/main/database/sample_data.sql): `database/sample_data.sql`

### Other components

- **School user**

## Connections

- School user → Analytics dashboard: views (evidence: `frontend/app.js`)
- School user → Student records UI: manages (evidence: `frontend/app.js`)
- Analytics dashboard → REST API & Swagger: requests analytics (evidence: `frontend/app.js`)
- Student records UI → REST API & Swagger: requests records (evidence: `frontend/app.js`)
- REST API & Swagger → Performance queries: calls queries (evidence: `backend/app.py`)
- REST API & Swagger → Assessment recording: records marks (evidence: `backend/app.py`)
- Performance queries → Student insights: generates insights (evidence: `backend/analysis.py`)
- Performance queries → Application database: queries (evidence: `backend/analysis.py`)
- Assessment recording → Application database: inserts marks (evidence: `backend/analysis.py`)
- REST API & Swagger → Application database: inserts students (evidence: `backend/app.py`)
- REST API & Swagger → Request connections: opens requests (evidence: `backend/app.py`)
- Request connections → Application database: connects to (evidence: `backend/db_config.py`)
