# Student records system

A Flask application for student records and grades, with student, teacher, and administrator roles

Source: https://works.im0o.top/en/projects/f7572ac9/
Date: 2023-04-10
End date: 2023-05-10
Status: archived
Tags: Full Stack, Python, Flask, SQLite


I built this student-records application with Flask, Peewee, and SQLite. It has student, teacher, and administrator accounts. Its pages for records, grades, and announcements vary by role. Jinja2, Layui, and jQuery provide the pages.

![The login page](https://image.im0o.top/2026/20261117104628625.webp)

## Student pages

Students sign in to a personal homepage and can view their profile, portrait, and grades. Records include student number, name, class, date of birth, and enrollment date. The grade page covers regular assessments, midterms, and finals, with ECharts for visualization.

![The student homepage](https://image.im0o.top/2026/20261117104630480.webp)

Before grades are entered, the page has an empty state. Once records exist, it shows the chart.

![The empty grade page](https://image.im0o.top/2026/20261117104634541.webp)

![Grades displayed as a chart](https://image.im0o.top/2026/20261117104632495.webp)

## Class management

Teachers can view their class list, edit records, and enter grades. For roster export, pandas prepares the columns and openpyxl writes the workbook. The endpoint returns the file data with a download filename.

Grade overview and editing have their own pages: a table for reviewing the class and an editor for changing an individual record.

## Accounts, announcements, and permissions

Administrators maintain student and teacher accounts and publish announcements. Login uses JWT, menus vary by role, and editing and deletion endpoints check the relevant role. Teachers and administrators can edit student details; adding and deleting students are administrator operations.

![Announcement management](https://image.im0o.top/2026/20261117104639080.webp)

The system also includes portrait upload and a calendar using chinesecalendar for holiday information. Announcements are published in the administration interface and displayed to users.

## Code organization

I separated page routes into app, JSON endpoints into api, tables into database, and operations such as export, grades, and menus into service. Templates and static files have their own directories. A record edit moves from the page to an endpoint, then through a service function to the database update.

![The system flow](https://image.im0o.top/2026/20261117104641337.webp)

![The database E-R diagram](https://image.im0o.top/2026/20261117104636788.webp)

