Skip to main content

Architecture Overview

This section provides a deep-dive into AuroraSOC's architecture for developers contributing to or extending the platform. Understanding the architecture is essential before modifying any component.

High-Level Architecture

Project Structure

AuroraSOC/
├── aurorasoc/ # Python backend (main application)
│ ├── agents/ # 16 AI agents + factory + prompts
│ ├── api/ # FastAPI application (3087 lines)
│ ├── config/ # Pydantic settings (10 subsystem configs)
│ ├── core/ # Auth, DB, logging, rate limiting, tracing
│ ├── engine/ # SOAR playbook engine
│ ├── events/ # Redis Streams, NATS, MQTT consumers
│ ├── memory/ # Three-tier agent memory system
│ ├── models/ # Pydantic domain models + enums
│ ├── services/ # Background scheduler
│ ├── tools/ # 31 MCP tools across 10 modules
│ └── workflows/ # BeeAI AgentWorkflows
├── rust_core/ # Rust core engine
│ ├── src/ # Event normalizer, attestation, publishers
│ └── proto/ # Protobuf definitions
├── dashboard/ # Next.js 15 frontend
│ └── src/ # React components, Zustand store, API client
├── firmware/ # Three firmware platforms
│ ├── esp32s3/ # Zephyr RTOS (C)
│ ├── nrf52840/ # Embassy-rs (Rust)
│ └── stm32/ # Ada SPARK (Ada)
├── infrastructure/ # Docker, monitoring, broker configs
├── tests/ # pytest test suite
├── alembic/ # Database migrations
└── docs/ # This Docusaurus documentation

Component Interactions

Request Flow: Alert Investigation

Design Principles

1. Graceful Degradation

Every external dependency has a fallback:

  • PostgreSQL down → API serves in-memory demo data
  • Redis down → Rate limiter uses in-memory sliding window
  • Qdrant down → Agent memory falls back to sliding window only
  • Agent offline → Circuit breaker prevents cascading failures

2. Configuration over Code

All behavior is configurable via environment variables with sensible defaults. No code changes needed for:

  • LLM provider switching
  • Port assignments
  • Connection strings
  • Feature toggles
  • Rate limits

3. Separation of Concerns

Each module has a single responsibility:

  • agents/ — AI agent creation and configuration
  • tools/ — External system integration
  • events/ — Message transport
  • memory/ — Knowledge persistence
  • engine/ — Playbook execution
  • core/ — Cross-cutting concerns (auth, logging, tracing)

4. Event Sourcing Lite

While not a full event-sourced system, AuroraSOC captures all state changes in Redis Streams, providing:

  • Complete audit trail
  • Event replay capability
  • Decoupled producers and consumers

Technology Stack Decision Matrix

ComponentTechnologyWhy This ChoiceAlternatives Considered
AI FrameworkBeeAIA2A + MCP native supportLangChain, CrewAI, AutoGen
APIFastAPIAsync, type-safe, OpenAPIDjango, Flask, Express
ORMSQLAlchemy 2.0Async, mature, type-safeTortoise ORM, Prisma
Event BusRedis StreamsLow latency, consumer groupsKafka, RabbitMQ
FederationNATS JetStreamLightweight, persistentKafka, Pulsar
IoT TransportMQTT v5Industry standard, QoSAMQP, CoAP
Vector DBQdrantSemantic search, Rust-fastPinecone, Weaviate, Milvus
Core EngineRust (tokio+axum)Performance-critical pathGo, C++
FrontendNext.js 15SSR, React, TurbopackNuxt, SvelteKit
FirmwareC/Rust/AdaPlatform-specific strengthsMicroPython, Arduino
DatabasePostgreSQL 16JSONB, reliability, extensionsMySQL, MongoDB
TracingOpenTelemetryVendor-neutral, standardJaeger, Zipkin (OTLP exports to these)

Port Map

PortServiceProtocol
8000FastAPIHTTP/WS
8080Rust Core EngineHTTP
3000Next.js DashboardHTTP
5432PostgreSQLTCP
6379RedisTCP
6333QdrantHTTP
4222NATSTCP
1883MQTTTCP
4317OTLP gRPCgRPC
9000-9015A2A AgentsHTTP
9090PrometheusHTTP
3001GrafanaHTTP