Skip to main content

Architecture (State 007 Messaging NATS Replacement)

State 007 replaces Socket.IO trade-feed messaging with NATS while preserving state 003 containerized runtime and ingress entry model.

  • Inherits architectural baseline from: 003-containerized-compose-runtime
  • Generated from: system/architecture.model.json
  • Canonical flows: ../001-baseline-uncontainerized-parity/system/end-to-end-flows.md

Entry Points​

  • ingress: http://localhost:8080
  • nats-ws: ws://localhost:8080/nats-ws

Architecture Diagram​

Node Catalog​

NodeKindLabelNotes
traderactorTrader BrowserUses Angular UI and receives live updates.
ingressgatewayNGINX IngressRoutes REST and websocket traffic.
webfrontendWeb Front End AngularUses nats.ws for account-scoped streams.
natsmessagingNATS BrokerCore pub/sub broker for backend and browser streaming.
tradeServiceserviceTrade ServicePublishes new trade events.
tradeProcessorserviceTrade ProcessorConsumes and publishes processed/account updates.
accountserviceAccount ServiceAccount and account-user operations.
positionservicePosition ServiceTrades/positions query endpoints.
referenceDataserviceReference DataTicker lookup/list.
peopleservicePeople ServiceIdentity lookup and validation.
databasedatabaseDatabasePersistent account/trade/position state.

State Notes​

  • State 007 is an architecture-track branch from state 003.
  • Messaging transport changes to NATS; business behavior remains baseline-compatible.
  • JetStream durability is intentionally deferred to a future state.