Version: 2.0 (System Blueprint) Role: Full System Architecture, Data Flow & Design Doctrine
Aurox Intelligence is a deterministic financial intelligence and execution platform built as a modular monorepo.
It combines:
- Real-time market data ingestion
- Signal generation and factor modeling
- AI-assisted intelligence
- Risk-controlled execution
- Simulation-first trading infrastructure
The system is designed as:
Data → Signals → Intelligence → Risk → Execution → Portfolio → Reporting
NOT:
UI → API → DB
- Deterministic-first
- Modular boundaries
- Contract-driven design
- Pure function pipelines
- Simulation-first execution
- Explainability over opacity
┌───────────────────────┐
│ UI Layer │
│ (Next.js App) │
└──────────┬────────────┘
│
┌──────────▼───────────┐
│ Service Layer │
│ (server/services) │
└──────────┬───────────┘
│
┌───────────────────┼────────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌────────────────┐ ┌────────────────────┐
│ Signals │ │ Intelligence │ │ Agents │
│ (pure) │ │ (AI + ranking) │ │ (execution logic) │
└──────┬───────┘ └──────┬─────────┘ └──────────┬─────────┘
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌────────────────┐ ┌────────────────────┐
│ Forecasting │ │ Risk Engine │ │ Broker Adapters │
│ (pure) │ │ │ │ │
└──────┬───────┘ └──────┬─────────┘ └──────────┬─────────┘
│ │ │
▼ ▼ ▼
┌────────────────────────────────────────┐
│ Data Layer (DB + Providers) │
└────────────────────────────────────────┘
apps/
web/ # Next.js App Router UI + orchestration
packages/
api-contracts/ # Zod schemas + TS types (single source of truth)
db/ # Postgres access, repositories, migrations
providers/ # External APIs (market, macro, crypto, etc.)
signals/ # Pure signal computation
forecasting/ # Pure predictive logic
agents/ # Trade workflows + execution routing
ai-market-intelligence/ # AI composition + ranking logic
observability/ # Logging, metrics, tracing
design-tokens/ # UI tokens (CSS + TS)
- Fetch external data
- Normalize provider responses
- Persist critical data
providersdb
- Transform raw data into usable features
- Moving averages
- Volatility metrics
- Derived ratios
- Generate trading signals
- Pure functions
- Deterministic
- No side effects
- Combine signals, factors, and AI outputs
- Ranking
- Recommendations
- Confidence scores
- Evaluate all decisions
- Enforce constraints
- Block unsafe actions
- Translate decisions into orders
- Route to simulation or broker
- Manage lifecycle
- Performance tracking
- Risk analytics
- Strategy reporting
Providers → DB → Query → Mapper → Service → Route → UI
UI → Server Action → Validation → Domain Service → Repository → DB
Signals → Intelligence → Risk → Agents → Execution → Portfolio Update
- Zod schemas
- Type definitions
- Shared contracts
- SQL queries
- Repositories
- Transactions
- Migrations
- External APIs
- Fallback logic
- Data normalization
- Technical indicators
- Signal scoring
- Predictive models
- Time series outputs
- Trade workflows
- Execution orchestration
- Policy enforcement
- AI aggregation
- Decision enrichment
- Ranking systems
- Logging
- Metrics
- Tracing
- Simulation (default)
- Live (future, gated)
interface BrokerAdapter {
executeOrder(order): Promise<Result>
}- Manual
- Assisted
- Autonomous (future)
Simulation acts as:
- Testing environment
- Training environment
- Execution validation system
- Deterministic
- Fully auditable
- Realistic accounting
Risk system is integrated into:
- Signal evaluation
- Trade decision
- Execution approval
Risk System > Agents > UI
- Worker processes
- Distributed execution
- Read models
- Caching layers
- Streaming pipelines (future)
- Isolated portfolios
- Per-user risk profiles
- Structured logs
- Execution logs
- Latency
- Success rates
- Risk events
- End-to-end execution tracing
- Provider failure
- DB failure
- Execution failure
- Fallback providers
- Safe defaults
- Graceful degradation
- Input validation (Zod)
- No direct DB exposure
- Controlled execution paths
- API key isolation
- Vercel
- Node services
- Postgres (Neon)
- Real-time data streams (WebSockets)
- ML pipelines
- Multi-agent systems
- Autonomous execution
- Strategy marketplace
These must NEVER be broken:
- Deterministic execution
- Clear package boundaries
- Contract-first development
- Risk-first enforcement
- Simulation-first approach
- Simulation + analytics
- Assisted trading
- Broker integration
- Autonomous trading
Aurox is not a typical app.
It is:
→ A financial intelligence engine → A risk-controlled execution system → A simulation-driven trading platform
Every architectural decision must answer:
- Is it deterministic?
- Is it safe?
- Is it explainable?
- Does it scale?
Build like:
- A hedge fund system
- A broker backend
- A scientific instrument
If unclear:
Choose the safest architecture