By the end of this lesson your mini CRM will add leads with a checked Indian mobile number, list and filter them, keep a timeline of notes and status changes, and show today's and overdue follow-ups.
You need: the mini-crm folder with an approved PRD.md from lesson 1, your coding agent · Time: 8 minutes
You will build every screen with fake leads saved in the browser (localStorage) first. Real customer data goes in only after lesson 4 adds logins and database rules.
Here is the data you are building. One
leadstable holds the fields from lesson 1; two small tables keep the history:One row per enquiry, plus two history tables. Prompt · copy it into your AI agentRead PRD.md first. Goal: Create the mini CRM project and its data layer. No screens yet. Context: I am a beginner; you write all the code. This folder has PRD.md. Details: - Create a Vite + React app in this folder with the official create command. Keep PRD.md. - Put ALL data reading and writing in one file, src/lib/leadsStore.ts, so we can swap localStorage for Supabase later without touching the screens. - Data: leads (id, name, phone, source, interest, budget_inr, status, next_follow_up as YYYY-MM-DD, owner_id, created_at, updated_at), notes (id, lead_id, text, created_at), status_changes (id, lead_id, from_status, to_status, changed_at). - For now save everything in localStorage under the key "mini-crm-v1". Rules: Ask me before installing any package other than what the create command installs. Do not build any screens yet. Done when: the app starts with npm run dev, and you show me the list of functions in leadsStore.ts with one line each on what it does.
Then make your first save point, as in Build screen by screen:
git init,git add -A,git commit -m "Project and data layer".Why?Fake data in the browser means a bug can never leak a real customer's phone number. Keeping all data code in one file makes lesson 4 a single, small swap instead of a rewrite of every screen.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- The Add lead form, with Indian mobile checks
- The Leads list with search and filters
- Lead detail: notes and status history
- The Today screen: due and overdue
- Fill it with fake test data
- Recap