Enterprise Trading Platform · architecture diagrams

System block diagram

The whole platform on one page. Six things the team builds, three things the team is given, and every connection between them labelled with its protocol and its direction.

Take three things from this diagram. The order path runs left to right along the middle row and never doubles back: the frontend calls the Trade REST API, the API records the order and publishes it, the executor consumes it and publishes the outcome. PostgreSQL sits underneath all of it as one shared system of record, which is why three separate services drop into the same bar. And exactly one service reaches outside the platform, because exactly one service holds the Fauxnance key.

System block diagram of the Enterprise Trading Platform The Angular UI calls the auth service for tokens and the Trade REST API for orders and account data. The Trade REST API writes to PostgreSQL and produces to the orders topic on Kafka. The Trade Executor consumes orders, calls the Fauxnance API for a quote, writes the settlement to PostgreSQL and produces to trade-events and market-data. The Trade REST API consumes those topics for its extension modules. The analytics service batch extracts from PostgreSQL. IDENTITY Auth service :3000 NestJS 11 · TypeScript signs and verifies JWTs owns the credential store the only service that ever sees a password Node auth stub :3001 provided fixture same claims as the auth service Sprints 6 and 7 only Frontend :4200 Angular · standalone components, signals login · dashboard · order ticket · blotter holds the JWT and attaches it on every call Trade REST API :8080 Java 21 · Spring Boot · MyBatis domain package · Sprint 5 extension modules · 6 verifies the JWT on every /api/** route records orders · serves accounts, balance, positions and order history Event backbone Apache Kafka :9092 orders trade-events market-data :9092 host · :29092 internal topics created by the team Trade Executor :8082 Java 21 · Kafka consumer fill or reject market-data poller one transaction for the order, the cash and the position health endpoint only PostgreSQL 16 :5432 The system of record. Accounts, instruments, orders and positions, plus the auth service's users and refresh tokens in their own schema. Analytics service no port Python 3.12+ · pandas · DuckDB batch extract, transform, load into a star schema and the dashboard that reads it Fauxnance API external Provided, already deployed end-of-day candles and delayed quotes X-Api-Key · 2000 requests a day · no streaming HTTPS login, refresh, current user HTTPS, Bearer JWT /api/v1/** produce orders · key accountId consume orders group trade-executor consume trade-events, market-data extension module groups produce trade-events, market-data JDBC auth schema: users, refresh tokens JDBC, MyBatis read and write JDBC · one transaction order, cash, position HTTPS · X-Api-Key GET /quotes/{symbol} GET /quotes?symbols= batch extract, read only role analytics_reader
Solid boxes are built by the team. Dashed boxes are provided. Arrow colour is the protocol: indigo for HTTP, amber for a database connection, teal for Kafka, grey and dashed for a call that leaves the platform.

Reading the connections

FromToProtocolWhat crosses
FrontendAuth serviceHTTPSCredentials on login, then a refresh token. Nothing else in the platform sends a password.
FrontendTrade REST APIHTTPSEvery /api/v1/** call with Authorization: Bearer. Order placement, cancellation, accounts, balance, positions, order history, portfolio.
Auth servicePostgreSQLJDBCUsers and refresh tokens in the auth schema. No trading table is touched from here.
Trade REST APIPostgreSQLJDBC, MyBatisReads accounts, instruments and positions to validate. Inserts the order with status NEW.
Trade REST APIKafkaproduceOne ORDER_PLACED message on orders, keyed by accountId, published after the database commit.
KafkaTrade Executorconsumeorders, in the single consumer group trade-executor.
Trade ExecutorFauxnance APIHTTPSA quote for the symbol being filled, and the scheduled batch call for held and watched symbols.
Trade ExecutorPostgreSQLJDBCThe order status change, the cash movement and the position upsert, in one transaction.
Trade ExecutorKafkaproducetrade-events keyed by accountId, and one market-data message per symbol keyed by symbol.
KafkaTrade REST APIconsumetrade-events and market-data, one consumer group per extension module.
PostgreSQLAnalytics serviceSQL, read onlyA scheduled batch extract as analytics_reader. The dashboard never queries this database directly after Sprint 7.

Connections that are deliberately absent

Legend

Built by the teamOne of the six. You write it, test it and own it.
ProvidedAlready running or already written. Configure it, do not build it.
Data storeSomething on disk that survives a restart.
Kafka topicDrawn with its real partition count.
HTTPSynchronous. The caller waits.
JDBC and SQLA database connection.
Kafka produce or consumeAsynchronous. The producer does not wait.
Call out of the platformRate limited, and it can fail.