For returning families
A signed-in parent sees their household and each child’s profile, reviews the details instead of retyping them, and registers for a session. Past registrations stay on the camper’s history.
Case study · Technical prototype
A full-stack prototype for a summer camp whose families return year after year. Parents come back to profiles that already exist, staff see each camp’s roster, waitlist, and balances in one view, and the last open space can only be given out once.
Cedar Hollow Camp is fictional. I built this to work through a real kind of operational problem; it was not commissioned by or delivered to a client, and it does not take payments.

The problem
An event-first system starts with the event: a registration creates an attendee record, and that is the end of it. That suits one-off bookings.
A camp with repeat attendance is different. Families return across years, siblings belong to one household, a camper’s details change as they grow, and an old registration still has to say what was true that summer.
Staff have their own version of the problem. During the season they need quick answers: who is confirmed, whether a camp is full, who is next on the waitlist, who still owes money, and which campers need medical or dietary attention. Opening records one at a time is a slow way to get them.
What I built
The same family, camper, and registration records sit behind both. Each side sees them in the form that suits its job.
A signed-in parent sees their household and each child’s profile, reviews the details instead of retyping them, and registers for a session. Past registrations stay on the camper’s history.
A purpose-built view shows each session’s confirmed count, spaces left, ordered waitlist, outstanding balances, and medical or dietary flags. Signed-in staff can also promote a camper from the waitlist.
Parents can only reach their own household. A session can’t be confirmed past its capacity, even when two requests arrive together. Each registration keeps the camper’s details as they were submitted.
The data model
Families and campers persist between summers. A registration ties one camper to one session, and it is more than a link between them: it carries its own status, amounts, and history.
The household, with its contacts and guardians. Owned by one parent account.
One family, many campers.
A persistent profile that describes the child as they are now: birth date, health and dietary details, emergency contact.
One camper, many registrations over the years.
One camper in one session. Carries status, simulated payment amounts, review state, notes, and a snapshot of the camper’s details.
One per camper and session. Duplicates are rejected.
A dated offering with an age range, price, capacity, and registration window.
Capacity is checked against confirmed registrations.
A camper’s profile describes them today and can be updated. When a registration is created, the name, birth date, allergies, medications, dietary requirements, and emergency contact are copied into it.
Later profile edits don’t change that copy, and an update that submits replacement snapshot values is ignored. That is enforced in a server-side hook, not by disabling a field in the admin screen.

The returning-family workflow
A parent account is linked to one household and sees only that family’s campers.
Each camper’s current health, dietary, and emergency details are shown for review, not re-entry.
Submitting checks the session’s capacity and captures the snapshot. Payment is simulated; nothing is charged.
Every past registration stays on the camper’s history with the details confirmed at the time.

The public demo’s parent account is shared, so it is read-only. There is also no self-service signup in the prototype: staff create and link household records.
Staff operations
Payload generates an admin interface from the data model. It is the right place to create records, correct them, and configure sessions, and the prototype keeps it for exactly that.
But an admin is organized around editing one document at a time. Reading the state of a camp through it means following relationships between records and adding things up in your head.
So I added a focused operational layer that answers the everyday questions directly and lets signed-in staff promote a camper from the waitlist.

This is a design comparison I implemented, not a measured productivity gain. No usability study with camp staff was carried out.
Technical detail
The rest of this page covers access rules, the race for the last space, how it was tested, and where the framework stops and the database takes over.
Access boundaries
Access is decided on the server, by Payload’s access rules and ownership filters. Hiding a control is never the only protection.
Capacity & concurrency
The rule is simple: confirmed registrations for a session must never exceed its capacity. The hard part is two requests making that decision at the same moment.
Wrapping the check and the write in a database transaction does not fix this. At PostgreSQL’s READ COMMITTED isolation level, a transaction sees only what other transactions have already committed, so both requests can count the same roster before either has committed its new registration. Nothing makes them take turns.
What does is a lock on something both requests share. Every capacity-changing operation first takes a row lock on the camp session with SELECT … FOR UPDATE, on the same connection as the Payload transaction. The second request waits there. When it gets the lock it reads the count again, which now includes the first request’s committed registration, and only then decides.
Take a row lock on the camp session inside the current transaction. With no transaction, fail and do nothing.
Read the confirmed count and the registration’s state again, now that no other writer can change them.
Make the change through Payload, so its access rules, hooks, and validation still run.
Either way the lock is released, and the next waiting request re-checks for itself.
The lock and count live in one shared function. Parent registration, staff waitlist promotion, ordinary record updates that would confirm a registration, and reductions to a session’s capacity all go through it. Promotion also enforces waitlist order, and a capacity reduction is rejected if it would fall below the confirmed roster.
What this does not guarantee: it is an application-level protocol, not a database constraint. It holds for writes that go through the application; raw SQL or code that bypasses the hooks is outside it. It assumes active transactions, READ COMMITTED isolation, and a roster that starts valid, and it depends on a detail of Payload’s PostgreSQL adapter that would need re-checking after an upgrade.
Testing & verification
The capacity tests run on real PostgreSQL and go through the application’s actual write path. For head-to-head races, the test holds both requests just before the real lock and releases them together, so the contested moment is exercised on purpose.
| Scenario | Local PostgreSQL suite | Hosted Neon run |
|---|---|---|
| Two parents, one space left | Synchronized at the lock | Passed |
| Two promotions for different campers, one space left | Synchronized at the lock | Passed |
| The same camper promoted twice at once | One succeeds | Passed |
| Parent registration against staff promotion, one space left | Synchronized at the lock | Passed |
| Four parent registrations, two spaces | Hosted case only | Passed |
| Promotion against an ordinary update that takes a place | Covered | Not a hosted case |
| Reducing capacity below the confirmed roster | Rejected | Not a hosted case |
What the prototype established
The data model and relationships, sign-in and access rules, hooks and validation, the generated admin, and ordinary reads and writes.
The returning-family experience, the staff operations view, and the public read-only demo.
The session row lock, and in a separate experiment, report-shaped queries on the same database.
I checked where Payload’s query layer stops being the right tool by asking the same questions both ways against larger synthetic data. Ordinary application queries, such as a family’s own records, a camper’s history, and a paginated roster, worked well through Payload. Aggregate and report-shaped questions, such as cohort reports and session financial summaries, were more naturally handled in SQL, where the database can group and filter before sending anything back.
The conclusion is not that the framework failed. Payload stays the application layer, and SQL is a narrow escape hatch on the same database for report-shaped questions. Those SQL reports live in the test harness, not as a screen in the demo.
Scope & deliberate limitations
It is not production software, it has not had a security review, and it was not built for a real camp. Putting something like it into real use would mean building the first list below and reviewing security, privacy, and data retention against the organization’s actual requirements.
A simple first step
A few sentences about your business, your current setup, and what you’d like to improve are enough to start.