Official Timetable Management & Bounded CSP Scheduling Platform
Developed for the Directorate of Academic Planning (DAP) and Faculty Timetable Committees, Federal University Dutse (FUD), Jigawa State, Nigeria.
"Knowledge, Excellence & Service"
The Automated Timetable Management System (ATMS) is an institutional-grade, multi-tenant scheduling platform engineered for Federal University Dutse. Designed according to the Secure Software Development Lifecycle (SSDLC) and OWASP Top 10 principles, it automates conflict-free timetable generation across all university faculties, enforces strict Senate scheduling policies, and provides dedicated portals for administrators, academic staff, and students.
- Primary / Action: FUD Institutional Forest Green (
#1B4D3E) - Secondary / Accent: Earthy Warm Brown (
#5C4033) - Base Background: Clean Off-White (
#F8F9FA) - Borders & Dividers: Slate Gray (
#E2E8F0)
- University Central Admin (DAP):
- University-wide dashboard tracking timetables, venue capacities, and faculty readiness across all faculties.
- Institutional Senate optimization tuner for soft-constraint weights (student gap penalties, lecturer preference weights, travel distance minimization).
- Official inter-admin dispatch communications channel with faculty officers.
- Institutional immutable audit log viewer with category and severity filters.
- Mass publish/rollback controls with status synchronization.
- Faculty Admin (Timetable Officer):
- Faculty-specific dashboard managing faculty resource pools (lecture halls, theatres, laboratories, courses, lecturers).
- Multi-step timetable generation wizard with live constraint parameter tuning.
- Interactive schedule matrix supporting dynamic cohort level filtering (
100Lto500LandALL). - Pessimistic slot override modal with real-time pre-commit conflict feedback.
- Lecturer schedule adjustment request inbox with atomic approval/rejection workflows.
- Lecturer Portal:
- Personalized weekly teaching commitment matrix across all 6 operational days.
- Dynamic contact hour metrics tracking compliance with the Senate 12-hour weekly teaching ceiling.
- Weekly slot availability preference submission matrix.
- Structured schedule change request submission and ticket status tracking.
- Student Portal:
- Clean, read-only personal timetable matrix and mobile-first agenda stream.
- Dynamic cohort level filter (
100L,200L,300L,400L,500L). - Conflict reporting form alerting Faculty Timetable Officers of emergency issues.
- A4 Landscape Print View: High-contrast, single-page printout with official FUD letterhead, metadata strip, and authorized sign-off blocks.
- Bounded Heuristic CSP Engine:
- Implements Backtracking Search with Forward Checking and Minimum Remaining Values (MRV) heuristic ordering.
- DoS Protection & Computational Bounds: Hard caps on search tree exploration (
MAX_NODES = 25,000) and execution duration (TIME_BUDGET_SECONDS = 15.0s), cleanly rolling back transactions without hanging worker processes.
- Senate Policy Hard Constraints:
- Full 6-Day Operating Week: Schedules courses across Monday (0) through Saturday (5).
- Friday Juma'at Prayer Blackout: Strict 12:30 PM β 2:00 PM blackout window enforced in heuristic domains, validation API, and manual overrides.
- Venue Capacity Guard: Rejects allocations where
venue.capacity < course.expected_capacity. - Collision Elimination: Prevents double-booking of venues, lecturers, or student cohorts across all faculties.
- Pessimistic Database Row Locking:
- Manual overrides in
scheduling/services.pyacquire row-level locks viaselect_for_update()on targetTimetable,Allocation, andVenuerecords insidewith transaction.atomic():. - Hard invariants re-evaluated atomically on the server before mutating state.
- Manual overrides in
- Persistence Layer UniqueConstraints:
unique_timetable_venue_slot: Guarantees no venue double-booking.unique_timetable_lecturer_slot: Guarantees no simultaneous lecturer assignment.unique_timetable_course_slot: Guarantees no course double-allocation.
- Authorization & Tenancy Scoping (BOLA/IDOR):
- Zero client-side role toggling: roles are exclusively governed by server-authenticated
request.user.role. @role_requiredand@faculty_scoped_requireddecorators restrict faculty officers strictly torequest.user.faculty_id.- Lookups in inbox actions (
faculty_inbox_approve,faculty_inbox_reject) are scoped toallocation__timetable__faculty=request.user.faculty.
- Zero client-side role toggling: roles are exclusively governed by server-authenticated
- Constant-Time Authentication & Anti-Enumeration:
- PBKDF2 dummy hash calculation executed on non-existent or locked accounts to equalize response latency against timing attacks.
- Strict uniform response:
"Invalid credentials."across all authentication failure modes. - Sliding-window IP rate limiting: hard cap of 20 attempts per 60 seconds in Django cache.
- Account lockout: 5 consecutive failed login attempts locks account for 15 minutes.
- Zero test credentials, passwords, or tokens in template markup or comments.
- CSRF & State Mutation:
- All state-changing actions (
/logout/, overrides, generation, tickets, resets) enforcePOSTwith{% csrf_token %}. - Global JavaScript fetch interceptor in
base.htmlautomatically injectsX-CSRFTokenheader on all AJAX calls.
- All state-changing actions (
- XSS & Template Escaping:
- Verified 0 instances of
|safeon user-controlled inputs. - Django automatic HTML escaping active across all rendered contexts.
- Verified 0 instances of
- Browser Defense Headers:
Content-Security-Policy (CSP)X-Frame-Options: DENYX-Content-Type-Options: nosniff- Secure, HttpOnly, SameSite session and CSRF cookies.
| Layer | Technologies |
|---|---|
| Backend Framework | Django 5.x (Python 3.12+) |
| Database | SQLite (Development) / PostgreSQL-compatible (Production) |
| Frontend UI | Django Server-Side Rendered (SSR) HTML5 |
| Styling | Tailwind CSS (FUD Institutional Theme) |
| Typography | Inter (Google Fonts) |
| Scheduling Algorithm | Constraint Satisfaction Problem (CSP) with MRV & Forward Checking |
| Cache & Throttling | Django LocMemCache / Redis |
| Accessibility | WCAG 2.1 AA Compliant (Skip links, accessible <dialog>, ARIA live regions) |
- Python 3.12 or higher
- Git
git clone https://github.com/Ahmad12developer/fud-atm.git
cd fud-atmpython3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activatepip install djangopython manage.py migratePopulates the database with faculties, departments, venues, time slots, 100Lβ500L courses, lecturers, and 35 conflict-free sample allocations:
python manage.py seed_fud_dataVerify that all 61 automated tests pass:
python manage.py testpython manage.py runserverVisit http://127.0.0.1:8000/ in your browser.
For local evaluation and testing, the database includes pre-provisioned institutional roles:
| Role | Institutional ID / Username | Department / Faculty | Scope & Capabilities |
|---|---|---|---|
| Central Admin | FUD/ADM/2024/001 |
Directorate of Academic Planning (DAP) | University-wide overview, Senate tuner, audit logs, mass publish |
| Faculty Admin | FUD/SCI/2024/014 |
Faculty of Computing & Information Tech | Resource pools, timetable generation, matrix overrides, ticket inbox |
| Lecturer | FUD/LEC/2024/088 |
Computer Science | 6-day teaching schedule, availability submission, ticket requests |
| Student | FUD/CST/21/0456 |
Computer Science (300L) | Read-only timetable matrix, level filter (100L-500L), A4 export |
The test suite covers schema invariants, authentication, authorization, BOLA mitigation, race conditions, scheduler bounds, and template rendering:
$ python manage.py test
Found 61 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
.............................................................
----------------------------------------------------------------------
Ran 61 tests in 5.102s
OK
Destroying test database for alias 'default'...FudInstitutionalModelTests: Verifies relational integrity, foreign key protections, and user scoping constraints.FudSecurityAndAuthServiceTests: Validates constant-time dummy hashing, account lockout after 5 attempts, sliding-window IP throttling, and audit logging.FudRbacAccessControlTests: Verifies role decorators and tenant isolation across all endpoints.FudSlotPreCommitValidationEngineTests: Tests Friday Juma'at prayer lockout, room capacity deficit rejection, and cohort clash detection.FudBoundedSchedulerTests: Tests MRV heuristic solver and DoS timeout guard execution.FudZeroCompromiseSecurityTests: Validates pessimistic locking (select_for_update), BOLA cross-faculty rejection, and security headers.FudRemediationAndHardeningTests: Validates 6-day schedule grid, dynamic level filtering (100Lβ500L), databaseUniqueConstraints, POST-only state changes, and read-only student views.
fud-atm/
βββ accounts/ # Authentication service alias exports
β βββ auth_service.py
βββ core/ # Core authorization and permissions alias
β βββ permissions.py
βββ scheduling/ # Timetable scheduling service aliases
β βββ scheduler.py
β βββ services.py
βββ fud_atms/ # Django project configuration & WSGI
β βββ settings.py # Security headers, CSP, cookie policies
β βββ urls.py # Root URL dispatcher
β βββ wsgi.py
βββ templates/ # Server-Side Rendered Django Templates
β βββ base.html # Shell, WCAG 2.1 AA skip links, global CSRF fetch interceptor
β βββ auth/ # Login portal
β βββ central_admin/ # DAP university dashboard, tuner, audit, comms
β βββ faculty_admin/ # Matrix, resources, generator stepper, inbox
β βββ lecturer/ # Teaching schedule, availability, ticket forms
β βββ student/ # Student timetable, level filter, A4 print export
β βββ components/ # Topbar, sidebar, audit badges, confirmation modal
βββ timetable/ # Primary Django application module
β βββ models.py # Relational data schema & UniqueConstraints
β βββ views.py # Authenticated, tenant-scoped controller endpoints
β βββ auth_service.py # Constant-time authentication & anti-enumeration
β βββ middleware.py # SecurityHeadersMiddleware & sliding-window throttle
β βββ audit.py # Immutable institutional audit logging
β βββ urls.py # Route definitions & REST validation endpoints
β βββ tests.py # 61 comprehensive automated test cases
β βββ management/commands/ # seed_fud_data command
β βββ scheduling/ # Bounded heuristic solver & atomic allocation services
βββ static/ # CSS stylesheets and institutional assets
βββ manage.py # Django CLI management entrypoint
βββ README.md # Project documentation & reference guide
Copyright Β© 2026 Federal University Dutse (FUD), Jigawa State, Nigeria.
All rights reserved. Directorate of Academic Planning (DAP).