Skip to content

Commit e8083ac

Browse files
committed
first pass at tintegrating email campaigns
1 parent ac1ad48 commit e8083ac

File tree

15 files changed

+1882
-6
lines changed

15 files changed

+1882
-6
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ Create a single source of truth for operational data that keeps the team synchro
1313
- Event-level commercial registration settings including public signup toggles, deadlines, pricing, currency, and confirmation thresholds.
1414
- Public event registration pages by slug that create participant-linked registrations and default payment placeholders.
1515
- Staff registration operations pages for event-level registration lists, status changes, payment updates, and internal notes.
16+
- Event comms pages with reusable email templates, audience preview by registration/payment filters, manual campaign send, and delivery history.
1617
- Safety and compliance fields on events/innhopps (NOTAM, risk assessment, safety precautions).
1718
- RBAC-backed login sessions (OIDC) with seeded roles for core operational duties.
1819

1920
## Not yet implemented
20-
- Automated notifications and campaign email sending.
21+
- Automated notifications with background scheduling and real provider delivery.
2122
- Payment provider integrations, waivers, certifications, and health declarations.
2223
- Check-in flows or public driver route pages.
2324
- Analytics dashboards beyond raw data access.
@@ -50,6 +51,7 @@ RBAC ensures each user only sees the modules and actions needed for their duties
5051
- Configure event registration settings such as public slug, opening windows, balance deadlines, pricing, and minimum registration thresholds.
5152
- Share public `/register/:slug` links, accept self-serve signups, auto-create or match participant profiles by email, and generate deposit/balance payment placeholders from the event settings.
5253
- Open `/events/:eventId/registrations` to filter registrations by status and payment state, then drill into `/registrations/:registrationId` to update deadlines, payment records, status, and activity notes.
54+
- Open `/events/:eventId/comms` to create email templates, preview recipients for an event, send a manual campaign to filtered registrations, and review send history.
5355
- Coordinate transports, vehicles, accommodations, meals, and other logistics items per operation.
5456
- Authenticate via OIDC (authorization code flow), persist sessions in secure cookies, and enforce role-based permissions seeded on startup (Admin, Staff, Jump Master, Jump Leader, Ground Crew, Driver, Packer, Participant). Set `DEV_ALLOW_ALL=true` to bypass auth locally.
5557
- Use the frontend pages for login, events, manifests, participants, logistics, seasons, innhopp details, and airfield details (see `frontend/src/pages/` and `frontend/src/components/Layout.tsx` for the routes).
@@ -119,4 +121,4 @@ Frontend environment variables:
119121

120122
## API and UI references
121123
- Backend endpoints for seasons, events, innhopps, manifests, airfields, participants, registrations, crew assignments, logistics transports, and auth are documented in `backend/README.md`.
122-
- Frontend routes include `/login`, `/register/:slug`, `/events`, `/events/:eventId`, `/events/:eventId/details`, `/events/:eventId/registrations`, `/registrations/:registrationId`, `/events/:eventId/innhopps/:innhoppId`, `/manifests`, `/manifests/:manifestId`, `/participants`, `/participants/:participantId`, `/logistics`, `/airfields/:airfieldId`, plus creation flows for seasons, events, manifests, and participants.
124+
- Frontend routes include `/login`, `/register/:slug`, `/events`, `/events/:eventId`, `/events/:eventId/details`, `/events/:eventId/registrations`, `/events/:eventId/comms`, `/registrations/:registrationId`, `/events/:eventId/innhopps/:innhoppId`, `/manifests`, `/manifests/:manifestId`, `/participants`, `/participants/:participantId`, `/logistics`, `/airfields/:airfieldId`, plus creation flows for seasons, events, manifests, and participants.

backend/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ On startup the server creates these tables if they do not already exist:
3939
- `event_registrations` – participant-to-event lifecycle records with deadlines, notes, and ownership.
4040
- `registration_payments` – ledger entries for deposit, balance, refund, and manual adjustments per registration.
4141
- `registration_activity` – internal timeline entries attached to a registration.
42+
- `email_templates` – reusable subject/body templates for event communications.
43+
- `email_campaigns` – manual or automated campaign executions with stored audience filters.
44+
- `email_deliveries` – rendered outbound messages logged per recipient and campaign.
4245
- `crew_assignments` – role assignments for a participant on a manifest.
4346
- `gear_assets` – tracked gear inventory with inspection status.
4447

@@ -108,6 +111,12 @@ On startup the server creates these tables if they do not already exist:
108111
| POST | `/api/registrations/{registrationID}/payments` | Create a payment ledger row |
109112
| PUT | `/api/registrations/payments/{paymentID}` | Update a payment ledger row |
110113
| POST | `/api/registrations/{registrationID}/activity` | Append an internal activity entry |
114+
| GET | `/api/comms/templates` | List email templates |
115+
| POST | `/api/comms/templates` | Create an email template |
116+
| GET | `/api/comms/events/{eventID}/audience-preview` | Preview comms recipients for an event with status/payment filters |
117+
| GET | `/api/comms/events/{eventID}/campaigns` | List campaign history for an event |
118+
| POST | `/api/comms/campaigns` | Create and send a manual campaign |
119+
| GET | `/api/comms/campaigns/{campaignID}` | Retrieve one campaign with delivery log |
111120
| GET | `/api/rbac/crew-assignments` | List crew assignments |
112121
| POST | `/api/rbac/crew-assignments` | Create a crew assignment |
113122
| GET | `/api/logistics/gear-assets` | List gear assets |
@@ -121,6 +130,7 @@ On startup the server creates these tables if they do not already exist:
121130
- The registration backbone enforces one active registration per participant per event; cancelled or expired registrations can be recreated.
122131
- Public registration links only work for events with `public_registration_enabled=true`; the backend also respects `registration_open_at` and rejects registrations after the event start time.
123132
- Public registrations match existing participants by normalized email or create a new participant profile, then create deposit/balance payment rows from the event commercial settings.
133+
- The first comms slice renders templates and logs per-recipient deliveries inside the database; it does not yet integrate an SMTP/provider transport or background scheduler.
124134

125135
## Testing
126136

0 commit comments

Comments
 (0)