Context: B2B commercial professional (not a programmer) using AI as a copilot to build business tools. This is a lightweight lead-tracking CRM for República na Mooca, a shared-housing business in São Paulo managed remotely from Madrid.
Leads for room rentals come in from WhatsApp, OLX, Facebook, and referrals — and go cold fast if follow-up slips. Managing this with spreadsheets or WhatsApp chat history alone made it easy to lose track of who needed a callback, who had a visit scheduled, and who'd gone quiet. A remote operator (no local presence) especially needs a system that flags stalled leads automatically, rather than relying on memory.
The business operator, tracking prospective tenants from first contact through move-in (or loss) — not existing tenants, payments, or occupancy; this is purely the front-of-funnel lead pipeline.
A single-page lead tracker with:
- Pipeline stages: Novo → Já falado no WhatsApp → Visita marcada → Visitou → Interessado → Entrou / Perdido
- Automatic stall alerts: color-coded by days since last contact — red flag at 2+ days with no follow-up, independent of manual reminders
- One-click WhatsApp: opens the lead's chat and automatically logs the contact timestamp and an audit event, so "did I follow up?" is never a guessing game
- Call scheduling calendar: a monthly view showing which leads need a call on which day
- Quick-loss actions: one-tap buttons for the most common disqualification reasons ("found it too expensive," "wanted a private room"), each logged with a reason for later pattern analysis
- Event log per lead: every creation, edit, contact, and status change is recorded (
lead_eventstable) for a full audit trail
Next.js App Router (single page, client-side state)
↓
Supabase client (env-based config, no hardcoded credentials)
↓
Postgres tables: leads (core record) + lead_events (audit trail)
- Next.js (App Router) + React + TypeScript
- Tailwind CSS
- Supabase (Postgres + client SDK)
- Deployed on Vercel
Live tool in production (deployed on Vercel), used to manage real prospective-tenant leads for a business with real revenue and real churn — not a demo. The stall-alert logic exists specifically because manual tracking let leads go cold before follow-up.
- Requires a Supabase project with two tables:
leads(see theLeadtype inapp/page.tsxfor the full field list — name, phone, source, status, visit/call timestamps, notes, tags) andlead_events(id, lead_id, event_type, description, created_at) - Set environment variables:
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEY npm install && npm run dev
- Move from client-side-only state to server actions / API routes for write operations
- Add basic auth (currently open to anyone with the URL)
- Surface loss-reason analytics (which disqualification reasons are most common, by source)
Built with Claude as a development copilot.