TorbatYar/backend/services/crm/README.md
Mortezakoohjani 064d67f099 Ship CRM Core Platform (phases 6.0–6.3) with docs and prod deploy.
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>
2026-07-24 20:32:00 +03:30

2.2 KiB
Raw Permalink Blame History

CRM Service — Sales CRM

Phase 6.3 collaboration complete. CRM Core Platform (6.06.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_id from 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