Case study · Technical prototype

Camp Registration
& Operations System

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.

Status
Technical prototype with a public, read-only demo that uses fictional data.
Built with
Next.js, Payload, TypeScript, and PostgreSQL. Hosted on Netlify and Neon.
Testing
Verified with integration, browser, and hosted PostgreSQL concurrency testing.
Staff roster for Teen Camp 2027 in the demo: 2 of 2 confirmed, 0 spaces remaining, 1 waitlisted, 2 balances outstanding totalling $950, and 2 campers with medical or dietary flags, followed by the confirmed campers list.
The staff view of a full session: both places confirmed, one camper waiting, two balances outstanding, and two campers flagged for medical or dietary attention. Every name and detail is fictional. View the full screenshot

The problem

Returning families aren’t one-off bookings.

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

One system, two experiences.

The same family, camper, and registration records sit behind both. Each side sees them in the form that suits its job.

01

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.

02

For camp staff

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.

03

Rules underneath

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

Model the people, not only the event.

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.

  1. Family

    The household, with its contacts and guardians. Owned by one parent account.

    One family, many campers.

  2. Camper

    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.

  3. Registration

    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.

  4. Camp Session

    A dated offering with an age range, price, capacity, and registration window.

    Capacity is checked against confirmed registrations.

What’s true now, and what was true then.

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.

Current profile · Emma
Allergies
Mild seasonal pollen sensitivity (fictional)
Can change?
Yes, through the family’s review form
Registration snapshot · Intermediate Camp 2026
Allergies
None reported (fictional)
Can change?
No. It records what was confirmed then
Emma Smith’s camper profile in the demo. The review form on the left shows current allergies as mild seasonal pollen sensitivity. The registration history on the right shows the expanded Intermediate Camp 2026 entry with allergies recorded as none reported.
The same camper in two places: the current profile on the left, and on the right the details confirmed for an earlier registration. View the full screenshot

The returning-family workflow

Review, don’t retype.

  1. 01

    Sign in

    A parent account is linked to one household and sees only that family’s campers.

  2. 02

    Review

    Each camper’s current health, dietary, and emergency details are shown for review, not re-entry.

  3. 03

    Register

    Submitting checks the session’s capacity and captures the snapshot. Payment is simulated; nothing is charged.

  4. 04

    Look back

    Every past registration stays on the camper’s history with the details confirmed at the time.

The family overview in the demo, signed in as the fictional parent Sarah Smith. The Smith Family has two camper cards, Noah Smith and Emma Smith, each linking to profile, history, and registration.
One household, two persistent camper profiles. Each links to that child’s history and registration form. View the full screenshot

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

Why staff got their own screen.

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.

The staff session overview in the demo: a table of four 2027 camp sessions with columns for confirmed places, spaces left, waitlisted, balances outstanding, and medical or dietary flags. Teen Camp is full at 2 of 2 with 1 waitlisted; Junior Camp is at 3 of 4.
Every session at a glance. Counts are derived from registrations on each request, not stored. View the full screenshot
Payload admin keeps
  • Creating and correcting records
  • Configuring sessions, prices, and capacity
  • General-purpose editing of any document
The staff view adds
  • Confirmed places and spaces remaining per camp
  • The waitlist, in order
  • Who owes money, and the total outstanding
  • Campers with medical or dietary flags
  • Contacts, current profile, and snapshot together, without opening an edit form

This is a design comparison I implemented, not a measured productivity gain. No usability study with camp staff was carried out.

Technical detail

For developers and technical leads.

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

Who can see and change what.

Access is decided on the server, by Payload’s access rules and ownership filters. Hiding a control is never the only protection.

  • Parents are scoped to their own householdOwnership filters apply on the server. Reads made on a parent’s behalf run with that user’s permissions and do not bypass the access rules.
  • Capacity counts see every family; parents don’tThe count that decides whether a session is full includes all registrations, without returning other families’ records to the parent.
  • Staff screens need a staff sign-inThe staff routes and the Payload admin are authenticated and restricted by role.
  • The public demo is bounded, not just hiddenAnonymous visitors get read-only loaders limited to the fictional seeded sessions and campers. Promotion controls and admin links are not part of those pages.
  • The shared demo parent can’t writeSaving and submitting are switched off in the interface and in the access rules, and stay off unless a non-shared environment explicitly opts in.

Capacity & concurrency

Two requests, one space left.

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.

Check, then write
  1. Request ACounts confirmed places: 0 of 1. One space left.
  2. Request BCounts confirmed places: 0 of 1. One space left.
  3. Request ACreates a confirmed registration.
  4. Request BCreates a confirmed registration.
  5. ResultOverbooked: 2 confirmed in a session of 1.
Lock, re-check, then write
  1. Request ALocks the session row.
  2. Request BAsks for the same lock and waits.
  3. Request ARe-checks: 0 of 1. Confirms and commits. The lock is released.
  4. Request BGets the lock and re-checks: 1 of 1. The session is full, so it does not take the place.
  5. ResultCapacity holds: 1 confirmed in a session of 1.

Why a transaction alone wasn’t enough.

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.

  1. 01

    Lock

    Take a row lock on the camp session inside the current transaction. With no transaction, fail and do nothing.

  2. 02

    Re-check

    Read the confirmed count and the registration’s state again, now that no other writer can change them.

  3. 03

    Write

    Make the change through Payload, so its access rules, hooks, and validation still run.

  4. 04

    Commit or roll back

    Either way the lock is released, and the next waiting request re-checks for itself.

A rule for the domain, not for one button.

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

Checked against a real database.

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.

Integration cases
19Capacity and promotion races, waitlist order, payment tampering, access denial, and the demo write gate.
Browser tests
12Playwright runs of the family, staff, admin, and public-demo workflows.
Hosted concurrency cases
5Run against hosted Neon PostgreSQL through its pooled connection. Recorded result: 5 of 5 passed.
Hosted results are from a recorded run on 13 October 2026, in one process with a pool of three connections. They validate that provider and pooler path. They are not a multi-instance load test.
ScenarioLocal PostgreSQL suiteHosted Neon run
Two parents, one space leftSynchronized at the lockPassed
Two promotions for different campers, one space leftSynchronized at the lockPassed
The same camper promoted twice at onceOne succeedsPassed
Parent registration against staff promotion, one space leftSynchronized at the lockPassed
Four parent registrations, two spacesHosted case onlyPassed
Promotion against an ordinary update that takes a placeCoveredNot a hosted case
Reducing capacity below the confirmed rosterRejectedNot a hosted case

What the prototype established

Use the framework where it helps. Keep the database for database problems.

  1. Model repeat attendance around people who persistFamilies and campers outlive any one summer, so they are records in their own right.
  2. Separate current identity from historical factA profile can change. What a parent confirmed for a past registration should not.
  3. Separate editing records from reading operationsA generated admin is good at the first. The second deserved its own view.
  4. Make the capacity rule domain-wideEvery path that can use up a place follows the same lock and re-check, not only the Promote button.
  5. Test where an abstraction stops fittingThe boundary between the framework and SQL was measured, not assumed.
Owned by

Payload

The data model and relationships, sign-in and access rules, hooks and validation, the generated admin, and ordinary reads and writes.

Owned by

Custom Next.js views

The returning-family experience, the staff operations view, and the public read-only demo.

Owned by

PostgreSQL directly

The session row lock, and in a separate experiment, report-shaped queries on the same database.

Where the boundary falls.

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

What this prototype is not.

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.

Deliberately left out

  • Real payment processing. Payment status and amounts are simulated.
  • Email or SMS notifications.
  • Self-service signup, password recovery, and first-time family onboarding. Staff set up household records.
  • A production audit trail, and a backup, retention, and privacy design.
  • Persistent file uploads.
  • A usability study with camp staff.

Known limits of what’s there

  • The capacity rule is an application protocol. Writes that bypass the application are outside it.
  • Concurrency was tested in bounded cases, not under multi-instance load.
  • Age ranges are displayed, not enforced.
  • A session’s manual “Full” status is not kept in sync with the calculated count.
  • Saving a profile and creating a registration are separate steps, not one transaction.
  • The staff screens load their small demo rosters in full. Pagination was tested in the query experiment, not added to those screens.

A simple first step

Tell me what you’re working on.

A few sentences about your business, your current setup, and what you’d like to improve are enough to start.

Let’s talk about your project