How arumuga-raja-p/real_estate_crm works
EstateFlow is a Next.js real-estate CRM for sales teams. Users review dashboard metrics, manage leads across a seven-stage pipeline, browse project/building/unit inventory, and create bookings; the booking workflow uses the CRM service and is documented as protected against concurrent double-booking in Supabase. The graph preserves the major lead, inventory, booking, profile, and dashboard capabilities. Source excerpts show the service’s Supabase client and selected operations, but not the full persistence or authorization implementation; database behavior is therefore represented as documented external capability.
Main entry points: crm-service.ts CRM service · DashboardShell.tsx Dashboard shell · page.tsx Lead pipeline · BookingModal.tsx Booking form
Components 22
CRM application
- Dashboard
src/app/page.tsx - User profile
src/app/profile/page.tsx - Health endpoint
src/app/api/health/route.ts
Sales workflows
- Lead pipeline
src/app/leads/page.tsx - Lead record
src/app/leads/[id]/page.tsx - Lead views
src/components/leads/LeadKanban.tsx - Lead table
src/components/leads/LeadTable.tsx - Lead editor
src/components/leads/LeadModal.tsx - Stage badge
src/components/leads/StageBadge.tsx - Property inventory
src/app/properties/page.tsx - Concurrency demo
src/components/properties/ConcurrencyTestModal.tsx - Bookings
src/app/bookings/page.tsx - Booking form
src/components/bookings/BookingModal.tsx
CRM data layer
- CRM service
src/lib/crm-service.ts - CRM domain types
src/lib/types/crm.ts - Demo data
src/lib/mock-data.ts - Supabase client
src/lib/supabase/client.ts
Application shell
- Dashboard shell
src/components/layout/DashboardShell.tsx - Navigation sidebar
src/components/layout/AppSidebar.tsx - Application header
src/components/layout/AppHeader.tsx
Other components
- Sales team
- Supabase backend
Connections 42
- Sales team → Dashboard: opens
README.md - Dashboard → Dashboard shell: renders
src/app/page.tsx - Dashboard → CRM service: loads metrics
src/app/page.tsx - Dashboard → Lead editor: opens
src/app/page.tsx - Dashboard → Booking form: opens
src/app/page.tsx - Dashboard → Concurrency demo: opens
src/app/page.tsx - Sales team → Lead pipeline: manages leads
README.md - Lead pipeline → Dashboard shell: renders
src/app/leads/page.tsx - Lead pipeline → CRM service: loads and updates
src/app/leads/page.tsx - Lead pipeline → Lead views: renders
src/app/leads/page.tsx - Lead pipeline → Lead table: renders
src/app/leads/page.tsx - Lead pipeline → Lead editor: opens
src/app/leads/page.tsx - Lead pipeline → Booking form: opens
src/app/leads/page.tsx - Lead table → Stage badge: renders
src/components/leads/LeadTable.tsx - Sales team → Lead record: views lead
README.md - Lead record → Dashboard shell: renders
src/app/leads/[id]/page.tsx - Lead record → CRM service: loads lead
src/app/leads/[id]/page.tsx - Lead record → Stage badge: renders
src/app/leads/[id]/page.tsx - Lead record → Booking form: opens
src/app/leads/[id]/page.tsx - Sales team → Property inventory: browses inventory
README.md - Property inventory → Dashboard shell: renders
src/app/properties/page.tsx - Property inventory → CRM service: loads inventory
src/app/properties/page.tsx - Property inventory → Booking form: opens
src/app/properties/page.tsx - Property inventory → Concurrency demo: opens
src/app/properties/page.tsx - Sales team → Bookings: reviews bookings
README.md - Bookings → Dashboard shell: renders
src/app/bookings/page.tsx - Bookings → CRM service: loads bookings
src/app/bookings/page.tsx - Bookings → Booking form: opens
src/app/bookings/page.tsx - Booking form → CRM service: submits booking
src/components/bookings/BookingModal.tsx - Booking form → CRM service: refreshes units
src/components/bookings/BookingModal.tsx - Concurrency demo → CRM service: tests parallel bookings
README.md - Sales team → User profile: manages profile
README.md - User profile → Dashboard shell: renders
src/app/profile/page.tsx - User profile → CRM service: reads and updates
src/app/profile/page.tsx - CRM service → Supabase client: initializes
src/lib/crm-service.ts - Supabase client → Supabase backend: connects
README.md - CRM service → Demo data: falls back to
README.md - CRM service → CRM domain types: uses domain types
src/lib/crm-service.ts - CRM service → Supabase backend: queries and writes CRM data
README.md - Dashboard shell → Navigation sidebar: renders
src/components/layout/DashboardShell.tsx - Dashboard shell → Application header: renders
src/components/layout/DashboardShell.tsx - Health endpoint → Supabase backend: checks connection
src/app/api/health/route.ts