How ahmedrashed2811/crm_2 works
This Django CRM backend supports lead intake and management, assignment and routing, scoring, call and site-visit activity, workflow stages, bulk imports, webhooks, and analytics. The principal API flow is a user request through lead views and services into lead records and, where needed, workflow transitions; interaction services also record timeline and audit events. The graph includes documented or indexed capabilities even where implementation excerpts were unavailable. Some links are omitted where the supplied evidence does not show the caller.
Main entry points: views.py API views · leads_service.py Lead management · interaction_service.py Calls and visits · models.py Lead records
Components 24
API and access
- API views
leads/views.py - Request context
core/utils/context.py - Lead permissions
leads/utils/security.py - API errors
core/api/exceptions.py - API responses
core/api/responses.py - Query parsing
core/utils/query.py
Lead operations
- Lead records
leads/models.py - Lead management
leads/services/leads_service.py - Lead routing
leads/services/routing_service.py - Lead scoring
leads/services/scoring_service.py - Bulk import
leads/services/import_service.py - Calls and visits
leads/services/interaction_service.py - Escalation
leads/services/escalation_service.py - SLA tracking
leads/services/sla_service.py - Webhook handling
leads/services/webhook_service.py
Lifecycle workflow
- Transition engine
workflow/services/engine.py - Workflow records
workflow/models.py - Workflow reads
workflow/services/read.py
Audit and analytics
- Audit recorder
audit/utils/recorder.py - Audit events
audit/models.py - Analytics API
analytics/views.py - Analytics reports
analytics/services.py - Analytics access
analytics/utils/security.py
Other components
- CRM user
Connections 30
- CRM user → API views: sends requests
leads/views.py - API views → Request context: builds context
leads/views.py - API views → Lead management: invokes services
leads/views.py - API views → Calls and visits: logs activity
leads/views.py - API views → Bulk import: imports leads
leads/views.py - API views → Webhook handling: handles webhooks
leads/views.py - API views → Workflow reads: reads workflow
leads/views.py - API views → Query parsing: parses queries
leads/views.py - API views → API responses: formats responses
leads/views.py - API views → Lead permissions: checks access
leads/views.py - Lead management → Lead records: reads and writes
leads/services/leads_service.py - Lead management → Transition engine: changes stages
leads/services/leads_service.py - Lead management → Lead routing: delegates routing
leads/services/leads_service.py - Lead management → Lead scoring: delegates scoring
leads/services/leads_service.py - Lead management → Audit recorder: records changes
leads/services/leads_service.py - Lead routing → Lead records: reads lead rules
leads/services/routing_service.py - Lead scoring → Lead records: reads scoring data
leads/services/scoring_service.py - Bulk import → Lead management: creates leads
leads/services/import_service.py - Calls and visits → Lead records: writes activity
leads/services/interaction_service.py - Calls and visits → Lead management: updates timeline
leads/services/interaction_service.py - Calls and visits → Audit recorder: records activity
leads/services/interaction_service.py - Calls and visits → Lead permissions: checks access
leads/services/interaction_service.py - Webhook handling → Lead management: delegates lead work
leads/services/webhook_service.py - Transition engine → Workflow records: reads and writes
workflow/services/engine.py - Workflow reads → Workflow records: reads instances
workflow/services/read.py - Audit recorder → Audit events: creates events
audit/utils/recorder.py - Analytics API → Analytics reports: requests reports
analytics/views.py - Analytics reports → Analytics access: checks access
analytics/services.py - Analytics reports → Lead records: aggregates activity
analytics/services.py - Analytics API → API responses: formats responses
analytics/views.py