PRD Agent logoPRDAgent

Custom dual-market real estate CRM with pipeline, contacts, tasks, calendar, automated follow-up, and commission tracking

COMPLETE
TBD
$1
9 features
4 milestones
1 role

Project Overview

Problem Statement
Stop leads from falling through the cracks and give my team one place to manage follow-up, pipeline milestones, and commissions.
Ideal Customer Profile
Small real estate team: primary admin (owner/agent) plus 2 team members (agents/support) working Pasadena & DMV markets
App Audience
Internal tool for personal use and small team (potential future SaaS)
Project Type
Update to existing app (in progress)

Next.js 16 App Router/Turbopack CRM in progress with routes: Command Center dashboard, Contacts directory, Contact master profile, Pipeline, Tasks, Calendar, Settings. Dark-mode Tailwind theme. Uses Supabase Postgres with SSR auth and strict RLS; mutations via secure createClient from @/lib/supabase-server. Calendar page merges calendar_events, tasks, and transaction milestones. Pipeline needs validation/audit re: Kanban/List view matching RLS.

Integrations
Google (Gmail and Google Calendar) via OAuth; Google Contacts one-way sync (import only) mapping Google contact labels to CRM tags; lead sources via backend API: Follow Up Boss, Curb Hero, Luxury Presence, and generic webhooks. SMS via Twilio.
Tech Stack Preferences
Next.js 16 (App Router/Turbopack), Tailwind CSS (dark mode zinc-950 + blue accents), Supabase Postgres, Supabase SSR auth with HTTP-only cookies, strict RLS, server-side mutations using secure Supabase server client. Backend API for integrations.
Deployment Preferences
Vercel (Next.js) + Supabase (Postgres/Auth)
Design Status
Have existing UI direction and screenshots; dark-mode Tailwind theme defined

Features

Google Contacts One-Way Sync (Labels → Tags)
One-way import/sync from Google Contacts into CRM. Pull contacts from Google People API, optionally filtered by selected Google contact labels. Convert Google contact labels into CRM tags. Sync is import-only (no writing back to Google Contacts).
  • Google People API OAuth scopes + consent

    Add required scopes for reading Google Contacts (People API); update OAuth consent and token storage.

  • Label selection + mapping rules UI

    UI to select which Google contact labels to sync and how to map labels to CRM tags (default: label name → tag).

  • Import/sync job

    Implement one-way sync job to fetch contacts, upsert into CRM contacts, and attach tags derived from labels; handle pagination and incremental sync using sync tokens if available.

  • De-dupe and matching strategy

    Define match rules (primary email/phone, Google resourceName) to avoid duplicates; log conflicts for review.

  • Audit log + manual re-sync

    Show last sync time/status; allow manual 'Sync now' and basic error reporting.

Pipeline (Kanban)
Kanban pipeline for active deals/leads across 3 deal types with defined stages: Buyers (Lead → Nurturing → Searching → In Contract → Closed), Sellers (Lead → Nurturing → Preparing → Listed → In Contract → Closed), Outgoing Referral (Sent → Accepted → In Contract → Closed). Must respect Supabase RLS for multi-user team access.
  • Define pipeline data model

    Create/confirm DB tables/columns for deal type (buyer/seller/outgoing referral), current stage, market (Pasadena/DMV), assigned agent, key dates, and links to contact record; ensure indexes for stage queries.

  • Implement Kanban board UI

    Kanban columns per stage based on deal type; drag-and-drop to move cards; card shows key info (name, stage, due milestone/close date, assigned agent).

  • Stage transitions + validations

    Enforce allowed stage transitions per deal type; update stage via server actions using Supabase server client; handle optimistic UI + error states.

  • RLS audit for pipeline queries

    Validate that Kanban/list fetching and mutations follow strict RLS; ensure users only see/update permitted records.

  • Filters and segmentation

    Filters by market (Pasadena/DMV), deal type, assigned agent, and search.

Contacts Directory + Contact Profile
Contacts directory with filtering/pagination and a master contact profile that supports core contact info, buyer requirements, seller details, referral details, notes/timeline, and per-contact tasks. Includes commission calculator that varies by market (DMV vs Pasadena) and activates when in/under contract.
  • Contacts directory table

    Implement contacts table view with pagination, filtering (market, assigned agent, tags, source, stage), and search; ensure RLS-compliant queries.

  • Core profile fields

    Implement core profile form fields: name, emails, phones, source, tags, assigned agent, market, referral yes/no, notes, pipeline status; validation and server-side mutations via Supabase server client.

  • Buyer requirements section

    Implement buyer requirements fields: beds/baths, price, cities/zips, timeframe, lender, pre-approval; link to action plan tasks.

  • Seller details section

    Implement seller details fields: property address, timeline; link to action plan tasks.

  • Referral details section

    Implement referral details fields: receiving agent/brokerage; link to outgoing referral pipeline where applicable.

  • Interaction timeline (notes)

    Create interaction timeline UI to add/view notes, calls logged, etc.; ensure RLS and ordering by created_at.

  • Commission calculator (market-based)

    Implement live commission calculator shown when under contract: inputs for price, gross commission %, referral fee %, credits/fees; uses market math (DMV vs Pasadena) and settings to calculate net income.

Task Manager + Action Plan Tasks
Task system supporting global tasks and contact/deal-linked tasks. Tasks have due date/time, priority, assigned user, and status grouping (Overdue, Today, Upcoming, Completed). Tasks can be auto-generated based on pipeline stage transitions (e.g., entering In Contract generates milestone/action-plan tasks).
  • Task data model + RLS

    Create/confirm tasks table with fields: title, description, due_at, priority, status, assigned_user_id, related_contact_id/deal_id (nullable), created_by, completed_at; implement strict RLS policies.

  • Task Manager UI

    Implement tasks page grouping: Overdue (red), Today (blue), Upcoming, Completed; filters by assigned user, market, related contact/deal; quick complete/edit.

  • Contact action plan tasks

    Embed task list in contact profile; allow creating/editing tasks scoped to that contact; show completion controls.

  • Auto-generate tasks on stage entry

    Define stage-based task templates (per buyer/seller/referral pipelines); on stage transition, generate tasks with computed due dates; ensure idempotency to avoid duplicates.

  • Notifications hooks (optional)

    Provide hooks for future reminders (email/SMS) for overdue/due tasks; no full notification system unless requested.

Calendar + Google Calendar Two-Way Sync
Unified CRM calendar view that merges CRM calendar events and transaction milestones; integrates with Google Calendar via OAuth using a dedicated CRM calendar. Two-way sync: CRM event changes reflect in Google and Google changes reflect back into CRM. Tasks remain in CRM (not synced to Google Calendar).
  • Google OAuth + calendar connection UI

    Implement connect/disconnect Google account flow; store tokens securely; show connection status in Calendar page.

  • Dedicated CRM calendar provisioning

    On connect, create or select a dedicated Google Calendar (e.g., 'CRMPro'); store calendarId per user; allow admin rules in Settings.

  • Calendar events CRUD in CRM

    Create/edit/delete CRM calendar events; link events optionally to contact/deal; server-side mutations with Supabase server client and RLS.

  • Two-way sync engine

    Implement initial sync + incremental sync (polling/webhook) for events between Google Calendar and CRM dedicated calendar; handle conflict resolution and deleted events; map Google event IDs to internal records.

  • Unified calendar UI timeline

    Calendar page merges calendar_events with transaction milestones into a unified agenda/timeline view; supports day/week/month or agenda view as needed.

  • Sync rules in Settings

    Settings page to manage Google sync rules (e.g., which calendars, sync window, and behavior); store per-user or global settings.

Settings (Per-User Market Math + Sync Rules)
Per-user settings page to manage market math used by commission calculators (DMV vs Pasadena) and Google sync rules. Admin can manage own settings; team members manage theirs. Enforced via Supabase RLS so users only access their own settings (admin may have broader access if desired).
  • Settings data model + RLS

    Create per-user settings table keyed by user_id with fields for market math (gross commission %, split %, TC fee, etc. per market) and sync preferences; enforce RLS.

  • Settings UI

    Build Settings page UI for DMV and Pasadena calculators and Google sync rules; validate inputs; show success/error states.

  • Wire commission calculator to per-user settings

    Update commission calculator to source defaults from the authenticated user settings and selected market; allow per-deal overrides as needed.

  • Admin vs member permissions (optional)

    If needed, add an admin flag/role and allow admin to view/manage team settings; otherwise keep strictly per-user.

Automated Email + SMS Campaigns
Campaign system for automated follow-up via Gmail (Google OAuth) and Twilio SMS. Supports manual enrollment and automatic triggers (e.g., new lead created, stage change to Nurturing). Campaigns are multi-step sequences (e.g., Day 0 email, Day 1 text, Day 3 email). MVP includes at least 3 campaigns.
  • Campaign data model

    Create tables for campaigns, steps, enrollment, step executions/logs, and contact communication preferences; support wait delays and channel (email/SMS).

  • Template editor + campaign builder UI

    UI to create/edit campaigns and ordered steps; basic variables (contact name, etc.); enable/disable campaigns.

  • Enrollment + triggers

    Implement manual enrollment from contact profile and automatic trigger rules (new lead, pipeline stage change); avoid double-enrollment; allow unenroll/pause.

  • Email sending via Gmail OAuth

    Send campaign emails through connected Gmail account; store message IDs; log sent status and failures.

  • SMS sending via Twilio

    Send campaign texts via Twilio; manage from-number configuration; log delivery status and failures.

  • Scheduler/worker for step execution

    Implement background processing for queued steps (cron on Vercel or Supabase scheduled functions); handle retries and rate limiting.

  • Compliance + opt-out handling

    Support SMS opt-out keywords and contact-level do-not-text/do-not-email flags; ensure campaign respects these settings.

  • Campaign analytics (basic)

    Basic reporting: enrolled count, sent count, failures; per-contact campaign history.

Client Portal (Transaction Timeline)
Client-facing portal where a client can view their transaction timeline/status (milestones, key dates) for their deal. Intended as a separate milestone after internal MVP. Access should be secure (client-specific link or auth) and expose only that client's transaction data.
  • Define client portal access model

    Decide auth approach: magic link per transaction, email-based login, or shared token; define expiration and revocation; enforce RLS/policies accordingly.

  • Client portal UI

    Build minimal client portal pages (dark/light TBD) showing transaction timeline: current stage, milestones, upcoming dates, and possibly documents/notes (if included).

  • Expose read-only transaction timeline API

    Create server routes/actions to fetch transaction timeline data for a client with strict access control; no write access for MVP unless requested.

  • Admin controls for sharing

    In CRM, add controls to generate/share portal link and to disable/regenerate links.

  • Security review

    Ensure portal cannot leak other contacts/deals; add logging and rate limiting as appropriate.

Command Center (Dashboard)
Command Center dashboard for daily overview: total contacts, active transactions, tasks due today, and upcoming closings; quick links into pipeline and tasks. Must respect RLS and per-user/team scoping.
  • Define dashboard metrics

    Confirm and implement metric queries: total contacts, active transactions, tasks due today, upcoming closings; optionally by market and assigned agent.

  • Build Command Center UI

    Create dashboard page UI per dark-mode theme; cards/widgets for each metric and relevant lists (e.g., today's tasks, upcoming closings).

  • RLS-compliant aggregation queries

    Implement server-side aggregation using Supabase server client; ensure data is scoped per user/team via RLS and assignment rules.

Milestones

Milestone 1

Milestone 1: Core CRM + Command Center
Core internal CRM foundation: Contacts directory + master profile, Pipeline Kanban with stages, Command Center dashboard metrics, and RLS validation/hardening.
$0

Assigned Features

  • Google Contacts One-Way Sync (Labels → Tags)
  • Pipeline (Kanban)
  • Contacts Directory + Contact Profile
  • Command Center (Dashboard)

Milestone 2

Milestone 2: Tasks + Auto-Generation
Global and contact-linked tasks, task manager views, action plan tasks on contact profile, and auto-generated tasks from pipeline stage entry.
$0

Assigned Features

  • Task Manager + Action Plan Tasks

Milestone 3

Milestone 3: Calendar Sync + Settings
Calendar feature with dedicated Google Calendar and two-way sync; unified agenda view; per-user market math settings and Google sync rules.
$0

Assigned Features

  • Calendar + Google Calendar Two-Way Sync
  • Settings (Per-User Market Math + Sync Rules)

Milestone 4

Milestone 4: Campaigns + Client Portal
Automated email/SMS campaigns (Gmail OAuth + Twilio) with manual/automatic triggers and at least 3 campaigns, plus client portal to view transaction timeline; includes QA/polish.
$0

Assigned Features

  • Automated Email + SMS Campaigns
  • Client Portal (Transaction Timeline)

Skills Needed

Full-Stack Developer
Build and ship the internal CRM: Next.js app, Supabase/Postgres with strict RLS, Google OAuth integrations (Gmail + Calendar), Twilio SMS, campaign scheduler, and deployment on Vercel.
Next.js (App Router)TypeScriptReactTailwind CSSSupabase (Auth SSR, RLS)PostgreSQLGoogle APIs (OAuth, Gmail, Calendar)Twilio APIBackground jobs / scheduling (cron/queues)Vercel deployment

Open Questions

Target timeline / deadline for initial launch (MVP)
User is unsure of timeline. Need to align scope (MVP vs later) and set an estimated schedule for build, testing, and rollout to small team.
Milestone payment amounts / budget handling
User wants costs left out. Milestones set to $0. Project budget should be treated as TBD (not specified in PRD).
Google Contacts sync schedule frequency and mechanism
User wants automatic sync as frequently as feasible. Engineer to decide feasible cadence given Google People API quotas and hosting constraints (Vercel cron vs Supabase scheduled jobs), and whether to use incremental sync tokens/webhooks.