================================================================ HOMEWORK 2 — Full-Stack CRUD: Class Attendance App ================================================================ Course: Web Technologies Topics: Lectures 6, 7, 8 (React, Databases, Backend APIs) Weight: 15% of course mark Due: Friday Week 11, 23:59 EAT Submit: Single GitHub repo URL (monorepo) on Moodle ---------------------------------------------------------------- BRIEF ---------------------------------------------------------------- Build a small two-tier app a lecturer could use to mark attendance. Stack (pick ONE backend; frontend must be React): - Backend: Spring Boot OR Node/Express OR Django REST - Database: PostgreSQL or SQLite - Frontend: React + Vite ---------------------------------------------------------------- DATA MODEL (minimum) ---------------------------------------------------------------- courses (id, code, title, semester) students (id, name, email UNIQUE, course_id REFERENCES courses) sessions (id, course_id, date) attendance (session_id, student_id, present BOOLEAN, PRIMARY KEY composite) ---------------------------------------------------------------- REQUIRED FEATURES ---------------------------------------------------------------- 1. Manage courses (CRUD) 2. Manage students per course (CRUD) 3. Create a session for a course on a given date 4. Mark attendance for a session: list of enrolled students with checkbox 5. Reports view: per student, total sessions and % attended 6. Search/filter on the student list ---------------------------------------------------------------- TECHNICAL REQUIREMENTS ---------------------------------------------------------------- Backend: - Layered: controller -> service -> repository - Validation on all create/update bodies - Proper status codes (201, 204, 400, 404) - At least one endpoint with a JOIN-based query (the report) - Parameterised queries / ORM only -- NO string-concat SQL Frontend: - React with React Router (at least 4 routes) - Loading / Empty / Error states - Forms with controlled inputs and basic validation - Centralised api.js for all HTTP calls Repo: - Monorepo with /backend and /frontend - Top-level README with run instructions for both - .env.example committed; .env in .gitignore ---------------------------------------------------------------- GRADING (100 marks) ---------------------------------------------------------------- Schema correctness ................ 10 Backend CRUD endpoints ............ 25 Validation + error handling ....... 10 Report endpoint (JOIN query) ...... 10 React UI matches API .............. 20 Forms + UI states ................. 10 Code quality + structure .......... 10 README + setup works .............. 5 ---------------------------------------------------------------- BONUS (max +10) ---------------------------------------------------------------- - Authentication (JWT) so only logged-in lecturers can change data - Export the report as CSV - Deploy live on Render/Fly.io (link in README)