How danish1092/student_performance_analyzer works
Project type and purpose
• This is a full-stack, monolithic web application (Student Performance Analyzer) built with Python/Flask.
File structure
• Top-level entry point:
• app.py – boots the Flask server and registers routes/controllers
• Business logic:
• analysis.py – handles batch performance analysis
• student_analysis.py – encapsulates per-student analytics
• attendance.py – attendance tracking and reporting
• utils.py – auxiliary functions (e.g., CSV parsing, data cleaning)
• Routing layer:
• routes/auth_routes.py – authentication (signup, signin) and role-based access control
• Presentation:
• templates/ – Jinja2 HTML templates for landing, dashboards, forms, reports
• static/ – CSS (teacher/style/student styles), images, JS assets
• Data handling:
• (Implicit) uploads/ – folder for teachers to upload CSVs
• Pandas in backend modules for data manipulation
Key insights from README
• Two user roles: Teacher and Student, each with their own dashboard and sets of pages.
• Features split into “Performance Analysis” and “Attendance Management.”
• Stack: Flask (HTTP server + templating), Pandas (computation), front-end uses HTML/CSS/JS.
Main components
a. Client tier
• Browser (Teacher UI, Student UI)
• Static assets (CSS/JS/images served via Flask’s static folder)
b. Web server tier (Flask monolith)
• app.py / Flask application instance
• Routing layer – endpoints in auth_routes and any routes defined in app.py
• Controllers – functions that call into business logic
• Business logic modules (analysis.py, student_analysis.py, attendance.py)
• Utility layer (utils.py for shared helpers)
c. Data tier
• File system “uploads/” for incoming CSV data
• In-memory/Pandas dataframes for processing
• (Optionally a future DB if extended)
Relationships and interactions
• Browser → HTTP GET/POST → Flask routes/auth endpoints
• Auth routes → (via utils.py) validate credentials → session management
• Teacher dashboard actions:
• Upload CSV → stored in uploads/ → attendance.py or analysis.py loads CSV via utils → Pandas processes → controllers render HTML or generate plots
• Student dashboard actions:
• Authenticated GET → controllers call student_analysis.py → return JSON or rendered HTML fragment
• Static asset requests → Flask static middleware → client
Architectural patterns and principles
• MVC-style separation:
• Model = Pandas/data structures in analysis modules
• View = Jinja templates + CSS/JS
• Controller = Flask route handlers
• Single process monolith; cohesion around education domain
• Role-based access control enforced at the controller layer
• Separation of concerns: routing, business logic, utilities, presentation
Technologies & frameworks to annotate
• Frontend: HTML5, CSS3 (teacher_style.css, student_style.css), optional JS
• Backend: Python 3.x, Flask (app.py, routes), Pandas (data analysis)
• Templating: Jinja2 (in /templates)
• File I/O: CSV uploads via Flask’s file upload API, stored in /uploads
Final recommendations
• Every Python module as a distinct element.
• Uploads folder as your data store.
• Rectangles for compute modules,
• Frameworks (Flask, Pandas) next to their respective modules.