|
| 1 | +# Events — Bounded Context |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +Manages event participation lifecycle: enrollment, check-in, attendance tracking, and XP reward dispatching. Covers in-person meetups, workshops, and multi-day conferences. |
| 6 | + |
| 7 | +## Glossary |
| 8 | + |
| 9 | +| Term | Definition | Not to be confused with | |
| 10 | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | |
| 11 | +| **Event** | A scheduled gathering (meetup, workshop, or conference) owned by a tenant. Defined by type, date range, location, and an enrollment policy. | "Event" as in Laravel Event (domain event) — use "domain event" for those. | |
| 12 | +| **Enrollment** | A single record representing one user's relationship with one event. Progresses through a strict state machine from entry to terminal state. One enrollment per (user, event). | "Registration" — we don't use this term. | |
| 13 | +| **Enrollment Policy** | A 1:1 configuration record attached to an event. Defines enrollment method, capacity, check-in method, waitlist behavior, cancellation deadline, XP rewards, and application form schema. | "Event settings" — policy specifically governs participation rules. | |
| 14 | +| **Enrollment Method** | How a user enters an event. One of: `rsvp` (1-click), `rsvp_checkin` (1-click + mandatory presence verification), `application` (form submission + organizer approval). | | |
| 15 | +| **Check-in** | Verification of physical/virtual presence at an event. One record per (enrollment, date). Methods: `manual`, `numeric_code`, `qr_code`. | "Enrollment" — check-in proves presence, enrollment proves intent. | |
| 16 | +| **Numeric Code** | A short-lived code announced by the organizer (projected on screen or spoken in stream). Bound to a specific event date. Has expiration window and optional max uses. Also used by Discord/Twitch bots as check-in trigger. | | |
| 17 | +| **QR Token** | A unique token generated per enrollment. Encoded in a QR code on the participant's badge/screen. Reusable across event days — each scan creates a new check-in record for that day. | | |
| 18 | +| **Waitlist** | Ordered queue of enrollments when event capacity is full. FIFO promotion when a confirmed participant cancels. | | |
| 19 | +| **Attendance Requirement** | Policy rule defining how many days of check-in are needed to achieve `attended` status. Values: `all_days`, `any_day`, `minimum_days(N)`. | | |
| 20 | +| **Transition** | An auditable state change on an enrollment. Every transition is recorded with actor, timestamp, and reason. Written by application code (Actions), never by database triggers. | | |
| 21 | +| **No-show** | Terminal state for a participant who confirmed but never checked in. Assigned automatically by a scheduled job after the event ends. No systemic consequences in MVP (future: may affect eligibility). | | |
| 22 | +| **Application** | An enrollment method where the participant submits a dynamic form (JSONB schema defined in policy) and waits for organizer approval. Results in `pending → confirmed` or `pending → rejected`. | "Submission" (CFP) — application is for participation, submission is for presenting (out of MVP scope). | |
| 23 | + |
| 24 | +## State Machine — Enrollment |
| 25 | + |
| 26 | +``` |
| 27 | +[entry] |
| 28 | + ├─ application → pending |
| 29 | + │ ├─ approve() → confirmed |
| 30 | + │ ├─ reject() → rejected (TERMINAL) |
| 31 | + │ └─ cancel() → cancelled (TERMINAL) |
| 32 | + │ |
| 33 | + ├─ rsvp/rsvp_checkin + capacity available → confirmed |
| 34 | + └─ rsvp/rsvp_checkin + full → waitlisted |
| 35 | + ├─ slot_opens() → confirmed |
| 36 | + └─ cancel() → cancelled (TERMINAL) |
| 37 | +
|
| 38 | +confirmed |
| 39 | + ├─ check_in() → checked_in |
| 40 | + ├─ cancel(pre-deadline) → cancelled (TERMINAL) |
| 41 | + └─ [job] event_ended → no_show (TERMINAL) |
| 42 | +
|
| 43 | +checked_in |
| 44 | + └─ [job] event_ended + attendance_requirement met → attended (TERMINAL · SUCCESS) |
| 45 | +``` |
| 46 | + |
| 47 | +**States:** `pending`, `confirmed`, `waitlisted`, `checked_in`, `attended`, `cancelled`, `rejected`, `no_show` |
| 48 | + |
| 49 | +**Terminal states:** `attended` (success), `cancelled`, `rejected`, `no_show` |
| 50 | + |
| 51 | +## Actors |
| 52 | + |
| 53 | +| Actor | Panel | Capabilities | |
| 54 | +| --------------- | ---------------- | ---------------------------------------------------------------------------------------------------- | |
| 55 | +| **Organizer** | Admin (`/admin`) | Creates events, configures policies, approves/rejects applications, manual check-in, status override | |
| 56 | +| **Participant** | App (`/app`) | Enrolls (RSVP/application), checks in (code/QR), cancels, views own events | |
| 57 | + |
| 58 | +## Module Boundaries |
| 59 | + |
| 60 | +- **Events → Gamification**: Events dispatches domain events (`EnrollmentConfirmed`, `ParticipantCheckedIn`, `ParticipantAttended`). Gamification listens and awards XP. Events does not know how XP works. |
| 61 | +- **Bot Discord → Events**: Bot dispatches domain events (e.g., `CheckInRequested`). Events module listens and processes. Bot is transport, Events owns the rules. |
| 62 | +- **Events → Identity**: Events reads User and Tenant models. No writes to Identity. |
| 63 | + |
| 64 | +## Out of Scope (MVP) |
| 65 | + |
| 66 | +- Networking between participants |
| 67 | +- Referral / invite links |
| 68 | +- Magic link and geolocation check-in |
| 69 | +- Sponsors association |
| 70 | +- Timeline / activity feed (listeners ready, no consumer yet) |
| 71 | +- Call for Papers / Submissions (CFP) |
| 72 | +- Agenda / schedule display |
| 73 | +- Paid events / payment integration |
| 74 | +- No-show penalties |
0 commit comments