Architecture Directory
Welcome to the Architecture section of the MetaPilot documentation. This section covers system design, request execution lifecycles, cross-component interactions, security threat modeling, multi-tenancy, and core subsystem specifications.
Contents
- System Overview: Monorepo layout, Next.js + Django ASGI stack, component breakdown.
- Architecture Evolution: Historical record of system choices from single-process to AI multi-tenant SaaS.
- Request Lifecycle: Step-by-step traversal of HTTP REST and WebSocket requests.
- Component Interactions Map: End-to-end data flow between Next.js, Django, Redis, Celery, DB, and Meta API.
- Security Threat Model: Trust boundaries, attack vectors, and security controls.
- Multi-Tenancy & Cryptography: Account hierarchy, tenant resolution, and Fernet AES-256 secret encryption.
- Realtime Chat Inbox: Django Channels, WebSockets, Redis Channel Layer architecture.
- Broadcast Scheduler Engine: Celery Beat scheduler, batching, and Token Bucket rate limiting.
- AI Chatbot & Vision Pipeline: OpenRouter LLM context retrieval and vision model pipeline.
- Webhook Processing System: Meta Graph API v22.0 webhook ingestion & status lifecycle.
Recommended Reading Order
- Start with System Overview and Component Interactions Map.
- Read Request Lifecycle to understand end-to-end request handling.
- Explore specific subsystem specifications (Multi-Tenancy, Scheduler, Realtime Inbox).