A highly scalable SaaS platform orchestrating autonomous, LLM-driven actions securely across external tooling suites (Jira, Slack, Linear, HubSpot). The system utilizes an event-sourcing architecture mapped to a deterministic AI agent LangGraph state machine.
The system is bifurcated into two autonomous units bridging security and stateless intelligence.
The primary backend governing data integrity, relationships, and user authorization mapping.
- Data Layer: PostgreSQL 14 (leveraging specific features like GIN Indexes for JSONB fields and Partial Indexing).
- Control Layer: Django REST Framework providing the API interface.
- Workflow Orchestration: Celery & Redis to handle high-volume ingress streams securely without disrupting HTTP interfaces.
- Responsibilities: Idempotency constraints, Organization multi-tenancy rules, Identity tracking, Webhook reception, Dead Letter Queue (DLQ) operations.
An independent intelligent microservice designed exclusively to evaluate natural language.
- Logic Mapping:
LangGraphdefining explicit node-based state transitions. - Natural Language Parsing: Natively hosts zero-shot LLM prompts to output strictly typed JSON Pydantic properties.
- Providers: Natively hooked via the Model Context Protocol (MCP) standard to integrate perfectly securely to target platforms.
- Self-Healing: Built-in validator nodes catch hallucinated payloads natively, appending the errors to the prompt for closed-loop, isolated retries.
- CRITICAL RESTRICTION: FastApi possesses absolutely zero database write capabilities to ensure the AI pipeline can never autonomously destruct system integrity. It communicates to Django via strictly typed internal URLs.
A Vite + React + TypeScript single-page application that operators use to administer the platform end-to-end.
- Stack: React 19, TypeScript, Tailwind, Framer Motion, React Router, Axios.
- Auth: JWT access + refresh tokens are obtained from the Django
/api/v1/auth/*endpoints and stored client-side. A single-flight refresh interceptor transparently rotates expired access tokens on 401. - Coverage: One page per
/api/v1/*resource group β dashboard, insights, unified tickets (with activities/comments), raw events + DLQ (with one-click retry), integrations + accounts (with on-demand sync), processing runs + step transitions, chat sessions (SSE-capable streaming with JSON fallback), dashboards + widgets, saved queries, sync checkpoints, organization + members + invites, API keys, audit logs. - Voice Agent: The original VoxBridge voice/action demo is preserved at
/agentand talks directly to the FastAPI agent service (not Django), so the demo works with or without the backend online. - Boundary: The frontend NEVER calls internal ApiKey routes (
/events/ingest,/tickets/upsert,/dlq,/identities/map) β those remain service-to-service.
- Event Sourcing First: All raw webhook payloads from Jira/Slack are immediately dropped into Postgres
JSONBfields permanently before any AI processing occurs. - Idempotency Assurance: Enforces strict unique constraints
(integration_id, external_id)so multiple webhooks never hallucinate duplicate tickets into the system. - Structured AI Constraints: Output constraints via strict
BaseModelclasses force 8B parameter inference nodes to adhere mathematical rules without guessing fields natively.
The active LangGraph State machine flows through the following graph properties organically based on payload integrity.
- Fetcher Node (MCP): Standardizes API pagination routines mapping directly to target tools and stores raw extraction inside the typed dictionaries.
- Mapper Node (LLM / LangChain): Prompts the unified state to local models natively converting random Webhook/User chat strings into
UnifiedTicketSchema. - Validator Node (Python native): Evaluates the specific generated structure verifying statuses (
open,in_progress), and dates ISO rules. - Router Node:
- IF valid β‘οΈ Escalate to Django's persistence layer for Upsert mappings.
- IF invalid β‘οΈ Bounce back to Pipeline Mapper recursively.
- IF Attempt cutoff (>3x) β‘οΈ Banish to the manual Django Dead Letter Queue API.
.
βββ backend/ # Django monolith orchestrator
β βββ manage.py
β βββ config/ # Settings & URL configuration
β βββ events/ # Routing webhook JSON payloads natively
β βββ tickets/ # Unified normalized storage models
β βββ sync/ # Cursor management models
β βββ integrations/ # Tool API Key authorizations
β
βββ agent-service/ # Statelss FastAPI engine
β βββ src/main.py # Uvicorn boot
β βββ src/agents/ # Orchestrator & LangGraph nodes
β βββ src/schemas.py # Strict Pydantic validations
β βββ tests/ # 93%+ Pytest branch coverage suites
β
βββ mcp-servers/ # Model Context Protocol plugins
β βββ jira/
β βββ slack/
β βββ hubspot/
β
βββ frontend/ # Vite + React + TS operator console
β βββ src/api/ # Typed Axios client + one module per /api/v1 group
β βββ src/context/ # Auth provider (JWT + refresh rotation)
β βββ src/components/ # App shell (Layout, ProtectedRoute) + UI primitives
β βββ src/pages/ # One page per resource group, plus /agent (VoxBridge)
β βββ .env.example # VITE_API_URL / VITE_AGENT_URL template
β
βββ docker-compose.yml # PostgreSQL & Redis clusters
βββ Makefile # UV CLI standardized commands
βββ .env.example # Secret template requirements
- Docker & Docker Compose
- Ollama runtime logic engine installed natively
uvPython workspace orchestrator
Pull the primary instruction model. We utilize standard models to adhere strictly into typed JSON endpoints natively.
ollama pull llama3:8bEnsure you configure the root .env to route traffic into the local Ollama node context space:
OPENAI_API_KEY="ollama"
OPENAI_API_BASE_URL="http://127.0.0.1:11434/v1"
LLM_MODEL="llama3:8b"
LLM_TEMPERATURE=0.0(Ensure PostgreSQL/JWT variables are correctly patched mirroring .env.example)
The frontend reads its own two variables from frontend/.env (copy frontend/.env.example):
# Django REST base, must include /api/v1
VITE_API_URL=http://localhost:8000/api/v1
# FastAPI agent service (used only by the /agent voice screen)
VITE_AGENT_URL=http://localhost:8001Provision the backend systems.
docker-compose up -dTo guarantee environment isolation, we utilize mapped Make commands via uv.
(Terminal 1) Workspace Orchestration & Environment Initialization:
First, install all monorepo dependencies into a centrally routed .venv.
make setup
make install(Terminal 2) Django Management Base: Boot the REST interfaces, prepare the primary database schemas, and create the admin identity.
cd backend
../.venv/bin/python manage.py makemigrations
../.venv/bin/python manage.py migrate
# Optional: Create a superuser for the graphical Django Admin interface
../.venv/bin/python manage.py createsuperuser
# Start the REST API host
../.venv/bin/python manage.py runserver(Terminal 3) FastAPI LangGraph Agent: The core AI orchestration node processes pipeline actions securely.
make agent(Terminal 4 & 5) Celery Asynchronous Workers: These are absolutely crucial for processing webhook/Long-Running HTTP queries without crashing the web layer.
# Terminal 4: Start the base Celery background consumer
make celery-worker
# Terminal 5: Start the cron-job heartbeat scheduler
make celery-beat(Terminal 6) Frontend Dev Server:
Boot the operator console. On first run it will install npm packages into frontend/node_modules.
# One-time setup (also covered by `make setup`)
cd frontend && npm install && cp .env.example .env
# Hot-reloading dev server on http://localhost:5173
make frontendOne-shot full stack (make dev) β starts Postgres + Redis via Docker, runs migrations, purges stale Celery queues, runs the full test suite, then launches Django (:8000), FastAPI (:8001), Celery worker + beat, and Vite (:5173) in parallel with labelled logs. Free ports 8000, 8001, and 5173 first (stop any previous runserver, uvicorn, or vite). On WSL, the frontend script invokes Vite through node so the vite CLI is never executed without +x on node_modules/.bin.
make devOur standardized CI/CD pipelines require total formatting alignment.
# Evaluate tests inside the LangGraph states
make test-agent
# Format via Ruff/Black standards globally
make fl
# Frontend static checks (typecheck + ESLint)
make frontend-typecheck
make frontend-lintView the api_reference.md document artifact for a complete functional catalog tracing the specific interactions defining the frontend capabilities cross-infrastructure.