@vermeulen.solutions/eventual-attendance 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/LICENSE +21 -0
- package/README.md +270 -2
- package/astro/RsvpForm.astro +657 -0
- package/astro/RsvpManage.astro +294 -0
- package/astro/index.ts +10 -0
- package/astro/rsvp-i18n.ts +169 -0
- package/astro/types.ts +123 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +240 -0
- package/dist/manifest.json +247 -0
- package/dist/plugin.d.mts +6 -0
- package/dist/plugin.mjs +188 -0
- package/emdash-plugin.jsonc +82 -0
- package/package.json +57 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-11-14)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Free registrations for single and recurring events, with per-event capacity. Seat counts use a compare-and-set ledger, so a place is never sold twice.
|
|
8
|
+
- **Registrations page:** requests waiting for a decision first, totals, upcoming events with places taken and their dates (single events too, in the site's default time zone when the event has none), busiest weekday and start slots, name or email search, and the registration list with actions. Choosing an event narrows only the list, with a notice and a way back; cancelled registrations are hidden until shown with a button. Events sold through Tickets are listed with a link to Tickets → Orders.
|
|
9
|
+
- **Door list page:** check in and undo, an arrivals count, name search, and printable HTML and CSV files. The files follow the event and date shown on the page and name the event. With no event chosen, it opens on today's or the next dated event and says so. The same files can be made from the Registrations page.
|
|
10
|
+
- **Dashboard widget "Recent registrations":** the five newest registrations with their event, date and status, and a link to Registrations.
|
|
11
|
+
- **Registration settings page:** the organiser's settings and personal-data deletion; the site builder's settings are folded under "Site setup".
|
|
12
|
+
- Registration questions as rows in the event panel: one small form per question (question of up to 400 characters, enough for consent wording; kind of answer in words; choices only for "Choice from a list"; must be answered), with save, remove and move up. A question keeps its id when it is renamed.
|
|
13
|
+
- Optional approval for each registration, with a decision window of 1–720 hours, approve and decline buttons, request and decision emails, and a background task that lapses unanswered requests.
|
|
14
|
+
- A first-in, first-out waiting list. Freed places are offered to the next person for 2 hours, claimed atomically, with a background sweep and round-robin promotion across events.
|
|
15
|
+
- Email reminders with a configurable lead time, sent at most once per confirmed attendee.
|
|
16
|
+
- A default time zone setting for events that have none (a collection without a `timezone` field, such as camps with only a start date-time): their times show in it instead of UTC. Empty keeps UTC. On the Registration settings page.
|
|
17
|
+
- Opt-in Cloudflare Turnstile on the booking form. When Turnstile is off and the visitor's IP is known, each keyed `ipHash` is limited to 10 bookings in 10 minutes.
|
|
18
|
+
- Personal-data retention (30–3650 days, default 365) with an hourly sweep, and erasure on request from the admin with live-registration protection.
|
|
19
|
+
- Delete guard: an event with upcoming or undated live registrations cannot be moved to the trash.
|
|
20
|
+
- Confirmation, waiting-list, offer and claim emails; an `.ics` calendar file per occurrence; an organiser reply-to address (site default and per-event override); and queued confirmation mail when the call budget leaves no room to send it inline.
|
|
21
|
+
- 21 languages: English, French, German, Dutch, Spanish, Italian, Portuguese (Portugal and Brazil), Polish, Czech, Swedish, Danish, Norwegian Bokmål, Finnish, Japanese, Simplified Chinese, Korean, Turkish, Ukrainian, Arabic and Hebrew, with right-to-left layout for Arabic and Hebrew, in the forms, emails, management pages and the admin, which follows the EmDash UI language. Admin and email translations are language packs downloaded from `cdn.jsdelivr.net` and checked against hashes built into the release; English is built in.
|
|
22
|
+
- The confirmation always offers a "Manage or cancel this registration" link to the same signed page as the email, even when no email is sent.
|
|
23
|
+
- Background tasks re-create themselves from the admin page and the public availability route.
|
|
24
|
+
|
|
25
|
+
### For site builders
|
|
26
|
+
|
|
27
|
+
- One npm package, `@vermeulen.solutions/eventual-attendance`, with the site components under `./astro`: `RsvpForm.astro` and `RsvpManage.astro`. The form's card width follows `--eventual-card-max-width`, so a page can let it fill its column; on dark sites the manage page's booking details use `--eventual-field-bg`.
|
|
28
|
+
- Three ways to install: npm sandboxed, npm native, and the EmDash registry once published. A registry install has an ID like `r_…`; the plugin page shows the exact paths to pass as `apiEndpoint` and `apiBase`.
|
|
29
|
+
- Settings on the Registration settings page: event collections, self-service page path, email language, reminder hours, retention days, reply-to and Turnstile keys. Capacity and the waiting-list switch live on the event form when the collection has those fields.
|
|
30
|
+
- The outbound hosts are `challenges.cloudflare.com` (only when Turnstile is on) and `cdn.jsdelivr.net` (language packs).
|
|
31
|
+
- The site components need `@vermeulen.solutions/eventual-locales`, installed with the package.
|
|
32
|
+
- `trust-contract.json` records capabilities, hosts, hooks, public routes and storage indexes; `npm test` fails when the build changes it.
|
|
33
|
+
- `npm run release:check` checks that the package is ready to publish, one line per step.
|
|
34
|
+
|
|
35
|
+
### Limits
|
|
36
|
+
|
|
37
|
+
- Tested on EmDash's runtime test host, in the local browser test site on Node, and run on Cloudflare (sandboxed under the Worker Loader) on a preview site. Its emails are not yet proven on a deployed site; payments and tickets are not part of this plugin.
|
|
38
|
+
- Roster exports and reconcile work in pages: about 700 rows per roster file and about 500 records per reconcile pass. The README's "Large events" section says what to do past those.
|
|
39
|
+
- Admin sidebar labels come from the English manifest, so they stay English in every admin language; the pages themselves are translated.
|
|
40
|
+
- Until a language pack has been downloaded (about five minutes after installing or updating), that language's emails and admin pages are in English.
|
|
41
|
+
- The forms need JavaScript (suite D14).
|
|
42
|
+
- A permanent delete of an entry that is already in the trash does not call the delete guard.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jaap Vermeulen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,271 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Eventual RSVP – Registrations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Free registration for [Eventual RSVP](https://github.com/Vermeulen-Solutions/eventual-emdash-sandbox) events in EmDash CMS: places that never overbook, a fair waiting list that offers freed places by email, optional approval, reminders, and a door list to check people in.
|
|
4
|
+
|
|
5
|
+
**Version 0.1.0.** Registrations, the waiting list, approval, reminders, Turnstile, door check-in and personal-data erasure work and are tested on EmDash's runtime test host, in the local browser test site on Node, and on a Cloudflare preview (its emails are not yet proven there).
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
- **RSVPs per occurrence.** Attendees register for one date of a recurring series; each date has its own capacity.
|
|
10
|
+
- **No overselling.** Seats are reserved with revision-checked compare-and-set on the plugin's KV ledger, so two people can never get the last seat.
|
|
11
|
+
- **Fair waitlist.** When a session is full, visitors join a first-come, first-served queue. A freed seat is *held* for the person at the front and offered by email for 2 hours; nobody can register past the queue. Unclaimed offers move to the next person automatically.
|
|
12
|
+
- **Zero-login cancel and claim.** Email links open a page on your site where the attendee confirms. Only hashes of the tokens are stored, and the signing key never leaves the plugin's private storage.
|
|
13
|
+
- **Registration questions.** Add questions per event in the editor panel, such as T-shirt size, dietary needs or a rules checkbox. The form shows them, the server checks the answers, and they appear in the attendee list, roster and CSV.
|
|
14
|
+
- **No double bookings from retries.** A double-click or network retry returns the original registration instead of booking seats twice.
|
|
15
|
+
- **Shared room for translations.** All language versions of an event share one capacity, one queue and one set of settings.
|
|
16
|
+
- **Door tools.** Check-in from the admin attendee list, and single-use links for a CSV roster or a printable roster you open and print locally.
|
|
17
|
+
- **Self-healing counts.** A background job compares seat counts with attendee records every 10 minutes and corrects drift left by failed requests.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# In your EmDash site
|
|
23
|
+
npm install @vermeulen.solutions/eventual-attendance
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Add it to the EmDash integration in `astro.config.mjs`. Attendance is built to run **sandboxed**, in its own isolate with only the permissions it declares:
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineConfig } from "astro/config";
|
|
30
|
+
import emdash from "emdash/astro";
|
|
31
|
+
import eventualAttendance from "@vermeulen.solutions/eventual-attendance";
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
integrations: [
|
|
35
|
+
emdash({
|
|
36
|
+
// …database, storage, your other plugins
|
|
37
|
+
sandboxed: [eventualAttendance],
|
|
38
|
+
sandboxRunner: "@emdash-cms/cloudflare/sandbox", // on Cloudflare; see below
|
|
39
|
+
}),
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Three ways to install
|
|
45
|
+
|
|
46
|
+
**1. From the EmDash registry** (admin → Plugins → Registry).
|
|
47
|
+
|
|
48
|
+
- **Run:** install Eventual RSVP – Registrations from the registry, and add the npm package to your site for the components: `npm install @vermeulen.solutions/eventual-attendance`.
|
|
49
|
+
- **Config:** the registry install is sandboxed; nothing else goes in `astro.config.mjs`. Import the components from the npm package.
|
|
50
|
+
- **Pages:** the self-service page (below) with `RsvpManage`, and `RsvpForm` on each event page.
|
|
51
|
+
- **Check it worked:** open **Attendance** in the admin. The **Site setup** section shows the `apiEndpoint` and `apiBase` paths for this install; pass them to `RsvpForm` and `RsvpManage`. Register once on a test event and confirm the message appears. *(Not yet tested by us on a registry install.)*
|
|
52
|
+
|
|
53
|
+
**2. From npm, sandboxed.**
|
|
54
|
+
|
|
55
|
+
- **Run:** `npm install @vermeulen.solutions/eventual-attendance`, then add it to `astro.config.mjs` as in the example above.
|
|
56
|
+
- **Config:** `sandboxed: [eventualAttendance]` plus a `sandboxRunner` (`@emdash-cms/cloudflare/sandbox` on Cloudflare, `@emdash-cms/sandbox-workerd/sandbox` on Node), as in the example above.
|
|
57
|
+
- **Pages:** the self-service page with `RsvpManage`, and `RsvpForm` on the event page.
|
|
58
|
+
- **Check it worked:** open **Attendance** in the admin; it must name the event collection it reads. Register once on a published test event.
|
|
59
|
+
|
|
60
|
+
**3. From npm, native.**
|
|
61
|
+
|
|
62
|
+
- **Run:** `npm install @vermeulen.solutions/eventual-attendance`.
|
|
63
|
+
- **Config:** `plugins: [eventualAttendance]`. This runs in the site's own process, without the sandbox's limits or isolation; only on hosts you trust.
|
|
64
|
+
- **Pages:** the self-service page with `RsvpManage`, and `RsvpForm` on the event page.
|
|
65
|
+
- **Check it worked:** as for the sandboxed npm install. Tested on Node in the local test site (`EVENTUAL_PLUGIN_MODE=native`, `npm run test:integration:suite` and `npm run test:e2e`).
|
|
66
|
+
|
|
67
|
+
### Permissions and why
|
|
68
|
+
|
|
69
|
+
| Permission | Why |
|
|
70
|
+
| :--- | :--- |
|
|
71
|
+
| `content:read` | Read the event (title, dates, published or not) a booking is for |
|
|
72
|
+
| `email:send` | Confirmations, waitlist offers, approval notices, reminders |
|
|
73
|
+
| `network:request` to `challenges.cloudflare.com` | Check Cloudflare Turnstile tokens, only when you turn Turnstile on |
|
|
74
|
+
| `network:request` to `cdn.jsdelivr.net` | Download the admin and email translations (language packs from `@vermeulen.solutions/eventual-locales`); each file is checked against a hash built into the plugin |
|
|
75
|
+
|
|
76
|
+
#### Public routes
|
|
77
|
+
|
|
78
|
+
The plugin declares the following public routes (listed in `trust-contract.json`):
|
|
79
|
+
|
|
80
|
+
| Route | Method | Purpose |
|
|
81
|
+
| :--- | :--- | :--- |
|
|
82
|
+
| `rsvp` | POST | Submit an RSVP or waitlist join request (idempotent command) |
|
|
83
|
+
| `rsvp/form` | GET | Event capacity, Turnstile status, and registration questions for the booking form |
|
|
84
|
+
| `cancel` | POST | Cancel a booking or waitlist entry via a signed HMAC token |
|
|
85
|
+
| `manage/lookup` | POST | Read booking details for the self-serve manage page using a signed token before confirmation |
|
|
86
|
+
| `waitlist/claim` | POST | Claim a held seat from a waitlist offer email via a signed HMAC token |
|
|
87
|
+
| `calendar` | GET | Download an `.ics` calendar file for a booking |
|
|
88
|
+
| `roster/download` | GET | Single-use download link for event rosters (CSV or HTML doorlist) generated by the admin panel |
|
|
89
|
+
|
|
90
|
+
**Installed from the registry?** The plugin then has an ID like `r_…` instead of its name. The plugin's admin page shows the exact paths; pass them to the site components (`apiEndpoint` / `apiBase`).
|
|
91
|
+
|
|
92
|
+
**Emails** (confirmations, waitlist offers, approval notices, reminders) go through EmDash's email system, so the site needs an email provider plugin. Without one, bookings still work but nobody is emailed, and waitlist offers can't be claimed.
|
|
93
|
+
|
|
94
|
+
### Running sandboxed on Cloudflare
|
|
95
|
+
|
|
96
|
+
Sandboxed plugins on Cloudflare run in a Worker Loader isolate:
|
|
97
|
+
|
|
98
|
+
1. **Workers Paid plan.** The Worker Loader binding isn't available on the free plan.
|
|
99
|
+
2. **The binding**, in `wrangler.jsonc`:
|
|
100
|
+
```jsonc
|
|
101
|
+
"worker_loaders": [{ "binding": "LOADER" }]
|
|
102
|
+
```
|
|
103
|
+
3. **`sandboxRunner: "@emdash-cms/cloudflare/sandbox"`** in the EmDash integration, as above.
|
|
104
|
+
4. **Re-export the bridge** from your Worker entry (the file `main` points to in `wrangler.jsonc`), so the sandbox can reach EmDash:
|
|
105
|
+
```ts
|
|
106
|
+
export { PluginBridge } from "@emdash-cms/cloudflare/worker";
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The background tasks need the site's cron trigger (EmDash's scheduled handler). Attendance schedules its own tasks the first time the booking form is loaded.
|
|
110
|
+
|
|
111
|
+
## Site setup
|
|
112
|
+
|
|
113
|
+
### 0. Nothing to configure for keys
|
|
114
|
+
|
|
115
|
+
Attendance creates the key that signs cancellation and waitlist links itself, the first time it needs one, and keeps it in its own private storage. You don't need `EMDASH_ENCRYPTION_KEY` for Attendance. Treat database backups as sensitive: someone holding a copy could create working cancel links for existing bookings.
|
|
116
|
+
|
|
117
|
+
### Spam protection (optional): Cloudflare Turnstile
|
|
118
|
+
|
|
119
|
+
Every form has a hidden honeypot and a timing check. When Turnstile is off, Attendance also refuses more than **10 bookings from one IP address in 10 minutes** (keeping only a 32-hex keyed hash `ipHash`, never the raw IP). Off Cloudflare, EmDash knows the visitor's IP only when its trusted proxy headers are configured; without an IP there is no limit. When Turnstile is on, Cloudflare's challenge does that job and the IP check is skipped.
|
|
120
|
+
|
|
121
|
+
For stronger protection, turn on Cloudflare Turnstile:
|
|
122
|
+
|
|
123
|
+
1. In the Cloudflare dashboard, open **Turnstile**, add a widget for your site's domain and copy its **site key** and **secret key**.
|
|
124
|
+
2. On the **Registration settings** page, under **Site setup**, paste both keys and save.
|
|
125
|
+
|
|
126
|
+
The booking form then shows Cloudflare's check, and bookings without a valid token are refused. If Cloudflare can't be reached, bookings go through rather than closing every form. No `EMDASH_ENCRYPTION_KEY` is needed. To try it locally, use Cloudflare's test keys: site key `1x00000000000000000000AA` with secret `1x0000000000000000000000000000000AA` always pass.
|
|
127
|
+
|
|
128
|
+
If your site sends a Content Security Policy, allow `https://challenges.cloudflare.com` in `script-src` and `frame-src`.
|
|
129
|
+
|
|
130
|
+
### Several collections
|
|
131
|
+
|
|
132
|
+
**Content collections that hold events**, under **Site setup** on the Registration settings page, takes a comma-separated list, for example `camps, school_series`; the first is the default. Pass `collection="school_series"` to `RsvpForm` for events outside the default collection. Only listed collections are ever read.
|
|
133
|
+
|
|
134
|
+
### Styling
|
|
135
|
+
|
|
136
|
+
The components' CSS sits in the `eventual` cascade layer. Unlayered site CSS overrides it; if your site uses layers (Tailwind 4 does), list `eventual` before your components layer, for example `@layer theme, base, eventual, components, utilities;`. The reliable way to theme them is with variables, which work whatever your layers: set the `--eventual-*` variables on the component or any wrapper. Colours: `--eventual-primary`, `--eventual-primary-hover`, `--eventual-on-primary`, `--eventual-bg`, `--eventual-field-bg` (inputs, dropdowns and the booking details on the manage page; default white), `--eventual-border`, `--eventual-text`, `--eventual-text-muted`, `--eventual-danger`, `--eventual-success(-bg)`, `--eventual-warning(-bg)`, `--eventual-error(-bg)`. Shapes and focus: `--eventual-radius` (cards), `--eventual-card-max-width` (the form card; default 440px, `none` fills the column), `--eventual-control-radius` (fields, messages), `--eventual-button-radius`, `--eventual-focus`, `--eventual-focus-ring`. Set the text and field colours together for a dark theme: the components set a field's text and background as a pair, so light text needs `--eventual-field-bg` too.
|
|
137
|
+
|
|
138
|
+
### Availability
|
|
139
|
+
|
|
140
|
+
When the form loads it fires a bubbling `eventual:availability` event with `{ full, seatsLeft, allowWaitlist }`, so a page can mark sessions as full in a list. A full event without a waitlist shows its "full" message and disables the form.
|
|
141
|
+
|
|
142
|
+
### Languages
|
|
143
|
+
|
|
144
|
+
Attendance speaks English (built in), French, German, Dutch, Spanish, Italian, Portuguese (Portugal and Brazil), Polish, Czech, Swedish, Danish, Norwegian Bokmål, Finnish, Japanese, Simplified Chinese, Korean, Turkish, Ukrainian, Arabic and Hebrew. Arabic and Hebrew are laid out right to left.
|
|
145
|
+
|
|
146
|
+
`RsvpForm` and `RsvpManage` take a `locale` such as `"fr"`, `"de"` or `"pt-BR"` (default `"en"`); an unknown language falls back to the closest one, then English. The form sends its language with the booking, and every email for that booking (confirmation, waitlist, offer, reminder) is written in it. Set the **Language of emails when the form doesn't say** setting on the Registration settings page for bookings that don't carry one. The components' texts come from the `@vermeulen.solutions/eventual-locales` npm package, installed with Attendance; each language is its own chunk.
|
|
147
|
+
|
|
148
|
+
The admin pages, the editor panel and the roster files follow EmDash's admin language. The admin and email texts are not in the plugin bundle: English is built in, and the other languages are language packs the plugin downloads from `cdn.jsdelivr.net` (the public npm CDN) and keeps in its storage. A background task fetches them, the site's own language first, within about five minutes of installing or updating; until a language has arrived, its emails and admin pages are in English. Each pack is checked against a hash built into this release. The plugin's sidebar entries ("Registrations", "Door list", "Registration settings") and the editor panel's title ("Registrations") come from the English plugin manifest and stay English even when the admin is French; the pages themselves are translated.
|
|
149
|
+
|
|
150
|
+
### 1. Event collection and fields
|
|
151
|
+
|
|
152
|
+
Attendance reads events from the collection you connected in **Event settings** (Eventual RSVP – Core) (default `events`). If you use another name, set **Content collections that hold events** under **Site setup** on the Registration settings page.
|
|
153
|
+
|
|
154
|
+
Add these optional fields to that collection, using the same reviewed, additive schema workflow as Eventual RSVP's [collection setup](https://github.com/Vermeulen-Solutions/eventual-emdash-sandbox/blob/main/docs/collection-setup.md):
|
|
155
|
+
|
|
156
|
+
| Field slug | Type | Meaning |
|
|
157
|
+
| :--- | :--- | :--- |
|
|
158
|
+
| `inventory_mode` | select: `rsvp`, `tickets` | `rsvp` opens RSVPs for the event; `tickets` hands it to Eventual RSVP – Tickets. Empty means RSVP-managed but closed until enabled |
|
|
159
|
+
| `capacity` | integer | Seats per occurrence; `0` or empty = unlimited |
|
|
160
|
+
| `allow_waitlist` | boolean | Queue visitors once the session is full |
|
|
161
|
+
|
|
162
|
+
The `eventual-capacity` exporter writes these fields for you. It merges them into the schema file Core's exporter produces (new sites), or prints just the three fields to review against an existing schema. It never touches a database or overwrites a file:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
node node_modules/@vermeulen.solutions/eventual-capacity/scripts/export-capacity-fields.mjs --merge eventual-schema.json --output eventual-schema-with-capacity.json
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The fields are optional. **Capacity and the waitlist switch have one home:** when the event collection has these fields, they are edited in the event form and the **Registrations** panel of the event editor only reports them; a collection without them gets both settings in the panel instead. (A value saved in the panel by a script or an older version still wins until the panel is saved again; the panel says so.) **Registration is closed by default.** An event accepts registrations only when it is published *and* either its `inventory_mode` is `rsvp` or **Open for registration** is on in the panel. Turning that switch off closes registration without touching existing bookings.
|
|
169
|
+
|
|
170
|
+
### 2. Registration form
|
|
171
|
+
|
|
172
|
+
```astro
|
|
173
|
+
---
|
|
174
|
+
import RsvpForm from "@vermeulen.solutions/eventual-attendance/astro/RsvpForm.astro";
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
<RsvpForm
|
|
178
|
+
eventId={event.id}
|
|
179
|
+
occurrenceStart="2026-11-15T10:00:00Z"
|
|
180
|
+
maxQuantity={4}
|
|
181
|
+
title="Reserve your spot"
|
|
182
|
+
/>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The confirmation and waitlist messages mention an email only when the server actually sent or queued one (`email: "sent" | "queued"`); on a site without an email provider (`"none"`), they confirm the reservation or waitlist position without promising an email.
|
|
186
|
+
|
|
187
|
+
Every success (going, waitlist or pending approval) also shows **"Manage or cancel this registration"** / **"Gérer ou annuler cette inscription"**, linking to the same manage page the email carries (`manageUrl` in the answer, with the token in the fragment). The visitor can cancel straight away even when no email arrives; nothing extra is called to build the link. A replayed submission does not repeat it.
|
|
188
|
+
|
|
189
|
+
Other props: `apiEndpoint` (default `/_emdash/api/plugins/eventual-attendance/rsvp`; use the path the admin page shows on a registry install), `formEndpoint` (default `${apiEndpoint}/form`), `allowWaitlist` (default `true`; the server's setting still decides), `nameLabel` and `emailLabel` (replace "Full name" and "Email address"), and `locale` (`en` or `fr`). `RsvpManage` takes `apiBase` (default `/_emdash/api/plugins/eventual-attendance`) and `locale`.
|
|
190
|
+
|
|
191
|
+
### Self-service page (required)
|
|
192
|
+
|
|
193
|
+
Cancellation and waitlist-claim emails link to a page on your site. Create it at `/rsvp/manage`, or at the path set under **Site setup** on the Registration settings page:
|
|
194
|
+
|
|
195
|
+
```astro
|
|
196
|
+
---
|
|
197
|
+
// src/pages/rsvp/manage.astro
|
|
198
|
+
import RsvpManage from "@vermeulen.solutions/eventual-attendance/astro/RsvpManage.astro";
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
<RsvpManage />
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The token travels in the link's `#fragment`, so it never reaches your server logs. Nothing changes until the visitor presses the button, so email link scanners can't cancel bookings.
|
|
205
|
+
|
|
206
|
+
### Approval (optional per event)
|
|
207
|
+
|
|
208
|
+
Turn on **Approve each registration yourself** in the event editor's **Registrations** panel to review bookings before confirming them. Waiting requests are the first thing on the Registrations page, each with its own Approve and Decline buttons and the time by which to decide:
|
|
209
|
+
|
|
210
|
+
- Visitors submit a **request** instead of an immediate RSVP (`Send request` / `Envoyer la demande` on `RsvpForm`), holding their seats as `Awaiting approval` (`pending`) so the session still cannot oversell or accept new people past them into a waitlist.
|
|
211
|
+
- Each request gets a deadline (`Decide within`, 1–720 hours, default 48, capped at the session start when known).
|
|
212
|
+
- **Organiser notification:** when a reply-to address is configured on the event or Attendance settings page, the `attendance-approvals` cron task (every 5 minutes) emails the organiser a notice (`New request: …`) in the site's default email language.
|
|
213
|
+
- On the **Attendance** overview page, click **Approve** (moves to `going`, enables reminders, and emails the calendar confirmation) or **Decline** (cancels, releases seats, offers them to the waitlist, and notifies the visitor). Waitlist claims on approval events also start as `pending` requests.
|
|
214
|
+
- Unanswered requests past their deadline are declined automatically every 5 minutes by `attendance-approvals`, releasing their seats and notifying the visitor.
|
|
215
|
+
|
|
216
|
+
### Deleting events
|
|
217
|
+
|
|
218
|
+
An event with upcoming registrations can't be moved to the trash. Cancel them first, or unpublish the event to stop new bookings.
|
|
219
|
+
|
|
220
|
+
## Personal data
|
|
221
|
+
|
|
222
|
+
Attendee names, email addresses and answers are personal data. Under privacy frameworks like the Swiss FADP and EU GDPR, organisers are expected to retain personal details only as long as necessary and erase them on request.
|
|
223
|
+
|
|
224
|
+
- **Automated retention:** The `attendance-retention` task runs hourly (at minute 17) and erases attendee details and waitlist entries whose event passed more than `retentionDays` ago (configurable on the Registration settings page, default 365 days, 30–3650). Bookings for an event without a date are kept while they're live; the period starts again each time the sweep finds one. Erasing clears names, emails and question answers, but preserves seat counts and statuses for historical attendance figures.
|
|
225
|
+
- **Erasure on request:** On the Registration settings page, use **Delete someone's personal data** to look up all registrations and waitlist entries for an email address. One click erases personal details across past and cancelled records. Active/upcoming registrations are protected from erasure until cancelled. Erased registrations stay in the lists as "Erased" (`—` for name and email, no actions) so the seat counts add up.
|
|
226
|
+
- **Starting point, not legal advice:** Retention periods and privacy requirements vary by jurisdiction, event category, and organisation. Review your own privacy policy and legal requirements.
|
|
227
|
+
|
|
228
|
+
## Background tasks and throughput
|
|
229
|
+
|
|
230
|
+
Six scheduled tasks run automatically. Opening any of the plugin's admin pages re-creates them if an update left them missing.
|
|
231
|
+
|
|
232
|
+
| Task | Schedule | Work per run |
|
|
233
|
+
| :--- | :--- | :--- |
|
|
234
|
+
| `waitlist-maintenance` | every minute | expires up to 2 lapsed offers and sends about 1 new offer |
|
|
235
|
+
| `ledger-reconcile` | every 10 minutes | checks one seat ledger against its records |
|
|
236
|
+
| `attendance-reminders` | every minute | emails up to 3 confirmed attendees whose date is within the reminder lead time (default 24 hours, set on the admin page; 0 turns reminders off) |
|
|
237
|
+
| `attendance-mail` | every minute | sends confirmation emails for bookings whose inline send was skipped due to call budget |
|
|
238
|
+
| `attendance-approvals` | every 5 minutes | declines unanswered approval requests past their deadline (up to 2) and sends queued organiser notices |
|
|
239
|
+
| `attendance-retention` | hourly (17 * * * *) | erases personal details (names, email addresses, answers) for past bookings after the retention period |
|
|
240
|
+
|
|
241
|
+
Sandboxed plugins are limited to 10 host calls per invocation by default, so waitlist promotion runs at about **one offer per minute** and reminders at about **180 per hour** across the site. That suits small and medium events; for a large event, reminders go out over the first hour of the lead window. An operator can raise the sandbox `subrequests` limit for more headroom, but the plugin does not require it. Waitlist maintenance and the reconcile check can also be run from the admin page.
|
|
242
|
+
|
|
243
|
+
## Large events
|
|
244
|
+
|
|
245
|
+
These are the limits of one background task or download, given the sandbox's 10 host calls. Past a limit the plugin skips the work or truncates the file rather than failing.
|
|
246
|
+
|
|
247
|
+
| What | Limit | What happens past it | What to do |
|
|
248
|
+
| :--- | :--- | :--- | :--- |
|
|
249
|
+
| Reconcile one occurrence | ≈ 500 attendee + waitlist records | The occurrence is skipped (`TOO_LARGE`) and tried again on a later tick; its seat count is not corrected automatically | Split the event by date, so each occurrence has its own pool; each is reconciled on its own |
|
|
250
|
+
| Roster download | 700 rows | The file is truncated with a note at the top | Filter by event and date and download each date separately |
|
|
251
|
+
| Waitlist offers | About 1 per minute per site | The queue drains over the following minutes; the maintenance task round-robins between events | None needed, but a large queue takes time |
|
|
252
|
+
| Reminder emails | 3 per minute (≈ 180/hour) | Reminders spread over the hour before the lead time | Set the reminder lead time earlier |
|
|
253
|
+
| Queued confirmation emails | 3 per minute | Confirmations wait for the next minute | None needed |
|
|
254
|
+
|
|
255
|
+
## Troubleshooting
|
|
256
|
+
|
|
257
|
+
- **Nobody gets an email:** EmDash needs an email provider plugin. Without one, a booking still works; the page says `email: "none"` and shows the reference/manage link instead. With a provider, check the site's from-address and the spam folder.
|
|
258
|
+
- **Reminders or waitlist offers never arrive:** the background tasks must be registered. Open the Registrations page once (it schedules them); the tasks run every minute and every hour, and **Site setup** on the Registration settings page has buttons to run them now.
|
|
259
|
+
- **A link answers "Route not found":** the plugin is installed under a different ID (registry installs get an ID like `r_…`). Use the `apiEndpoint`/`apiBase` printed under **Site setup** on the Registration settings page, not the folder name.
|
|
260
|
+
- **The booking form shows Cloudflare's check but nobody can book:** the Turnstile secret or the site key is wrong, or the domain is not in the widget's hostnames. **Site setup** on the Registration settings page says whether Turnstile is on; with Cloudflare's test keys use `1x00000000000000000000AA` / `1x0000000000000000000000000000000AA`.
|
|
261
|
+
- **A public route answers `TRY_AGAIN`:** an unexpected host or database error was caught (it is logged, never shown). Check the EmDash log; often the event collection is not set up yet on a new site.
|
|
262
|
+
- **A buyer cannot find their booking:** the confirmation shows the order reference and, when built, the manage link; otherwise use the link in the confirmation email. A site without an email provider still shows both on the page.
|
|
263
|
+
|
|
264
|
+
## Architecture & specifications
|
|
265
|
+
|
|
266
|
+
- [Attendance specification](docs/SPECIFICATION.md): ledger invariants, waitlist states, tokens, routes and their call budgets.
|
|
267
|
+
- [Suite specification](docs/SUITE-SPECIFICATION.md): verified platform constraints, feasibility of the wider Eventual RSVP suite, and the decision log.
|
|
268
|
+
|
|
269
|
+
## License
|
|
270
|
+
|
|
271
|
+
MIT © 2026 Jaap Vermeulen / Vermeulen Solutions
|