mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-18 15:29:36 +00:00
Phase 1-6 implementation for Dealix AI Revenue OS: - AI Arabic Engine: NLP (arabic_nlp.py), lead scoring (lead_scoring.py) - PDPL Compliance: consent manager, data rights handler, consent model - Sequence Engine: multi-channel sequences with WhatsApp/Email/SMS - CPQ System: quote engine, AI proposal generator - Security Gate: pre-release checks, PDPL message validation - Tool Verification: agent action audit trail - Project Operating Files: AGENTS.md, CLAUDE.md - Project Memory: architecture, ADRs, provider routing, PDPL checklist - Design System: IBM Plex Sans Arabic tokens, RTL-safe components - Sequence/Consent models for database https://claude.ai/code/session_01LsnvBa7HwF5hs99VZbgLGj
53 lines
3.4 KiB
Markdown
53 lines
3.4 KiB
Markdown
# Dealix System Architecture Overview
|
|
|
|
**Type**: architecture
|
|
**Date**: 2026-04-11
|
|
**Status**: active
|
|
**Confidence**: high
|
|
|
|
## Summary
|
|
Dealix is a multi-tenant AI-powered CRM SaaS targeting Saudi SMBs. Architecture follows a microservices-ready monolith pattern.
|
|
|
|
## Components
|
|
```
|
|
┌─────────────────────────────────────────────────────────┐
|
|
│ Nginx (Reverse Proxy) │
|
|
├──────────────────────┬──────────────────────────────────┤
|
|
│ Next.js Frontend │ FastAPI Backend │
|
|
│ (Port 3000) │ (Port 8000) │
|
|
│ - Dashboard │ ┌─────────────────────────┐ │
|
|
│ - Landing │ │ API Layer (v1) │ │
|
|
│ - Auth │ │ - Auth, Leads, Deals │ │
|
|
│ - Pipeline │ │ - Inbox, Sequences │ │
|
|
│ │ │ - Compliance, Proposals │ │
|
|
│ │ ├─────────────────────────┤ │
|
|
│ │ │ Services Layer │ │
|
|
│ │ │ - AI Engine (Arabic) │ │
|
|
│ │ │ - PDPL Compliance │ │
|
|
│ │ │ - Sequence Engine │ │
|
|
│ │ │ - CPQ System │ │
|
|
│ │ │ - Agent Orchestrator │ │
|
|
│ │ ├─────────────────────────┤ │
|
|
│ │ │ Integration Layer │ │
|
|
│ │ │ - WhatsApp, Email, SMS │ │
|
|
│ │ │ - Stripe, ZATCA │ │
|
|
├──────────────────────┴───┴─────────────────────────┤ │
|
|
│ Celery Workers (4) │ Celery Beat │ │
|
|
├──────────────────────────────┴──────────────────────┤ │
|
|
│ PostgreSQL 16 │ Redis 7 │ │
|
|
└─────────────────────┴───────────────────────────────┘
|
|
```
|
|
|
|
## Key Design Decisions
|
|
- **Multi-tenant isolation**: tenant_id on every table, enforced at query level
|
|
- **Arabic-first**: RTL layout, Arabic NLP, Saudi dialect support
|
|
- **WhatsApp-first**: Primary communication channel (85% Saudi penetration)
|
|
- **PDPL-native**: Consent checked before every outbound message
|
|
- **LLM fallback chain**: Groq → OpenAI for cost optimization
|
|
- **Async everything**: asyncpg, async SQLAlchemy, async HTTP clients
|
|
|
|
## Related Topics
|
|
- [ADR-001: Multi-tenant architecture](../adr/001-multi-tenant.md)
|
|
- [ADR-002: WhatsApp as primary channel](../adr/002-whatsapp-first.md)
|
|
- [Provider routing strategy](../providers/routing-strategy.md)
|