Architecture Overview
Understand the layered architecture that powers the Cortex Framework
HTTP Server
RESTful API endpoints and routing
WebSocket
Real-time bidirectional communication
Middleware
Request/response processing
Actor System
Concurrent message-driven actors
Event Bus
Pub/sub event distribution
Config
Environment configuration
Logger
Structured logging
Metrics
Prometheus format metrics
Tracing
Distributed request tracing
Health Checks
System health monitoring
Circuit Breaker
Fault tolerance pattern
Rate Limiter
Request rate control
Retry Logic
Automatic retry mechanism
Authentication
User identity verification
Authorization
Access control & permissions
Data Protection
Encryption & data security
Type System
TypeScript type safety
Message Queue
Actor message buffering
Scheduler
Task scheduling & execution
Key Layers Explained
API & HTTP Server
The top layer that handles all incoming requests. Built on Node.js, it provides RESTful endpoints, WebSocket support, and middleware for request/response processing.
Core Features
The heart of Cortex. Contains the Actor System for concurrent operations, Event Bus for event-driven architecture, configuration management, and structured logging.
Observability
Tools for monitoring and understanding your system. Includes metrics collection (Prometheus format), distributed tracing, and health checks.
Resilience
Patterns and tools for building fault-tolerant systems. Features circuit breakers, rate limiters, and automatic retry logic for handling failures gracefully.
Security
Built-in security features including authentication, authorization, and data protection mechanisms to keep your applications and data secure.
Core Runtime
The foundation layer providing type safety through TypeScript, message queuing for actor communication, and task scheduling mechanisms.