How rohangawande2303/multi-tenant-real-estate-crm works
Social Pulse is a multi-tenant real-estate CRM for agencies and developers. Users manage projects, teams, lead pipelines, analytics, and telecalling activity; external advertising and website forms can also submit leads. The backend routes API requests, scopes database access by tenant schema, and processes inbound leads with source-specific normalization and deduplication. The README documents the frontend-to-API-to-PostgreSQL deployment and major product capabilities. Some endpoint implementations were not sampled, so their internal call relationships are omitted rather than inferred.
Main entry points: webhooks.py Webhook receiver · api.py API router · ingest_google.py Google Ads ingestion · lead.py Lead records
Components 23
CRM interface
- CRM screens
frontend/src/app/(dashboard)
API and access
- API router
backend/app/api/api.py - Authentication and RBAC
backend/app/auth
Lead operations
- Lead management API
backend/app/api/endpoints/leads.py - Lead records
backend/app/models/lead.py - Lead deduplication
backend/app/core/lead_deduplication.py - Lead import and export
backend/app/api/endpoints/import_export.py - Import processing
backend/app/services/import_service.py
Tenant data
- Tenant provisioning
backend/app/services/tenant_service.py - Tenant schema context
backend/app/core/database.py - Tenant and user records
backend/app/auth/models.py
Integrations and insights
- Webhook receiver
backend/app/api/endpoints/webhooks.py - Source handlers
backend/app/api/webhook_handlers - Webhook verification
backend/app/utils/webhook_security.py - Google Ads ingestion
backend/app/api/endpoints/ingest_google.py - Website form ingestion
backend/app/api/endpoints/ingest_website.py - Integration configuration
backend/app/models/integration.py - Webhook audit records
backend/app/models/webhook_log.py - Dashboard and analytics
backend/app/api/endpoints/dashboard.py - Activity and audit
backend/app/models/lead_activity.py
Other components
- CRM user
- Ad and form sources
- PostgreSQL
Connections 28
- CRM user → CRM screens: uses
- CRM screens → API router: calls API
- API router → Authentication and RBAC: routes auth
backend/app/api/api.py - API router → Lead management API: routes leads
backend/app/api/api.py - API router → Webhook receiver: routes webhooks
backend/app/api/api.py - API router → Google Ads ingestion: routes ingestion
backend/app/api/api.py - API router → Website form ingestion: routes ingestion
backend/app/api/api.py - Tenant provisioning → Tenant and user records: creates tenant
backend/app/services/tenant_service.py - Tenant provisioning → PostgreSQL: creates schema
backend/app/services/tenant_service.py - Tenant schema context → PostgreSQL: sets schema
backend/app/core/database.py - Webhook receiver → Source handlers: dispatches handler
backend/app/api/endpoints/webhooks.py - Webhook receiver → Webhook verification: verifies signature
backend/app/api/endpoints/webhooks.py - Webhook receiver → Integration configuration: reads config
backend/app/api/endpoints/webhooks.py - Webhook receiver → Webhook audit records: records requests
backend/app/api/endpoints/webhooks.py - Webhook receiver → Lead records: writes leads
backend/app/api/endpoints/webhooks.py - Google Ads ingestion → Lead deduplication: checks duplicates
backend/app/api/endpoints/ingest_google.py - Google Ads ingestion → Lead records: writes leads
backend/app/api/endpoints/ingest_google.py - Google Ads ingestion → Integration configuration: reads integration
backend/app/api/endpoints/ingest_google.py - Website form ingestion → Lead records: writes leads
backend/app/api/endpoints/ingest_website.py - Website form ingestion → Integration configuration: updates stats
backend/app/api/endpoints/ingest_website.py - Ad and form sources → Webhook receiver: submits leads
- Ad and form sources → Google Ads ingestion: submits leads
- Ad and form sources → Website form ingestion: submits forms
backend/app/api/endpoints/ingest_website.py - Lead import and export → Import processing: calls import
- Import processing → Lead records: creates leads
backend/app/services/import_service.py - CRM screens → PostgreSQL: views CRM data
- Dashboard and analytics → PostgreSQL: queries analytics
- Lead management API → Lead records: manages leads