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.
| From | To | Protocol | What crosses |
|---|---|---|---|
| Frontend | Auth service | HTTPS | Credentials on login, then a refresh token. Nothing else in the platform sends a password. |
| Frontend | Trade REST API | HTTPS | Every /api/v1/** call with Authorization: Bearer. Order placement, cancellation, accounts, balance, positions, order history, portfolio. |
| Auth service | PostgreSQL | JDBC | Users and refresh tokens in the auth schema. No trading table is touched from here. |
| Trade REST API | PostgreSQL | JDBC, MyBatis | Reads accounts, instruments and positions to validate. Inserts the order with status NEW. |
| Trade REST API | Kafka | produce | One ORDER_PLACED message on orders, keyed by accountId, published after the database commit. |
| Kafka | Trade Executor | consume | orders, in the single consumer group trade-executor. |
| Trade Executor | Fauxnance API | HTTPS | A quote for the symbol being filled, and the scheduled batch call for held and watched symbols. |
| Trade Executor | PostgreSQL | JDBC | The order status change, the cash movement and the position upsert, in one transaction. |
| Trade Executor | Kafka | produce | trade-events keyed by accountId, and one market-data message per symbol keyed by symbol. |
| Kafka | Trade REST API | consume | trade-events and market-data, one consumer group per extension module. |
| PostgreSQL | Analytics service | SQL, read only | A scheduled batch extract as analytics_reader. The dashboard never queries this database directly after Sprint 7. |
orders has one consumer group and only one. A second group means two services filling
the same order.