Overview
RedStick Booking is multi-tenant booking software paired with a customer-facing website that each business designs itself. A salon, barber, tattoo studio, fitness studio, or mobile detailer signs up, picks a look drawn for their trade, and makes it their own in a structured block editor. Booking, payments, and their own domain come built in. Owners can build the site themselves on the Self-Managed plan, or have our team build and maintain it on the Managed plan, which has a full design workflow built into the product.
It handles 1:1 appointments with multiple staff, group classes with capacity and waitlists, room and equipment rentals, and multiple locations, all in one booking engine. Customers book in a few taps on the business's own site, pay a deposit or the full price through the business's own Stripe account, and get their reminders by email. The first commit landed on September 20, 2026. It went to production on October 27.
My Role & Contributions
I'm the architect and sole engineer, and I built RedStick Booking as the supervisor of a team of AI agents. I wrote the build plan and the architecture specs, made the locked decisions, wrote every brief, reviewed every diff, and merged every wave. My key contributions include:
- Product & Architecture: I turned a single-tenant booking app I'd built for one tattoo artist into a generic, multi-tenant product, re-deriving every design decision from first principles instead of carrying the old one forward.
- Data & Tenancy: I designed the shared-schema Postgres model, its row-level security, and its per-app database roles, and verified each design choice against the Postgres source and catalogs before anything was built on it.
- Booking Engine: I specified the availability algorithm and the booking write paths, including the locking order that keeps a busy Saturday morning from ever producing two bookings for the same chair.
- Agent Orchestration: I designed the process that let parallel agents build a monorepo of 4 apps and 31 packages without stepping on each other: owned paths, frozen contracts, gates, and adversarial reviews.
- Infrastructure: I deployed it on Kubernetes, with automatic TLS for verified custom domains.
The Challenge
Small service businesses usually end up with two disconnected tools: a website builder that doesn't know anything about their schedule, and a booking app that drops customers onto a page that doesn't look like the business. Gluing them together means embeds, redirects, and a booking flow that breaks the brand at the exact moment a customer is ready to pay.
The engineering challenge is that the merged product has to be generic and correct at the same time. One codebase has to serve a barber with three chairs, a yoga studio with a waitlist, and a court-rental business that books by the hour. It has to keep every tenant's data invisible to every other tenant, and it has to stay correct when twenty people try to book the same Saturday slot in the same second. A booking platform that double-books even once loses the business's trust for good.
The Solution
Tenancy the database enforces
Every tenant table is created through a single helper that puts the tenant into the primary key itself, so foreign keys are composite and a cross-tenant reference can't even be written. Row-level security is enabled and forced on every one of them, and it fails closed: a query that hasn't declared its tenant sees nothing. Repositories pass the tenant explicitly as well, so isolation has two independent, separately tested layers.
Each app connects as its own least-privilege Postgres role, and no application role can bypass row-level security. A catalog test introspects every table, policy, and grant and fails the build if anything drifts from what's declared.
Some of the most valuable work here was in the details. Postgres only lets "leakproof" operators use an index under row-level security, and range overlap and enum comparison aren't on that list. So filterable columns are text with CHECK constraints instead of enums, and busy-time reads use plain btree columns. EXPLAIN tests pin those plans, so a well-meaning refactor can't quietly turn an index scan into a table scan.
Double-booking is impossible by constraint
Every booking claims its staff, rooms, and equipment through allocation rows, padded with the service's buffers. A Postgres exclusion constraint guarantees that no two active allocations for the same resource overlap, so a double booking can't be committed no matter what the application code does.
Constraints alone can deadlock under contention, so writes serialize per resource in a fixed order first. The ordering only directs traffic; the constraint is the proof. Nothing locks a whole tenant or the whole system, so a rush on one stylist's Saturday never slows down anyone else's bookings. When a customer asks for "any stylist," a busy stylist never costs them another who's free right now.
Classes and rentals run on the same engine. A class session claims its instructor and room through the same allocation table, so a class and a 1:1 appointment can never collide. A waitlist offer is a held booking created inside the transaction that frees the seat.
A pure availability engine
Availability is computed by a pure function with no I/O and an injected clock. It works with interval arithmetic instead of checking slot by slot: working hours, intersected with location hours and overrides, minus padded bookings, time off, and busy time imported from Google and Outlook calendars. A service can need several resources at once ("one of these stylists and one of these rooms"), and a time is offered only if every requirement can be filled by distinct free candidates, with bipartite matching where the candidate sets overlap. Daylight-saving transitions get a round-trip check. Results are cached, and the write path never trusts the cache.
A site builder bound to live data
The editor is built on Puck, which I chose after a pass/fail spike against the exact React and Next.js versions in the stack. Owners compose pages from more than 40 blocks, such as a service menu, a class timetable, a staff grid, a next-available badge, and the booking widget itself, all reading from the same booking backend. Theme tokens drive colors, type, corners, and buttons, and the booking flow takes on the site's look automatically.
Published sites are served cache-first, and every replica drops the old page the moment an owner publishes. Getting that right meant reading the compiled Next.js source to find every cache layer that has to be invalidated together. Custom domains get automatic TLS once a tenant has verified them.
Core Capabilities
- Four Booking Models, One Engine: 1:1 appointments with multiple staff, group classes with capacity and waitlists, resource and room rentals with variable duration, and multiple locations, including virtual and mobile services that travel to the customer.
- Booking the Way a Business Works: Instant booking or requests the owner approves with a quote, intake forms with file uploads and consents, add-ons, buffers, lead times, and per-service policies that are snapshotted onto each booking so a policy change never rewrites a past agreement.
- Payments With No Commission: Deposits, full prepayment, no-show and late-cancel fees, packages and gift cards, tips, and refunds, all through Stripe Connect direct charges, so the money goes to the business's own Stripe account.
- A Site That Looks Like the Business: Twelve trade-specific starting looks, per-tenant themes, version history, preview links, phone view, and subdomains or verified custom domains with automatic TLS.
- Booking Anywhere: An embeddable booking button for any other website.
- Calendar Sync: Two-way Google Calendar and Outlook sync.
- Customer Accounts Without Passwords: Customers sign in without a password and don't need a new account for each business.
- Managed Plan Workflow: A design brief at signup, change requests from the dashboard, and a queue where our team picks up work, edits the site, and optionally waits for the owner's approval before publishing.
Technical Architecture
- Monorepo: A TypeScript monorepo with 4 deployable apps and 31 packages on pnpm and Turborepo. Packages are layered and can import only from layers below them, which is enforced by lint rules and a workspace dependency check.
- Apps: A public sites app, an owner dashboard, internal tooling, and a background worker, each built with Next.js and React except the worker.
- Data: PostgreSQL with Drizzle. Every transaction is explicit and short and never does network I/O while it's open.
- Side Effects: Domain events go into a transactional outbox in the same transaction as the change, and a background worker delivers the side effects: emails, reminders, calendar sync, and cache invalidation. Consumers treat events as triggers and current state as truth.
- Caching: The cache never holds the only copy of anything that matters, so losing it costs speed, never data.
- Infrastructure: Kubernetes.
How I Built It: A Supervisor and a Team of Agents
I built RedStick Booking by applying the same engineering management I'd use with a human team to a team of AI agents. I acted as the supervisor. I planned the work in waves: a foundation phase, then domain services, then a walking skeleton of vertical slices, then product depth, completion, and hardening. Within a wave, several agents worked in parallel in isolated git worktrees, each on its own branch.
The rules that made that work:
- Every brief has owned paths. No two concurrent agents share a file, and a CI ownership check enforces it.
- Contracts freeze during a wave. The database schema, UI kit, and root config are frozen while a wave runs. An agent that needs a schema change files a Schema Change Request, and the change is applied serially on the wave branch.
- The right model for the job. The most capable model handles irreversible correctness work like tenancy, money, and booking transactions. Lighter models handle well-specified screens and mechanical fixes.
- Green gates aren't smoke tests. Anything that renders is verified in a real browser, with screenshots in the agent's report.
- Adversarial review before merge. Each wave goes through independent adversarial reviewers, including a security review, and findings are fixed before it lands as one pull request I review myself.
- Mistakes become rules. When an agent makes the same mistake twice, the lesson goes into the repository's agent instructions, with the reason attached.
Every decision is written down with its reasoning. The decision log holds nearly 250 entries, and anyone, human or agent, can trace why the system is the way it is.
Testing & Reliability
Integration tests run against a real Postgres, cloned from a template database for speed, because the guarantees that matter most here (row-level security, exclusion constraints, lock ordering) only exist in the database. The suite has more than 1,500 unit and integration test files, plus 170 Playwright end-to-end specs that drive production builds in a real browser. Concurrency tests fire hundreds of simultaneous bookings at the same slot and assert that exactly one wins and every other gets a clean "slot taken" answer.
Impact
- Empty Repository to Production in Five Weeks: From the first commit on September 20 to a production release on October 27, then continuous delivery from there, across nearly 1,200 commits.
- Correct by Construction: Double-booking and cross-tenant data access are prevented by the database itself, not by code that has to remember to check.
- Generic by Design: The business the original app was built for now runs on the generic product. Every behavior of that app is mapped, row by row, to generic configuration in a capability matrix, so serving it takes settings, not custom code.
- A Repeatable Way to Build: RedStick Booking proved that a spec-first, gate-driven process can direct a team of AI agents to a production-grade, multi-tenant system without giving up the engineering rigor I'd expect from a senior human team.



