howtocodeai.com
Tutorials / Intermediate

Build Your Own CRM With AI (Contacts, Pipeline, Follow-Ups)

Stop renting a bloated CRM for one user: contacts, deal pipeline with drag-and-drop stages, activity notes, and the follow-up list that actually makes you money.

DifficultyIntermediate
TimeA weekend
You'll needClaude · Free Supabase account · The auth tutorial done first (or skip auth for single-user local)
You'll buildA real CRM: searchable contacts, a kanban deal pipeline, timestamped notes per contact, next-action dates, and a 'who to follow up with today' view — shaped to your actual sales motion.

Commercial CRMs are priced for sales teams and designed by committee — which is why every freelancer and small operator either pays $30+/month for 5% of the features or 'keeps it in a spreadsheet' (i.e., loses deals to forgotten follow-ups). The actual data model is humble: people, deals, notes, dates. The actual value is one query: who needs contact today. Both fit comfortably in a weekend build you'll shape to how YOU sell.

Step 1 — Model your real pipeline, not Salesforce's

Before code, name your stages out loud — a freelancer's might be Lead → Contacted → Proposal Sent → Negotiating → Won/Lost; a landlord's, an author's, a recruiter's all differ. Then the data model writes itself: contacts (name, email, phone, company, source, tags), deals (contact_id, title, value, stage, next_action_date), notes (contact_id, timestamped text). Ask Claude to 'design the Supabase schema for this CRM — tables, types, foreign keys, indexes for search — and the SQL to create it,' with your stages baked in. If you did the auth tutorial, add user_id + RLS per its pattern; building single-user-local first is also legitimate — the schema survives the upgrade.

Step 2 — Build the three screens

Build the CRM frontend as a single HTML file (supabase-js from CDN; schema below). Three views with a top nav: (1) CONTACTS — searchable, sortable table; click opens a detail panel with their info, their deals, and a notes timeline with an add-note box; (2) PIPELINE — kanban columns for my stages [list them], deal cards showing title/contact/value, drag-and-drop between stages (update the DB on drop), column totals in dollars; (3) TODAY — every deal whose next_action_date is today or overdue, sorted oldest first, with one-click 'done, schedule next' that prompts for the next date. Quick-add buttons for contact and deal from anywhere. Dense, fast, keyboard-friendly design — this is a work tool, not a brochure. Complete file. [paste schema]

Worth knowingThe TODAY view is the whole CRM — pipelines are for feeling organized; follow-up lists are for getting paid. If you build only one view well, build that one, and make 'schedule the next action' impossible to skip when closing the current one. A deal without a next_action_date is a deal you've already lost quietly.

Step 3 — Load real data, feel real friction

Import your actual contacts (Claude converts any CSV export to insert statements or a one-time import script). Then work a real week in it. The frictions you hit are the spec for round two: 'logging a call takes too many clicks' → quick-log buttons; 'I can't see deal age' → days-in-stage badges that go red; 'I forget where leads came from' → make source required. A CRM molded by one week of real use beats any template, because the template was molded by someone else's job.

Step 4 — The multiplier features

Proven worth-its: email integration the cheap way (a mailto: button per contact + paste-the-thread-into-notes habit); a stats bar (pipeline value by stage, win rate, average days-to-close) once you have a month of data — the spreadsheet-analysis tutorial's thinking applied to your own table; CSV export (it's YOUR data — keep the exit door); and the Telegram-bot tutorial's pattern for a morning message listing today's follow-ups, which turns the CRM from a place you visit into a thing that nags you.

Step 5 — Know your scaling line

Honest boundaries: this architecture is excellent for one user and fine for a small team (auth + RLS adjusted for shared visibility — ask Claude for 'team-readable, owner-writable' policies). What it doesn't do is the enterprise layer — email sync, dialers, marketing automation, permissions matrices. If you grow into needing those, you'll migrate via that CSV export with a year of perfectly-shaped data and exact knowledge of your requirements. Most solo operators never hit that line; they just stop paying $400/year for software that was always 90% buttons they feared clicking.

Keep going

Need somewhere to put it live? See where to host AI-built sites. Compare tool costs on the pricing tracker (or stick to the free options), then pick your next build.