How testdrivefirst4u-netizen/realestate-crm works
Amaya CRM is a multi-tenant sales CRM for managing leads and related sales work. The primary workflow brings enquiries in through CRM entry, website/webhook intake, or Google Sheets; routes them through the action API into tenant-scoped data; and supports follow-up, visits, calls, tasks, files, reporting, and integrations. Users operate the CRM through its screen clients and shared data engine. A separate super-admin console manages companies, plans, and platform settings. Some connections below are documented by the README rather than inspected source excerpts; unsampled details are represented at subsystem level.
Main entry points: router.ts Action router · db.ts Company databases · route.ts Lead intake · leads.ts Lead pipeline
Components 25
Sales workspace
- CRM screens
app/(crm)/_components/CrmShell.tsx - Client data engine
src/core/engine.ts - Reports
server/modules/reports.ts - Lead segments
src/services/segmentationService.ts - Visit booking
server/modules/visits.ts
CRM services
- CRM action API
app/api/rpc/route.ts - Action router
server/router.ts - Lead pipeline
server/modules/leads.ts - Tasks and follow-ups
server/modules/tasks.ts - Sales records
server/modules/records.ts - Inventory
server/modules/inventory.ts - Tenant context
server/core/tenant.ts - Company databases
server/core/db.ts - Timeline and audit events
server/core/events.ts - File storage
server/modules/storage.ts
Platform administration
- Platform console
app/superadmin/(console)/DashboardClient.tsx - Platform action API
server/platform/router.ts - Company registry
server/platform/registry.ts
Intake and integrations
- Lead intake
app/api/inbound/leads/route.ts - Sheets sync
server/modules/sheets.ts - Meta lead integration
server/modules/meta.ts - Chat360 messaging
server/modules/chat360.ts - Telephony calls
server/modules/calls.ts
Other components
- CRM user
- External services
Connections 31
- CRM user → CRM screens: uses
README.md - CRM screens → Client data engine: reads state
README.md - Client data engine → CRM action API: sends actions
README.md - CRM action API → Action router: dispatches
app/api/rpc/route.ts - Action router → Lead pipeline: dispatches
server/router.ts - Action router → Tasks and follow-ups: dispatches
server/router.ts - Action router → Sales records: dispatches
server/router.ts - Action router → Inventory: dispatches
server/router.ts - Action router → Tenant context: runs within
server/router.ts - Tenant context → Company databases: selects database
server/core/tenant.ts - Lead pipeline → Company databases: reads/writes
- Tasks and follow-ups → Company databases: reads/writes
server/modules/tasks.ts - Action router → Timeline and audit events: logs errors
server/router.ts - CRM user → Lead intake: submits enquiry
README.md - Lead intake → Lead pipeline: creates or matches
app/api/inbound/leads/route.ts - Lead intake → Timeline and audit events: logs submission
app/api/inbound/leads/route.ts - External services → Lead intake: posts lead
README.md - Sheets sync → Lead pipeline: imports leads
README.md - External services → Sheets sync: provides sheet data
README.md - External services → Meta lead integration: provides lead ads
- External services → Chat360 messaging: sends webhook
- External services → Telephony calls: sends webhook
- Action router → File storage: dispatches
server/router.ts - File storage → Company databases: stores GridFS files
server/modules/storage.ts - CRM user → Visit booking: books visit
README.md - CRM user → Reports: views reports
README.md - CRM user → Lead segments: builds segments
README.md - CRM user → Platform console: manages companies
README.md - Platform console → Platform action API: sends platform actions
app/superadmin/(console)/DashboardClient.tsx - Platform action API → Company registry: manages registry
server/platform/router.ts - Company registry → Company databases: resolves tenant
server/platform/registry.ts