Skip to content

A backend system for tracking student attendance with role-based access, validated status handling (present, absent, tardy), bulk and single-entry support, and reporting tools. Built with Flask, SQLAlchemy, and SQLite.

Notifications You must be signed in to change notification settings

Tikondwe138/attendance-app

Repository files navigation

Attendance System

Overview

This document outlines the progress and implementation details of the Attendance System project, specifically reflecting the completion of Task 3. This task focused on enabling accurate attendance tracking, data validation, and report generation for both individual students and entire classes.


✅ Task 3: What Was Required and How It's Now Met

Requirement Completed Explanation
User Roles (student/admin) Basic login system using a simulated in-memory structure with roles.
Attendance Status Enforcement Accepted statuses (present, absent, tardy) are enforced via a defined Enum.
Record Attendance (Single & Bulk) Students can self-mark; admins can mark attendance in bulk for classes.
Avoid Duplicates System checks for existing records before inserting new ones.
Reports & Summaries Functions return summaries by student and subject, including attendance rates.
Filtered Lists Can retrieve attendance records filtered by status, subject, and date range.
Model Relationships Bidirectional SQLAlchemy relationship between Student and Attendance models implemented.

Features Completed

  • Attendance Recording
    • Single attendance (per student) with validation.
    • Bulk attendance (per class) with duplicate checking.
  • Status Handling
    • Centralized enum to define accepted statuses.
    • Consistent enforcement across all logic layers.
  • Reporting System
    • Attendance summaries for a student between date ranges.
    • Class-level attendance rate percentage.
    • Filterable list for absent/tardy records.
  • Data Modeling
    • Proper use of SQLAlchemy relationships between students and their attendance records.
  • Error Handling
    • Database rollback and custom error messages for all failure scenarios.

What Still Needs Work (Future Tasks)

  1. Replace In-Memory Login

    • Move to a database-driven authentication system.
    • Implement hashed passwords, role-based access, and session management.
  2. Frontend Integration

    • Currently back-end focused. A frontend UI should be built or connected.
  3. Access Controls

    • Restrict which users can view or modify which data (based on role).
  4. Data Validation and UX Improvements

    • Add client-side form validation.
    • Display cleaner messages in the frontend on success or failure.
  5. Testing

    • Unit tests for attendance services and reporting logic.
    • Integration testing for routes once a UI or API is added.

How to Install and Run the System

1. Clone the Repository

git clone [your-repo-url]
cd attendance-app

About

A backend system for tracking student attendance with role-based access, validated status handling (present, absent, tardy), bulk and single-entry support, and reporting tools. Built with Flask, SQLAlchemy, and SQLite.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published