Sales funnel, lead form and booking
Sales funnel: ad to opt-in to sales video to a qualified booking, with a double-booking rule (skeleton)
The wiring for a four-step sales funnel (an ad, an opt-in page, a sales video and a booked call) and what each step still needs. The lead form hands every lead to your app’s own contact store, and marketing email needs a separate, explicit yes. The booking rule refuses a double booking and any time given without a time zone. A skeleton: no page builder, no payments and no calendar sync.
A feature of the Playground
This is a feature of the Vibe Coder Playground. It runs inside the Playground, with its audit record and its caveats beside it.
The mistake it removes
Three, all quiet. A booking rule that compares times without a zone books the wrong hour, and one that accepts a zero-length or reversed slot lets any number of bookings through, so both are refused. A lead form that sends its data nowhere thanks every visitor and keeps nothing, so the recorder will not start without the host's contact store. And a lead is not permission to email: marketing consent is a separate explicit yes, stamped with the privacy text the visitor saw, and the nurture check refuses everyone without it.
What the audit found
Named rather than summarized. The reasoning behind each one ships inside the block, so it travels with the code instead of living on a page you have to trust. A finding marked fixed was fixed after the audit ran; the verdict above is still the one the audit gave.
- funnelProblems crashes on a prototype key as the VSL structure name major · Security Fixed after the audit in
a3cc9bc85 - checkBooking fails OPEN when `existing` is not an array, contradicting its fail-closed claim major · Correctness Fixed after the audit in
520fa8c28 - The UTC-offset hour bound is decorative: mutant survived minor · Correctness Fixed after the audit in
39329f996 - A slot has no maximum length; a multi-year booking blocks a calendar minor · Correctness Fixed after the audit in
daac89353 - The lead recorder trusts the email shape entirely to ui-form minor · Privacy & data Fixed after the audit in
fb2cc91d9
What lands in your project
node
- node/booking.js
- node/funnel.js
- node/lead-form.js
Pure functions over injected data: no store is assumed and no package is imported. booking.js: checkBooking(existing, slot) is the conflict rule, requestBooking({existing, slot, bant}) qualifies first. funnel.js: FUNNEL_STEPS, nextStep, funnelProblems. lead-form.js: OPTIN_FIELDS / BOOKING_FIELDS and createLeadRecorder({saveLead, policyVersion}) are ui-form's fields and onSubmit.
What you supply
- saveLead: your app's function that stores a lead: the CRM contacts store's recordWebsiteSignup takes the lead as built and keeps one lead per email, so a visitor who submits twice updates their lead instead of adding a second; the recorder refuses to start without it
- policyVersion: the version of the privacy text shown beside the marketing-consent checkbox, stamped on every consent record
- formHandler: route the opt-in and booking forms through ui-form's createSubmitHandler with OPTIN_FIELDS or BOOKING_FIELDS, so rate limits, the honeypot, required fields and length limits all apply. recordLead re-checks only the email address, with ui-form's own rule: it throws (code invalid-email) on a line break, a missing @ or a malformed address and saves nothing. It is a backstop, not a replacement for the handler
- resource: the calendar a booking is made on; two bookings conflict only on the same resource
Get it
Download the Playground See pricing
A feature of the Vibe Coder Playground.
Questions
- Is Sales funnel, lead form and booking audited?
- It was audited on 2026-09-29, and the verdict was not a clean pass. 5 findings have been fixed since then, and the verdict stands until the block is audited again.
- How do I get this?
- It is a feature of the Vibe Coder Playground. Download the Playground, and see the pricing page for what each plan includes.
All Playground features · Free code blocks · Learn to build from zero · The coding guide