Skip to content

About

A small web app for keeping track of students, subjects, and grades. Built with Flask and SQLite no external database or build step, so it runs anywhere Python does.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Management System

A small web app for keeping track of students, subjects, and grades. Built with Flask and SQLite — no external database or build step, so it runs anywhere Python does.

Features

  • Students — add, edit, delete, and view a student's full record (student number, name, email, program, year level, status).
  • Search and filters — look up students by name, student number, or email, and narrow the list by status or program.
  • Subjects — manage course code, title, units, and instructor, with a class list per subject.
  • Enrollment — enroll a student in a subject for a given term, with a guard against enrolling them twice in the same subject and term.
  • Grades and GWA — record grades on the Philippine 1.00–5.00 scale and see the general weighted average, computed by units and ignoring ungraded subjects.
  • Dashboard — totals for students, subjects, enrollments, subjects still awaiting grades, and a breakdown by student status.
  • Validation — every form checks its input and reports problems per field; student numbers and emails are unique.

Requirements

Python 3.9 or newer.

Setup

python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Running

python seed.py       # optional: reset the database and load sample records
python run.py

Then open http://127.0.0.1:5000.

The database file is created automatically at instance/sms.sqlite on first run. To wipe it and start from an empty schema:

FLASK_APP=app flask init-db

Configuration

Variable Default Purpose
SMS_DATABASE instance/sms.sqlite Path to the SQLite file
SECRET_KEY dev-secret-change-me Flask session signing key
HOST 127.0.0.1 Address run.py binds to
PORT 5000 Port run.py listens on

Set a real SECRET_KEY before deploying this anywhere public.

Tests

pytest

32 tests cover the CRUD routes, validation and uniqueness rules, search and filters, grade handling, GWA computation, and cascading deletes.

Grading scale

Grades follow the common Philippine university scale: 1.00 is the highest, 3.00 is the lowest passing grade, and 5.00 is a failure. Allowed values are 1.00 to 3.00 in 0.25 steps, plus 5.00. A subject can also be left ungraded, in which case it is excluded from the GWA.

The GWA is the unit-weighted average of graded subjects:

GWA = Σ(grade × units) / Σ(units)

Project layout

.
├── app/
│   ├── __init__.py        # application factory, template filters
│   ├── db.py              # SQLite connection handling, init-db command
│   ├── models.py          # all SQL queries
│   ├── schema.sql         # table definitions
│   ├── validation.py      # form validation rules
│   ├── views/             # dashboard, students, courses, enrollments
│   ├── templates/
│   └── static/style.css
├── tests/                 # pytest suite
├── run.py                 # development server
├── seed.py                # sample data
└── requirements.txt

Data model

  • students — one row per student; student_number and email are unique.
  • courses — one row per subject; code is unique.
  • enrollments — links a student to a subject for a term, with an optional grade. Unique on (student, subject, term), and rows are removed automatically when either the student or the subject is deleted.

About

A small web app for keeping track of students, subjects, and grades. Built with Flask and SQLite no external database or build step, so it runs anywhere Python does.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages