This document specifies the Student Attendance Management System, a beginner-friendly, locally run web application built as a college mini project. Its purpose is to digitally manage student attendance: maintain student records, record attendance per class and subject, calculate attendance percentages, flag students below 75%, and produce printable attendance reports. The audience is a second-year engineering student who must build, run, demonstrate and explain the project in a viva, plus the Admin and Teacher who use it.
The product is delivered as a complete working local project: all Python, HTML, CSS and SQL files, a MySQL setup script, requirements.txt, README.md, installation instructions, VS Code run steps, sample login credentials, test cases, a project abstract, future scope and a conclusion. No unfinished placeholders or missing functions are acceptable.
The system is a Flask web application backed by a MySQL database named attendance_db, with server-rendered HTML5/CSS3/Bootstrap pages. Two human roles use it: the Admin, who manages students, teachers and subjects and sees totals on a dashboard, and the Teacher, who marks attendance and reviews records, percentages, low-attendance alerts and reports. Both authenticate with a username and password and receive role-based dashboard access; both can log out.
Current delivery is a single locally run Flask process serving all pages, connected to MySQL. The database holds the users, students, teachers, subjects and attendance tables with primary keys, foreign keys and relationships. Sample students, teachers and subjects and a default admin account are seeded for demonstration.
The application owns its identity: users sign in with a username and password stored in the users table, and the session determines whether the Admin or Teacher dashboard opens. The Landing page and the Login Module are reachable without signing in; every dashboard and management page requires a signed-in user and is restricted to the role that owns it (Admin pages for the Admin, Teacher pages for the Teacher). Logout ends the session and returns the user to the login surface.
All work is first-party and runs locally. There is no external provider, no third-party identity, and no headless delivery. The project deliberately avoids advanced technologies; the current scope is exactly the nine modules below, and anything beyond them (for example richer analytics or notifications) belongs to the stated future scope, not to current pages.
Removed from scope
The reference directive for the "10 weekly mini-project reports provided by the user" declares content_source and domain_context. The reports themselves were not supplied as verifiable content in this request, so no factual entities, fields, values, dates, contacts or media from them can be inventoried without invention. The authoritative product facts used throughout this document come from the user's development prompt, which is reproduced faithfully in the requirements, pages and flows below.
users (username, password, role).students, teachers, subjects, attendance.students (primary key, roll number, name, class, department, semester).teachers, subjects, assignment relationship between them.attendance (student, subject, date, status), students, subjects.attendance with a uniqueness rule on (student, subject, date).attendance joined to students and subjects.attendance per student.attendance filtered to percentage < 75.attendance by student and by subject.FR-1 — Admin login. As an Admin I should sign in with my username and password so that I reach the Admin dashboard. Provenance: explicit. Trigger: credentials submitted on Login Module. Result: session established with Admin role; redirect to Admin Dashboard. Failure: wrong credentials or wrong role show an error and stay on Login Module; recovery by re-entering. Continuation: sidebar navigation to Admin pages.
FR-2 — Teacher login. As a Teacher I should sign in with my username and password so that I reach the Teacher dashboard. Provenance: explicit. Trigger: credentials submitted on Login Module. Result: session established with Teacher role; redirect to the Teacher's attendance workspace. Failure: wrong credentials or role mismatch show an error; recovery by re-entering.
FR-3 — Role-based dashboard access. As a signed-in user I should only reach the dashboard and pages for my role so that Admin and Teacher work stay separated. Provenance: explicit. Trigger: navigation to a page. Result: Admin pages open for Admin, Teacher pages for Teacher; a mismatched request is refused and redirected to the correct dashboard. Failure: unauthenticated access redirects to Login Module.
FR-4 — Logout. As a signed-in user I should log out so that my session ends. Provenance: explicit. Trigger: Logout control in the top bar. Result: session cleared; return to Login Module. Continuation: sign in again.
FR-5 — Add student. As an Admin I should add a student with roll number, student name, class, department and semester so that the student is registered. Provenance: explicit. Trigger: submit the add form. Result: student saved in students and shown in the list. Failure: missing or invalid fields and duplicate roll number are rejected with inline messages; recovery by correcting and resubmitting.
FR-6 — Edit student. As an Admin I should edit a student's details so that records stay correct. Provenance: explicit. Trigger: Edit on a student row, change fields, save. Result: updated record reflected in the list. Failure: validation errors shown; recovery by correcting.
FR-7 — Delete student. As an Admin I should delete a student so that obsolete records are removed. Provenance: explicit. Trigger: Delete on a student row with confirmation. Result: record removed and list refreshed. Failure: deletion blocked if referenced where integrity requires, with a message; recovery by cancelling.
FR-8 — Validate student inputs. As an Admin I should have student inputs validated so that bad data is not stored. Provenance: explicit. Trigger: form submission. Result: required fields enforced, roll number unique, semester numeric; invalid submissions rejected with messages.
FR-9 — Admin dashboard totals. As an Admin I should see total students, total teachers, total subjects and total attendance records in statistic cards so that I understand the system at a glance. Provenance: explicit. Trigger: opening Admin Dashboard. Result: four cards populated with counts. Failure: a failed count shows a dash with retry.
FR-10 — Select class, subject and date. As a Teacher I should select a class, a subject and an attendance date so that the correct students are displayed. Provenance: explicit. Trigger: choosing the three selectors. Result: the roster of students for that class is displayed. Failure: no students for the class shows an empty message.
FR-11 — Mark Present or Absent. As a Teacher I should mark each student Present or Absent so that the day's attendance is captured. Provenance: explicit. Trigger: toggling each student's status. Result: each student has a Present or Absent state ready to save.
FR-12 — Save attendance. As a Teacher I should save the marked attendance so that it is stored in the database. Provenance: explicit. Trigger: Save. Result: rows written to attendance; confirmation shown. Failure: save error shown; recovery by retrying.
FR-13 — Prevent duplicate attendance. As the system I should prevent duplicate attendance records for the same student, subject and date so that counts stay correct. Provenance: explicit. Trigger: saving attendance that already exists for a student/subject/date. Result: duplicate blocked with a message; existing record preserved.
FR-14 — View attendance history. As a Teacher I should view attendance history in a table so that I can review past records. Provenance: explicit. Trigger: opening Attendance Records. Result: history table displayed.
FR-15 — Search by roll number. As a Teacher I should search attendance by roll number so that I can find a student's records. Provenance: explicit. Trigger: entering a roll number in the search box. Result: matching rows shown. Failure: no matches shows an empty message.
FR-16 — Filter by date. As a Teacher I should filter attendance by date so that I can review a specific day. Provenance: explicit. Trigger: choosing a date filter. Result: table filtered to that date.
FR-17 — Filter by subject. As a Teacher I should filter attendance by subject so that I can review a subject's records. Provenance: explicit. Trigger: choosing a subject filter. Result: table filtered to that subject.
FR-18 — Attendance percentage. As a Teacher I should see each student's attendance percentage computed as (Total Present Classes / Total Conducted Classes) × 100 so that I know their standing. Provenance: explicit. Trigger: opening Attendance Percentage. Result: per-student percentage with present and conducted counts. Failure: no conducted classes shows not applicable.
FR-19 — Low attendance alert. As a Teacher I should see a warning and a list of students below 75% attendance so that I can act on them. Provenance: explicit. Trigger: opening Low Attendance Alert. Result: warning message and low-attendance list with orange markers. Empty: reassuring message when none are below 75%.
FR-20 — Student-wise report. As a Teacher I should generate a student-wise attendance report with total present, total absent and percentage so that I can review a student. Provenance: explicit.
FR-21 — Subject-wise report. As a Teacher I should generate a subject-wise attendance report with total present, total absent and percentage so that I can review a subject. Provenance: explicit.
FR-22 — Print report. As a Teacher I should print an attendance report so that I have a physical copy. Provenance: explicit. Trigger: Print control. Result: print view of the current report only.
FR-23 — Add teachers. As an Admin I should add teachers so that they exist in the system. Provenance: explicit. Trigger: submit add-teacher form. Result: teacher saved and listed. Failure: validation errors shown.
FR-24 — Add subjects. As an Admin I should add subjects so that attendance can be recorded against them. Provenance: explicit. Trigger: submit add-subject form. Result: subject saved and listed. Failure: validation errors shown.
FR-25 — Assign subjects to teachers. As an Admin I should assign subjects to teachers so that responsibility is recorded. Provenance: explicit. Trigger: choosing a subject and teacher and saving the assignment. Result: assignment stored via foreign key and shown. Failure: invalid assignment rejected with a message.
FR-26 — Manage basic teacher details. As an Admin I should edit basic teacher details so that teacher records stay correct. Provenance: explicit. Trigger: edit a teacher and save. Result: updated details shown. Failure: validation errors shown.
FR-27 — MySQL schema. As the system I should use a MySQL database attendance_db with users, students, teachers, subjects and attendance tables with primary keys, foreign keys and relationships so that data is stored correctly. Provenance: explicit.
FR-28 — Consistent UI shell. As a signed-in user I should have sidebar navigation, a top navigation bar, statistic cards, clean tables, a search box, responsive design and a blue and white theme so that navigation is easy and professional. Provenance: explicit.
FR-29 — Sample data and default admin. As a demonstrator I should have sample students, teachers and subjects and a default admin account so that the project can be shown immediately. Provenance: explicit.
FR-30 — Error handling. As a user I should have errors and invalid inputs handled so that the app stays usable. Provenance: explicit. Trigger: invalid input or failed operation. Result: a clear message; recovery path offered.
FR-31 — Database and seed prerequisite. As the system I should have attendance_db and its tables created and seeded before use so that accepted journeys are executable. Provenance: required_inference. Trigger: running the MySQL setup script. Result: schema and seed data present.
FR-32 — Credential verification. As the system I should verify a username and password before protected pages open so that only signed-in users reach dashboards. Provenance: required_inference. Trigger: login submission. Result: session established only on valid credentials.
FR-33 — Deliverables. As the project author I should deliver the folder structure, source files, MySQL setup script, requirements.txt, README.md, installation instructions, VS Code run steps, sample login credentials, test cases, project abstract, future scope and conclusion so that the project is complete and explainable. Provenance: explicit.
The Admin is the records owner of the system. Their product context is the Admin Dashboard and the two management modules. Their primary goal is to keep the roster of students, teachers and subjects accurate and to see the system's totals at a glance. Distinct accepted responsibilities: adding, editing and deleting students with validated inputs (roll number, name, class, department, semester); adding teachers and subjects; assigning subjects to teachers; managing basic teacher details; and reading the four statistic cards (total students, teachers, subjects, attendance records). Relevant inputs and decisions: student field values, teacher and subject details, and assignment choices. Interactions: the Admin's records are the data the Teacher later marks attendance against, so the Admin's accuracy directly affects the Teacher's roster and reports. Observable success: the dashboard totals reflect the current records and the management tables show correct, validated entries. The Admin does not mark attendance or generate reports; those belong to the Teacher.
The Teacher is the attendance operator. Their product context is the attendance workspace: Attendance Management, Attendance Records, Attendance Percentage, Low Attendance Alert and Attendance Reports. Their primary goal is to record each class's attendance accurately and to review standing and reports. Distinct accepted responsibilities: selecting class, subject and date to display students; marking each student Present or Absent; saving attendance while duplicates for the same student, subject and date are prevented; viewing history; searching by roll number; filtering by date and subject; reading each student's percentage; reviewing the below-75% warning and list; generating student-wise and subject-wise reports with present/absent counts and percentage; and printing reports. Relevant inputs and decisions: which class, subject and date to mark, and each student's status. Interactions: the Teacher depends on the Admin's student, subject and teacher records being present. Observable success: saved attendance appears in records, percentages and reports, and low-attendance students are clearly flagged.
Failure/recovery: wrong credentials show an error and the Admin re-enters them; a failed count shows a dash with retry.
Failure/recovery: validation errors are corrected and resubmitted; a blocked deletion shows a message and the Admin cancels.
Failure/recovery: invalid entries or assignments show messages; the Admin corrects and resubmits.
attendance and confirms (FR-12).Failure/recovery: an empty roster shows a message; a save error is retried; duplicates are reported and the Teacher adjusts the selection.
Failure/recovery: no matches shows an empty message; clearing filters restores the table; no conducted classes shows not applicable.
Failure/recovery: an empty selection shows a message; the Teacher changes the selection and regenerates.
The creative direction is authoritative: functional clarity after Dieter Rams, with the requested blue and white theme used as one signal colour on warm white.
#F4F2ED (warm off-white ground)#FFFFFF (white panels)#1C1C1A (near-black)#1B4F9C (blue — sidebar, buttons, rules, 3px card top rule)#E8590C (Braun orange — low attendance only)#6E6A62 (secondary text, labels)clamp(32px, 6vw, 64px).The public entry is a split panel. The left 55% is a solid blue #1B4F9C block carrying the wordmark and one 64px white Archivo headline flush left: "Attendance records, clearly kept." The right 45% is a white card with the subline "Mark classes, track percentages and find students below 75% in one place." and the "Open dashboard" call to action routing to the Login Module. The same split-panel language carries into the Login Module, where the right card holds the username, password and labelled role switch. Statistic cards on the Admin Dashboard repeat the signature move: a 3px blue top rule, a small uppercase label, and a large tabular number. Low attendance rows carry a thin orange #E8590C left rule and an orange percentage value. Section headers sit on a full-width hairline rule with a right-aligned record count. The concept only recomposes accepted content and controls; it adds no behaviour.
Interaction Model: Static (direction) Motion Tempo: restrained Hero Dimensionality: flat
Landing Hero Motion Brief
attendance_db; duplicate attendance for the same student, subject and date prevented. Provenance: explicit.attendance_db. Provenance: explicit.requirements.txt (Flask and the MySQL connector). Provenance: explicit.attendance_db: The MySQL database holding users, students, teachers, subjects and attendance.
Student Attendance Management System
Mark classes, track percentages and find students below 75% in one place.
Manage attendance, student records, percentages and reports from the same local Flask application, backed by the attendance_db MySQL database.
Module 01
Select class, subject and date, then mark each student present or absent.
Module 02
Roll number, name, class, department and semester, kept editable and validated.
Module 03
Present classes divided by conducted classes, shown per student.
Module 04
Student-wise and subject-wise reports with present and absent totals.
Students below 75% are flagged for follow-up alongside the calculated percentages, and reports can be printed from the same records.

Student Attendance Management System
Mark classes, track percentages and find students below 75% in one place.
Manage attendance, student records, percentages and reports from the same local Flask application, backed by the attendance_db MySQL database.
Module 01
Select class, subject and date, then mark each student present or absent.
Module 02
Roll number, name, class, department and semester, kept editable and validated.
Module 03
Present classes divided by conducted classes, shown per student.
Module 04
Student-wise and subject-wise reports with present and absent totals.
Students below 75% are flagged for follow-up alongside the calculated percentages, and reports can be printed from the same records.
No comments yet. Be the first!