Engineering

Built for Capital Markets.
Engineered for Scale.

Clean Architecture. Multi-tenant isolation. Immutable financial records. Asynchronous execution routing. Real-time communication. Every design decision made for regulated financial services.

Architecture

Clean Architecture.
Strict Layer Dependencies.

The Atlas platform follows a Clean Architecture pattern with enforced dependency boundaries. The domain layer has zero external dependencies. Business logic lives in the application layer. Infrastructure concerns — database access, payment gateways, email services — are isolated behind interfaces.

This architecture ensures that core trading logic, compliance rules, and financial calculations are never coupled to specific database engines, cloud providers, or third-party services.

D
Domain Layer
57 entities, 40+ enums, state machines, constants. Zero external dependencies.
A
Application Layer
Interfaces, DTOs, validation. Defines contracts for all services. No infrastructure knowledge.
I
Infrastructure Layer
EF Core DbContext, 65+ service implementations, payment gateways, email, file storage, caching.
API
API Layer
40 controllers, 200+ endpoints, dependency injection, middleware, authentication.
System Architecture
Presentation
React Native
iOS & Android / Expo
React 19 + TS
Admin Portal / Vite
API (.NET 9)
Auth
Trade
Pay
Comply
Admin
Core Services
OMS
Ledger
KYC
Risk
Settle
Survey
Report
Chat
Background Workers
Settlement
Routing
Alerts
Recurring
Infrastructure
MySQL
Redis
SQS
S3
SSM
Multi-Tenancy

Row-Level Tenant Isolation.
Every Query. Every Time.

Automatic Data Scoping

Every tenant-scoped entity carries a BrokerageId. EF Core global query filters automatically append WHERE BrokerageId = @currentTenant to every database query. No manual filtering. No accidental data leakage.

// Three query filter patterns
Pattern 1: Entity has own BrokerageId
Pattern 2: Filter through parent navigation
Pattern 3: Chained navigation (2+ hops)

Tenant Resolution Middleware

The tenant is resolved from the HTTP Host header before any authentication or business logic executes. Each brokerage maps to a custom domain. The TenantContext is then injected into the DbContext and all downstream services.

// Request lifecycle
HTTP Request → Tenant Middleware
→ Authentication → Authorization
→ Controller → Service (tenant-scoped)
→ DbContext (auto-filtered queries)

Independent Brokerage Configuration

Each brokerage has independent configuration for fees, branding, compliance thresholds, trading settings, notification preferences, and more. Configuration is stored as structured JSON per brokerage — not global settings that affect all tenants.

Zero-Downtime Tenant Provisioning

Adding a new brokerage tenant requires no infrastructure changes, no new database instances, and no deployments. Domain mapping, role seeding, initial admin creation, and branding configuration — all handled through the platform management API.

Financial Integrity

Immutable Double-Entry Ledger.
Enforced at the Infrastructure Level.

The Atlas ledger is not merely append-only by convention — it is physically immutable. Database interceptors trap any UPDATE or DELETE attempt on ledger entries and audit logs, throwing an exception before the operation reaches the database.

10 Ledger Accounts

• ClientCash • ClientEquity • ClientReservedFunds • ClientFundsPayable • CommissionRevenue • InterestRevenue • ExchangeFees • FundsInTransit • Suspense

Automatic Balanced Entries

Every financial event — trade fill, deposit, withdrawal, fee charge, adjustment — creates balanced debit/credit entries. Every entry links back to its source transaction for full traceability.

Interceptor Enforcement

AuditLogImmutabilityInterceptor and LedgerImmutabilityInterceptor physically block modification attempts at the ORM level — before SQL is generated. This is not a soft constraint.

Order Execution Flow
Client Places Order
Buying power validated. Funds reserved. Order created with Pending status.
Order Routed to Execution
Queued via AWS SQS. OrderRoutingWorker picks up and routes to configured adapter.
Execution Confirmed
Fill event received. Execution record created (price, quantity, time).
Ledger Entries Created
Balanced debit/credit: ClientCash → ClientEquity. Commission: ClientCash → CommissionRevenue.
Position Updated
Quantity, average cost, cost basis recalculated. Balance released or adjusted.
Real-Time Push
SignalR OrderHub pushes status update to connected mobile client. Trade confirmation generated.
Execution Architecture

Provider-Agnostic. Execution-Ready.

Atlas uses an adapter pattern for execution routing. Orders are queued via AWS SQS and processed asynchronously by background workers. The routing infrastructure supports multiple execution channels — configurable per brokerage.

Asynchronous Queue

Orders are placed in an AWS SQS queue. The OrderRoutingWorker polls the queue and routes each order through the configured broker adapter. Dead letter queue captures failures for manual review.

Adapter Pattern

IBrokerAdapterFactory selects the correct adapter based on brokerage configuration. The architecture supports multiple providers (Mock, NGX, NASDOTC, FMDQ, ThirdPartyBroker) — each implementing a standardized interface.

Full Event Lifecycle

Every routing attempt is logged with full event history: Queued → Submitted → Acknowledged → PartiallyFilled → Filled (or Cancelled / Rejected / Failed). Late fills received after cancellation are flagged for compliance review.

Real-Time

Real-Time Communication.
Zero Polling.

Atlas uses SignalR WebSocket hubs for bidirectional real-time communication. Order status updates are pushed to mobile clients the moment execution events are processed. Support chat messages are delivered instantly with typing indicators and read receipts.

OrderHub
Pushes order status changes, fill confirmations, and rejection notifications to connected mobile clients in real time.
ChatHub
Bidirectional messaging between client mobile app and admin support agents. Typing indicators, read receipts, file attachments, automatic reconnection.
Background Workers
7 background services: Settlement processing, order routing, price alert monitoring, recurring deposit charging, time-in-force enforcement, execution event processing, scheduled report delivery.
0
API Controllers
0+
REST Endpoints
0
SignalR Hubs
0
Background Workers
0
Domain Entities
0+
Backend Services
Cloud Infrastructure

Hosted on AWS. Built for Regulated Workloads.

Compute (EC2 / ECS / Lambda)

Containerized API deployments with Docker. AWS ECS and Lambda-compatible. Horizontal scaling based on demand.

Database (MySQL + Redis)

MySQL for relational persistence with EF Core migrations. Redis for caching, session management, and market data.

Message Queue (SQS)

AWS SQS for reliable, asynchronous order routing with dead letter queue for failed messages. Decouples order acceptance from execution.

Object Storage (S3)

AWS S3 for KYC document storage, trade confirmations, account statements, and file uploads with secure pre-signed URLs.

Secrets (Systems Manager)

AWS Parameter Store for environment-specific configuration: database credentials, API keys, payment gateway secrets, JWT signing keys.

CDN (CloudFront)

AWS CloudFront for global content delivery. Static assets, admin portal, and marketing site served from edge locations worldwide.

Want a Deep Dive Into
Our Architecture?

Our engineering team can walk you through the platform architecture, multi-tenancy model, and security posture in detail. Schedule a technical discussion.

Schedule Technical Discussion