What it does
code-rescue-new is two applications that share one booking core: the public website where prospects learn, book and pay, and the dashboard where each client sees what its AI voice agent did.
The public site
- Service pages and content. Seven service pages for the services Code Rescue sells, a blog, pricing, frequently asked questions, a contact page, search, a newsletter signup, RSS, sitemaps and an
llms.txtfile so AI assistants can read the site accurately. - Booking. A booking page that shows real open times from Google Calendar and books a call in one step, protected by Cloudflare Turnstile.
- Order and pay. Stripe checkout with server-side payment verification.
- Proposals portal. Each prospect gets a private proposal page. The system records when it is viewed and when it is accepted, and sends email notices through Resend.
- Invoices. A route group for client invoices.
- Digital business card. A card page with a downloadable vCard.
One booking core, two front doors
- Shared code. A single
createBookingfunction and a single availability function serve both the web form and the voice agent, so a booking made by phone and a booking made online follow exactly the same rules. - Web path. The calendar booking route checks Turnstile, checks availability and books.
- Voice path. Two routes for the voice agent, check availability and book, authenticated with a bearer token, so the ElevenLabs agent can offer a caller real times and book one while the caller is on the line.
- Calendar. Each booking creates a Google Calendar event with a Google Meet link, sends invitations and sets reminders. Availability is read through Google's free-busy service.
- No double booking. A unique database index on the time slot makes two bookings for the same slot impossible, even if they arrive at the same instant.
- Time zones. A dedicated conversion turns the caller's or visitor's local time into UTC correctly.
- Confirmations. Resend sends a confirmation email for every booking.
- Rate limiting that fails closed. If the rate limiter cannot decide, the request is refused, not waved through.
After the call
- Signed webhooks. When a voice call ends, ElevenLabs sends a post-call webhook. The platform checks its HMAC signature, stores the call with its transcript and outcome, and emails the team a summary.
The client dashboard
Built on Next.js 16 with Clerk sign-in, each client organization gets its own workspace:
- Overview: four headline figures, an activity feed that refreshes every 15 seconds, and charts of calls and bookings over time.
- Calls: every call the agent took, with the full transcript in a side drawer.
- Bookings: every booking, marked by where it came from, the website or the voice agent.
- Leads: calls and bookings joined into one list of people by phone number and email, linked to an outreach database.
- Intelligence: call scorecards, failure patterns and proposed prompt fixes from his voice-AI quality platform, helm-intelligence.
- Workspaces and team: organization switching and team management, plus a profile page.
- API routes for agents, bookings, calls, intelligence, leads, statistics and the ElevenLabs webhook.
Three layers of tenant isolation
- Middleware refuses any dashboard request without a signed-in user.
requireTenantIdresolves the organization from the session and returns 401 or 403 when it cannot, before any page or route runs.- Every database function takes a tenant ID as a required argument. The tenant ID is never read from the request, so one client cannot ask for another client's data even by editing a URL.
What it achieved
- It bills real clients. Prospects find the services, book calls by web or phone, receive proposals, accept them and pay through the platform.
- 65,236 lines of application code in 560 files, with 43 screens and 25 service routes, across 144 commits.
- One booking engine behind both a website and an AI phone agent.
- Seven services sold through the site.
- Client dashboards that show each business its calls, bookings, leads and call-quality intelligence, with data isolated three times over.
The problem it solves
An agency selling AI voice agents needs more than a website. Prospects must be able to book a call at any hour; the voice agent that answers the phone must book into the same calendar without conflicts; every call needs to be stored and shown to the client it belongs to; and proposals, payments and invoices need a home. Stitching those together from separate tools leaves gaps: double bookings, calls nobody sees, and client data that could leak between accounts. code-rescue-new puts them on one booking core and one database, with isolation enforced at three points so a mistake in one layer is caught by the next.
How he built it
Maxwell wrote a twelve-part blueprint for the platform and put it through two adversarial reviews before building. He then directed AI agents to build it against that blueprint, with every commit passing Husky pre-commit hooks and lint-staged, and pnpm gate as the single acceptance check. Both test configurations enforce 80 percent coverage of branches, functions, lines and statements, and a build that drops below it fails. He keeps an AI engineering index of 17 documents for the agents that work on the code, including a list of known traps and an incident playbook, so the lesson from every failure is written down where the next agent will read it.