HEAD
A fully redesigned, feature-rich attendance and performance management system. Built with Flask + SQLite + Bootstrap + Chart.js + vanilla JavaScript only — no Node.js/Express, no extra pip installs, and no internet dependency at runtime (Bootstrap and Chart.js are bundled locally).
Most classmates' projects will look like default Bootstrap. This one has:
- A real visual identity — "Academic Ledger" design (ink-navy + gold palette, serif headlines, monospace data, and a signature rubber-stamp badge for Present/Absent/Good-Standing/Shortage statuses) instead of generic Bootstrap blue.
- Trend Analytics — a line chart showing class-wide attendance % day-by-day, built from live daily-marked data.
- Leaderboard — top 3 students by current attendance %, medal-styled.
- Sortable, paginated tables — click any column header to sort; large student lists auto-paginate (8 rows/page) — no page reload needed.
- Print / Save-as-PDF — a "Print" button on the student record uses the browser's built-in print dialog with a dedicated print stylesheet, so you get a clean PDF/printout with zero extra libraries.
- Uses CDN for Bootstrap/Chart.js/Fonts — since your SEB environment stays connected to the internet, the app loads Bootstrap, Chart.js, and Google Fonts from CDN links (same as any normal website). No extra setup needed.
attendance_management_system/
├── app.py # Routes + session auth + business logic
├── import_students.py # Builds attendance.db from your CSV
├── students_data.csv # SAMPLE csv — replace with the real one
├── requirements.txt # Just "Flask"
├── templates/ # All Jinja2 pages (redesigned)
└── static/
└── css/style.css # The "Academic Ledger" design system
python -m venv venv # optional
venv\Scripts\activate # Windows
source venv/bin/activate # Mac/Linux
pip install -r requirements.txt # skip if Flask already installed
python import_students.py # replace students_data.csv with the real file first
python app.pyOpen http://127.0.0.1:5000.
| Role | Username | Password |
|---|---|---|
| Admin | admin | admin123 |
| Teacher | teacher1 | teacher123 |
| Student | student1 | student123 |
| Token | Value | Used For |
|---|---|---|
| Ink Navy | #16213E |
Navbar, headings, primary structure |
| Merit Gold | #D9A441 |
Accent, primary buttons, active states |
| Sage Good | #3C8F5F |
Present / Good Standing indicators |
| Flag Coral | #D8492F |
Absent / Shortage indicators |
| Parchment | #F7F4EC |
Page background |
The stamp badge (.stamp class in style.css) is the signature element —
a dashed-border, slightly rotated badge that mimics a teacher physically
stamping a paper register, tying the digital UI back to the real-world object
it replaces.
See effective_percentage() in app.py: uses live daily-marked data once
any exists for a student, otherwise falls back to the baseline % from the CSV.
- Admin: manage students (CRUD, sortable/paginated), view history, reports, leaderboard.
- Teacher: mark daily attendance, view history, reports, leaderboard.
- Student: view own record with baseline vs. live comparison, print/export.
- Authentication uses hand-written Flask sessions (not Flask-Login) — only Flask itself is required, matching restricted lab/SEB environments.
- To reset all data: delete
attendance.dband re-runimport_students.py.
7fa56f0d0f87b86436fc8c8dcbc6fd4a45af6977