|
| 1 | +# Sprint 2 Review |
| 2 | + |
| 3 | +**Sprint:** 2 |
| 4 | +**Dates:** 19–29 December 2025 |
| 5 | +**Duration:** ~6 working days (including Christmas break) |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Summary |
| 10 | + |
| 11 | +Sprint 2 focused on authentication and event management foundations. Completed magic link auth with role-based protection, Resend email integration, and Events CRUD service. AP-17 (admin events page) was partially completed and refined after discovering additional requirements for public events. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Metrics |
| 16 | + |
| 17 | +| Metric | Value | |
| 18 | +|--------|-------| |
| 19 | +| Planned | 9 tickets, 18 story points | |
| 20 | +| Completed | 7 tickets, 12 story points | |
| 21 | +| Carried Over | 1 ticket (AP-17), partially done | |
| 22 | +| Velocity | 12 points | |
| 23 | +| Commits | 67 | |
| 24 | +| PRs Merged | 7 (#2–#8) | |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## Completed Tickets |
| 29 | + |
| 30 | +| Key | Summary | Points | Status | |
| 31 | +|-----|---------|--------|--------| |
| 32 | +| AP-10 | Create Events table in Airtable | 1 | Done | |
| 33 | +| AP-11 | Add Event link field to Attendance table | 1 | Done | |
| 34 | +| AP-12 | Create Staff table in Airtable | 1 | Done | |
| 35 | +| AP-13 | Set up Resend email integration | 2 | Done | |
| 36 | +| AP-14 | Implement magic link authentication | 3 | Done | |
| 37 | +| AP-15 | Role-based route protection (SvelteKit hooks) | 2 | Done | |
| 38 | +| AP-16 | Event service module (Airtable CRUD) | 2 | Done | |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Carried Over |
| 43 | + |
| 44 | +| Key | Summary | Points | Progress | |
| 45 | +|-----|---------|--------|----------| |
| 46 | +| AP-17 | Admin events page (cohort events, registered users) | 2 | ~25% - load function created | |
| 47 | + |
| 48 | +**Reason:** During implementation, we discovered the need to handle public events (no cohort) and external attendees (not in Airtable). Story was split to deliver incrementally. |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## New Ticket Created |
| 53 | + |
| 54 | +| Key | Summary | Points | |
| 55 | +|-----|---------|--------| |
| 56 | +| AP-19 | Public events and external attendee check-in | 3 | |
| 57 | + |
| 58 | +Split from AP-17 to handle: |
| 59 | +- Events without cohort (open to all) |
| 60 | +- External Name/Email fields on Attendance table |
| 61 | +- Public check-in flow for unregistered attendees |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## Deliverables |
| 66 | + |
| 67 | +**Authentication System:** |
| 68 | +- Magic link auth with 15-min JWT tokens |
| 69 | +- Separate staff/student login flows |
| 70 | +- 90-day session cookies |
| 71 | +- `src/lib/server/auth.ts` — token generation/verification |
| 72 | +- `src/lib/server/session.ts` — cookie helpers |
| 73 | + |
| 74 | +**Route Protection:** |
| 75 | +- `src/hooks.server.ts` — middleware for protected routes |
| 76 | +- `/admin/*` → staff only |
| 77 | +- `/checkin` → any authenticated user |
| 78 | +- Login pages redirect if already authenticated |
| 79 | + |
| 80 | +**Email Integration:** |
| 81 | +- Resend configured for magic link delivery |
| 82 | +- `src/lib/server/email.ts` — email service |
| 83 | +- Environment variable for sender email |
| 84 | + |
| 85 | +**Events Service:** |
| 86 | +- Full CRUD operations in `src/lib/airtable/events.ts` |
| 87 | +- TypeScript types in `src/lib/types/event.ts` |
| 88 | +- Unit tests with Vitest mocks |
| 89 | +- Manual test script for verification |
| 90 | + |
| 91 | +**Schema Updates:** |
| 92 | +- Events table with Name, DateTime, Cohort, EventType, Survey fields |
| 93 | +- Attendance → Event link field |
| 94 | +- Staff table with singleCollaborator field |
| 95 | +- Updated `docs/schema.md` with relationships diagram |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## Key Decisions |
| 100 | + |
| 101 | +1. **Separate login flows:** Staff and students have distinct endpoints and pages for clearer UX |
| 102 | +2. **Field IDs over names:** All Airtable queries use field IDs to prevent breakage if fields are renamed |
| 103 | +3. **Factory pattern:** Airtable clients use factory functions for testability |
| 104 | +4. **Story splitting:** AP-17 split into cohort-specific (AP-17) and public events (AP-19) for incremental delivery |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## Design Decision: External Attendees |
| 109 | + |
| 110 | +Discovered during AP-17 that we need to support: |
| 111 | +- Open events (no cohort) visible to everyone |
| 112 | +- External attendees not registered in Airtable |
| 113 | + |
| 114 | +**Solution:** Add `External Name` and `External Email` fields to Attendance table. |
| 115 | + |
| 116 | +| Field | Registered User | External User | |
| 117 | +|-------|-----------------|---------------| |
| 118 | +| Apprentice (link) | ✓ Populated | Empty | |
| 119 | +| External Name | Empty | ✓ Populated | |
| 120 | +| External Email | Empty | ✓ Populated | |
| 121 | + |
| 122 | +Each attendance record has either an Apprentice link OR External fields (not both). |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## Risks Identified |
| 127 | + |
| 128 | +| Risk | Mitigation | |
| 129 | +|------|------------| |
| 130 | +| Public check-in abuse | Rate limiting, time-window validation | |
| 131 | +| EventType changes in Airtable | Documented in README, requires code update | |
| 132 | +| filterByFormula uses field names | Documented which queries use names vs IDs | |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +## Retrospective Notes |
| 137 | + |
| 138 | +**What went well:** |
| 139 | +- Authentication system working end-to-end |
| 140 | +- Clean separation of concerns (auth, session, email, events) |
| 141 | +- Good test coverage for auth and events modules |
| 142 | +- Sprint review caught scope gap early |
| 143 | + |
| 144 | +**What could improve:** |
| 145 | +- Initial story estimation missed public events requirement |
| 146 | +- Christmas break disrupted momentum |
| 147 | + |
| 148 | +**Action items for Sprint 3:** |
| 149 | +- Complete AP-17 (admin events page for cohort events) |
| 150 | +- Implement AP-18 (event create/edit/delete UI) |
| 151 | +- Begin AP-19 (public events + external check-in) if time permits |
| 152 | + |
| 153 | +--- |
| 154 | + |
| 155 | +## Next Sprint Focus |
| 156 | + |
| 157 | +Sprint 3 will deliver the complete event management system and full check-in flow: |
| 158 | + |
| 159 | +**Event Management:** |
| 160 | +- AP-17: Admin events page (display, filter by cohort) |
| 161 | +- AP-18: Event create/edit/delete UI |
| 162 | + |
| 163 | +**Check-in Flow:** |
| 164 | +- AP-19: Public events + external attendee check-in |
| 165 | +- Attendance service module (record check-ins to Airtable) |
| 166 | +- Check-in UI for registered users (staff/students) |
| 167 | + |
| 168 | +With authentication, route protection, and Events CRUD foundations in place, the project has momentum to deliver end-to-end functionality. |
0 commit comments