
🚀 An all-in-one CRM, booking, quoting and payments app for small service businesses, with role-based portals, verified online payments and AI-drafted follow-ups.
📌 At a glance
👤 Role: Solo: full-stack engineering
🗓️ Timeline: September 2026 · 9 days, 12 commits
🟢 Status: Live demo with seeded data
🧰 Stack: Next.js 16 · React 19 · TypeScript · Drizzle · Neon Postgres · Razorpay · Vercel AI SDK · Resend
🔗 Live demo: leadflow-demo-ashy.vercel.app
🎯 The problem
Cleaners, photographers, tutors and consultants usually run their business across WhatsApp, email, a calendar and a spreadsheet. Enquiries go cold, quotes get retyped into invoices, and customers have to ask for every update.
🛠️ What I built
One product for the whole revenue loop, with three roles: owners and staff work the pipeline, and customers get a portal to see appointments, accept quotes and pay invoices.
📥 Lead → ✍️ Follow-up → 📅 Appointment → 🧾 Quote → 📄 Invoice → 💰 Payment
📋 Kanban and list views of the lead pipeline
📅 Appointments with a daily reminder job
🧾 Quotes (draft → sent → accepted) that turn into exactly one invoice
💳 Online payments with Razorpay
✨ AI used for one clear job: summarising an enquiry and drafting the follow-up
🖼️ Signed direct uploads to Cloudinary, and React Email templates sent with Resend

⚡ Hard problems solved
💳 Payments that can't be spoofed. The server never trusts the browser's "payment successful". It checks that the invoice belongs to the signed-in customer and verifies Razorpay's signature, and a separate webhook marks invoices paid even if the customer closes the tab. Unique indexes stop double payments and duplicate invoices.
🤖 AI drafts grounded in real context. The follow-up writer reads the lead and the customer's 5 most recent messages, then streams a draft into the lead view. Staff edit and send it themselves; the AI never contacts a customer directly.
🧑🤝🧑 One codebase, three audiences. A role guard protects every page, action and API route, and customers can only ever see their own records.
🧮 Totals the server controls. Quote and invoice totals are always calculated on the server, never trusted from the form.

📈 Results
🌐 Deployed, seeded demo with separate owner, staff and customer accounts
🔁 The full loop from enquiry to paid invoice works end to end (Razorpay test mode)
🧭 24 app routes across 3 role-based areas
🗄️ 15 Postgres tables with database-level CHECK constraints; money stored as numeric(12,2)
✉️ 6 transactional email templates: welcome, follow-up, appointment confirmation and reminder, quote sent, invoice sent
⏱️ 9 days from empty repo to deployed demo
🔭 What's next
I reviewed my own code after shipping. These are the next improvements, in priority order:
🔐 Wrap multi-step writes (quote + line items, payment + invoice) in database transactions
⏰ Align the reminder job's time window with its daily schedule
🧪 Add automated tests and rate limits on the AI routes
💬 Need a CRM, booking or payments product for your business? Let's talk.
0 likes · 0 views · Oct 12, 2026
All-in-one CRM, booking, quoting and payments app for service businesses: role-based portals, verified online payments, AI-drafted follow-ups.