How I Rebuilt Desert Vibes on Supabase in 4 Days
A solo rebuild of a bilingual Saudi desert-tour site, from Payload CMS to Supabase, with a booking inbox, fixed Arabic SEO and AI assistants that can book tours.
- Next.js 16
- React 19
- TypeScript
- Supabase
- Resend
- next-intl
- Tailwind CSS 4
- shadcn/ui
- MCP
- Vercel
TL;DR: Working alone, I replaced the Payload CMS behind Desert Vibes, a bilingual (English/Arabic) tour operator in Riyadh, with Supabase and a purpose-built admin. The rebuild cut the codebase by 27,432 lines. In the next three days I added a booking inbox, fixed every critical issue in the site's SEO audit, and shipped two MCP servers so AI assistants can search tours and send booking requests. Before this, every booking came through a phone call or WhatsApp.
Introduction
One pull request moved 224 files from Payload CMS to Supabase and left the codebase 27,432 lines smaller. The public site kept its design. The admin was rebuilt around the job the business does every day: answering booking requests.
Desert Vibes runs private tours around Riyadh: Edge of the World, Historic Diriyah, a desert camp and twelve more. The site serves 42 pages in two languages, with a full right-to-left layout for Arabic. Customers don't pay online. They send a request, and the team confirms by phone.
The site is now in its marketing phase. This case study is about getting the product ready for its first customers: what I removed, what I built, and what I would change.
The Challenge
The site did far more than the business needed, and the part it needed most did not exist.
Until the rebuild, every booking arrived by phone call or WhatsApp. There was no record of a request and no status. Tour details lived wherever someone last wrote them down.
The first version of the site was built on a Payload CMS starter. It shipped with Moyasar card payments, coupons, customer accounts, a blog, seat-capacity checks and the full Payload admin. In October 2026 I hardened that flow. I verified every payment on the server, made the payment webhook fail closed, replaced email-based booking access with per-booking tokens, and serialised seat checks with a Postgres advisory lock.
The work was correct, but I was securing a checkout the business would not use. Desert Vibes confirms every booking by phone, so payments, coupons and accounts were attack surface with no revenue behind them.
The public site had gaps too. An SEO audit on 7 November 2026 scored it 54/100:
- Every canonical URL pointed at a redirect. The apex domain 308-redirected to
www, but canonicals, hreflang, the sitemap and the structured data all used the apex. - Arabic tour pages carried English metadata. The imported Arabic SEO fields were English copies, so all 15
/ar/tours/*pages showed English titles. An initial check found almost no Arabic-language competition for these searches. - The brand appeared twice in every title, as in "Historic Diriyah | Desert Vibes | Desert Vibes".
- Tour pages were thin, at 56 to 266 words, because the admin had no good way to enter an itinerary or inclusions.
The Strategy
I cut the system down to the booking-request model the business uses, then built the admin around it. Four decisions shaped the rebuild.
1. Supabase instead of an embedded CMS. Content, booking requests and admin accounts moved to Postgres with row-level security (RLS), Supabase Auth and Storage. The deciding factor was putting security in the database, not in app code. Public pages read through the publishable key, and RLS returns only published tours. The anon role has no insert policy on booking_requests, so nobody can write a request straight to the API. Only a server action holding the secret key can.
2. Remove, don't port, what the business doesn't use. Payments, coupons, customer accounts and the blog were deleted, not migrated. The README notes that they can return on top of booking_requests if the business needs them later.
3. Admins defined in Auth metadata, not a users table. An admin is a Supabase user whose app_metadata.role is admin. Only the secret key can set app_metadata, so no user can promote themselves. The panel checks the role on every request.
4. One code path per business rule. Pricing, group-size rules, rate limits and status transitions each live in one module. Every entry point calls that module: the website form, the admin panel and, later, the MCP servers. This is why both MCP servers took one day.
The main risk was losing content. I exported all Payload content to supabase/seed/content.json and loaded it into Supabase with a seed script.
| Option | Ongoing maintenance | Security model | Fit with phone-confirmed bookings |
|---|---|---|---|
| Keep and patch Payload | High: payments, coupons, accounts | App code | Poor: most features unused |
| Headless CMS plus a separate database | Medium: two systems to run | Split across both | Medium: still two admins |
| Supabase and a custom admin | Low: one schema, one admin | RLS in Postgres | Good: shaped around requests |
The Implementation
I built Desert Vibes alone, from 20 May to 10 November 2026. The rebuild and its follow-ups landed in four days, from 7 to 10 November.
- Supabase migration (7 Nov). I wrote the schema, RLS policies and media bucket as migrations, seeded the exported content, and built
/adminon the shadcnsidebar-07block. - Internationalisation on next-intl (7 Nov). I replaced a hand-rolled dictionary with next-intl. Only the 149 strings still in use moved to
messages/en.jsonandmessages/ar.json, andt()keys are type-checked. The layout moved under[locale], so switching language re-renders<html lang dir>. Before, an inline script patched those attributes after the page loaded. - Audit fixes (7 Nov). I stripped the duplicate brand from titles. An Arabic SEO value with no Arabic letters now falls back to the Arabic title and excerpt. I turned off a
Linkheader that advertised a redirecting x-default URL. I also re-encoded the hero video without audio: 1.4 MB at 480p for phones and 3.2 MB at 720p elsewhere, down from a 6.9 MB 1080p file. - Tour editors (7 Nov). The admin gained editors for the gallery, day-by-day plan, inclusions and add-ons. That turned the thin-content problem from a code task into a content task.
- Booking inbox (9 Nov). I added new statuses (proposed, declined, completed, no-show), an activity log protected by RLS, status tabs with counts, search and keyset pagination. Actions allow only valid transitions, and each one emails the customer in English or Arabic.
- MCP servers (10 Nov). An admin server lets staff list, confirm and decline bookings from Claude, behind Supabase's OAuth 2.1 server. A public server lets any AI assistant search published tours, estimate a price and send a booking request.
Stack: Next.js 16 (App Router), React 19, TypeScript, Supabase, Resend, next-intl, Tailwind CSS 4, shadcn/ui, Vitest and Playwright. The site runs on Vercel, and the same code deploys to Cloudflare Workers (OpenNext) or Docker.
Two bugs I nearly shipped. On Windows, the native <select> for booking status saved on every arrow-key press. An admin scrolling through the options would have changed the booking each time. I switched to Radix Select, which saves only an explicit choice.
The second was subtler. Two admins could act on the same request at once. Each status change is therefore a guarded update: it succeeds only if the status is still the one the admin saw. If the update is refused, the page refreshes with the current state.
The Results
Desert Vibes went from phone calls and WhatsApp messages to a booking system with a record of every request. The codebase went from a general-purpose CMS to software shaped around that one job.
I re-checked the live site on 28 November 2026:
| Metric | Before | After (28 Nov 2026) |
|---|---|---|
| How bookings arrive | Phone and WhatsApp | Website form, plus any AI assistant through MCP |
| Codebase size after migration | ā | 27,432 lines smaller |
| Arabic tour pages with English titles | 15 of 15 | 0 of 15 |
| Duplicate brand in tour titles | Every tour | None |
| Canonical and sitemap URLs that redirect | All 42 | None |
| Hero video on phones | 6.9 MB | 1.4 MB |
| Online payment surface | Moyasar, coupons, accounts | None |
What the business can do now, without a developer:
- Run the tour catalogue in two languages. Content, prices, group sizes, galleries, day-by-day plans, inclusions and add-ons can be edited in English and Arabic. A save shows on the live site at once.
- Work booking requests through to the end. Each request moves from new to confirmed, declined, completed or no-show. Every step is logged with the admin who took it, and the customer gets an email in their own language.
- Manage the team. Any admin can invite another by email, set a password or remove access, and removed admins lose the panel at once.
- Run bookings from Claude. An admin can ask Claude for today's new requests, confirm one and email the customer, all through the same rules as the panel.
- Take bookings from AI assistants. A traveller's assistant can search tours, quote a price and send a request. It gets the same validation, rate limit and pricing as a person on the website.
There are no customer numbers yet, because the site is still in its marketing phase. The next measures to track are booking requests per month and time to first reply.
Key Takeaways
1. Delete features before you secure them. I spent real effort hardening a payment flow the business never used. Ask first which features will earn money, then secure what is left.
2. Put access rules in the database. With RLS, the admin panel, the public site and both MCP servers share one set of rules. A new entry point cannot forget a check that lives in Postgres.
3. One module per business rule makes new channels cheap. Pricing, rate limits and status transitions each had one home, so both MCP servers shipped on the same day.
4. Most SEO fixes are content, so build the editor first. The audit's biggest content problem, thin tour pages, could not be fixed until the admin had editors for itineraries and inclusions. That content is the next job.
Questions
Would this work for a business that takes online payments?
Yes, but keep the payment layer. RLS for access and one module per rule still apply. Desert Vibes could remove payments only because it confirms every booking by phone.
Why not keep Payload and turn off the unused features?
Disabled features still ship with their dependencies, admin routes and upgrade work. Deleting them, along with the admin and i18n rewrites, left the codebase 27,432 lines smaller.
What did it take?
One developer. The site took six months from first commit to the current version, and the Supabase rebuild took four days of that.
What would I do differently?
I would put a chat interface first, built on retrieval-augmented generation (RAG) over the tour catalogue, so visitors could ask questions and book in one conversation. The MCP servers prove the booking rules already work outside the form. I would also show a map of tour locations on the home page from the start, because the tours are spread across Riyadh and its region.