Hidden Leaves · 2026
Multi-role booking platform for stays and tours
Shippedhiddenleaves.scrocle.cloudIndependent engineer

The dark theme homepage captured from hiddenleaves.scrocle.cloud. The search card takes the trip dates and guest count, while the price quote is calculated on the server.
Travel operators outgrow brochure sites bolted to external booking widgets. A widget only handles basic checkout, offers a single permission tier, and often calculates room totals in the browser where a visitor can tamper with the payload. The product needed public search, server-calculated booking quotes, guest dashboards, and separate staff and admin moderation tools in one codebase.
The constraint
The public demo has to prove the product without showing real customer details or exposing an admin route. Login details for the demo are printed on the live page.
Built with
Next.jsTypeScriptPrismaNextAuth
How it works
Public catalogue and booking flow run on Next.js. Mutations check NextAuth roles before querying Prisma. Price quotes compute on the server. Reviews wait for staff moderation.
Architectural calls and their cost
Every design choice, the operational pressure behind it, what it bought, and the ongoing maintenance cost.
One product for three roles
An embedded booking widget gives you one permission level. The operator needed guests booking trips, staff managing inventory, and admins moderating reviews against the same database.
I built the public catalogue, guest dashboard, and staff moderation views inside a single Next.js and TypeScript codebase, sharing types from database to UI without syncing between a marketing site and a back-office app.
The cost: Permission logic is part of every feature from the first commit. There is no separate admin app to retrofit rules onto later.
Prices are computed on the server
A booking quote assembled in the browser is an editable suggestion. Anyone can open devtools, and on a public demo someone will.
Nightly rates, taxes, and offer discounts are calculated on the server from Prisma records before the browser sees a total, producing tamper-proof quotes that a visitor cannot edit in devtools.
The cost: Every price display is a round trip, and the client holds no authoritative number of its own.
Roles live in the mutations
A role badge in the interface proves nothing. The network tab is right there.
Every server mutation verifies the caller’s NextAuth role before touching Prisma and separates review submission from review publication, enforcing access control even when someone calls an API route directly.
The cost: Every write path carries its own check, on the server, every time.
One schema, sessions beside the queries
NextAuth needs the same account records that Prisma queries. Keep them in two places and they drift.
Stays, tours, reservations, and accounts sit in one Prisma schema, and NextAuth sessions resolve against the same records. A role check sits next to the queries it protects.
The cost: The schema is the contract. A role change is a migration and a code review, and there is no setting to flip.
What shipped
Live views from hiddenleaves.scrocle.cloud running against sample stays, guest bookings, and moderated reviews.



You can test the live product right now at hiddenleaves.scrocle.cloud without creating an account. The sign-in page displays a prefilled demo credential so you can log straight into the guest dashboard, inspect existing reservations, save stays to a wishlist, and walk through the booking flow.
Under the surface, the application solves the two traps that break most custom booking sites: client-side price math and UI-only permission checks. Every room rate, package price, and seasonal offer is assembled on the server from a single Prisma schema and sent to the browser as a read-only quote. Changing a number in browser devtools leaves the server reservation record untouched.
Guests, staff, and administrators share the same Next.js deployment, but every write path verifies the session’s role on the server before executing a database mutation. A guest can submit a review, for example, but only a staff or admin session can flip its state to published. When handed over for a private deployment, the demo banner and sample fixtures come out, leaving a production booking platform ready for live inventory and payment keys.
Current status and proof
Shipped and live. A private deployment starts from this codebase with the demo sanitization removed: the same product against real inventory and real staff roles.
- The site is live at hiddenleaves.scrocle.cloud with destinations, packages, hotels, activities, offers, and reviews, plus help and legal pages.
- The demo account printed on the login page signs in and lands on the guest dashboard with Overview, My bookings, and Wishlist.
- The demo discloses itself: a banner states that no real bookings or payments are made, and the reviews it shows are labelled as samples.
- Deliberately left out of the public demo: real customer data, payment processing, and any admin route.
What was handed over
- Source and schema
- Role map and which mutations each role may call
- How to run locally and how the production host is started
- What is sanitized in the public demo versus a private deployment