Ir para o conteúdo

MundiX Master Architecture

High-level system architecture for MundiX Multi-Agent Development System.

System Overview

MundiX é um sistema de orquestração de agentes de IA especializados que colaboram para implementar features completas de software.

Core Components

1. Orchestrator API (FastAPI)

  • Task management
  • Agent coordination
  • Authentication & authorization
  • Task Packet processing

2. Database Layer (PostgreSQL)

  • User management
  • Task tracking
  • Agent registry
  • Room mappings
  • Refresh token storage

3. Cache Layer (Redis)

  • Rate limiting counters
  • Session storage
  • Queue management (future)

4. Communication Layer

  • Matrix (Synapse): Agent communication hub
  • mautrix-telegram: Bridge to Telegram
  • Message Routing: Task assignment and updates

5. Agent Layer

  • Agent-Architect: Design decisions
  • Agent-Backend: Implementation
  • Agent-QA: Testing
  • Agent-Security: Security review
  • Agent-DevOps: Infrastructure

6. Frontend (Future)

  • Task dashboard
  • Agent management
  • System monitoring

Data Flow

sequenceDiagram
    participant User
    participant Telegram
    participant Matrix
    participant Orchestrator
    participant Agents
    participant Database

    User->>Telegram: /task Create auth system
    Telegram->>Matrix: Forward message
    Matrix->>Orchestrator: Task request
    Orchestrator->>Database: Create Task Packet
    Orchestrator->>Agents: Assign to specialists
    Agents->>Matrix: Collaborate on implementation
    Agents->>Orchestrator: Report completion
    Orchestrator->>Database: Update task status
    Orchestrator->>Matrix: Notify completion
    Matrix->>Telegram: Forward to user
    Telegram->>User: Task complete notification

Deployment Architecture

                    ┌─────────────────┐
                    │   Traefik       │
                    │  (Reverse Proxy)│
                    └────────┬────────┘
         ┌──────────────────┼──────────────────┐
         │                  │                  │
    ┌────▼────┐       ┌─────▼─────┐     ┌─────▼──────┐
    │Frontend │       │Matrix     │     │Orchestrator│
    │(Nginx)  │       │(Synapse)  │     │   API      │
    └─────────┘       └─────┬─────┘     └─────┬──────┘
                            │                   │
                      ┌─────▼──────┐    ┌──────▼───────┐
                      │mautrix     │    │ PostgreSQL   │
                      │-telegram   │    │   + Redis    │
    └──────────────┘                      └────────────

Security Architecture

  • Perimeter: Traefik with TLS termination
  • Authentication: JWT with refresh tokens
  • Rate Limiting: Redis-based per-endpoint limits
  • Secrets: Environment variables, no hardcoded secrets
  • Network: Docker networks with isolation

Scalability Considerations

Current (MVP)

  • Single server deployment
  • Docker Compose orchestration
  • Vertical scaling

Future

  • Kubernetes for horizontal scaling
  • Multiple agent instances
  • Distributed task queue
  • Database replication
  • CDN for frontend assets

Version: 1.0
Last Updated: 2026-02-03