Add the Sales CRM service through collaboration, sync architecture/registry docs, expose crm.torbatyar.ir, and include a production deploy script. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| .. | ||
| alembic | ||
| app | ||
| scripts | ||
| alembic.ini | ||
| Dockerfile.dev | ||
| pytest.ini | ||
| README.md | ||
| requirements.txt | ||
CRM Service — Sales CRM
Phase 6.3 collaboration complete. CRM Core Platform (6.0–6.3) Active.
Sales CRM only. CRM does not own Automation, Customer360, Marketing, Notification delivery, Messaging, Communication, Helpdesk, Analytics, AI, Identity, Accounting, Inventory, Restaurant, Marketplace, Files, or Search.
Ownership
| Owns | Does not own |
|---|---|
| Lead, Contact, Organization | Workflow / Automation |
| Opportunity, Pipeline, Playbooks, Forecasts | Customer360 |
| Activities, Tasks, Meetings, Calls, Timeline | Notification delivery |
| Comments, Mentions, Bookmarks, Sales Team | Communication / Helpdesk |
| Quotes, Tags, Notes, Attachment refs, Audit | Analytics / AI / Inventory |
Boundaries
- Independent database:
crm_db(ADR-001) - Row-level tenancy via
tenant_idfrom request context (ADR-003) - Inter-service communication: REST + Events only
- Platform providers are contracts only under
app/providers/ - Timeline entries are immutable; email/call recording refs only
Structure
app/
api/v1/ # CRM HTTP APIs only
models/ # foundation + supporting + sales_engine + collaboration
repositories/
services/
validators/
schemas/
events/
permissions/
providers/
tests/
alembic/versions/0001_initial.py
alembic/versions/0002_phase_61_entities.py
alembic/versions/0003_phase_62_sales_engine.py
alembic/versions/0004_phase_63_collaboration.py
API Prefix
/api/v1 on port 8003
See crm-phase-6-3.md for collaboration endpoints.
Permissions
crm.* including crm.activities.*, crm.tasks.*, crm.meetings.*,
crm.calls.*, crm.timeline.*, crm.comments.*, crm.mentions.*, crm.team.*
Run locally
cd backend/services/crm
pip install -r requirements.txt
pytest -q
uvicorn app.main:app --port 8003 --reload