# afnan9700/some-document-editor architecture

> Architecture diagram of the GitHub repository afnan9700/some-document-editor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/afnan9700/some-document-editor
- Repository: https://github.com/afnan9700/some-document-editor

## Overview

1. This is a polyglot collaborative document-editing system split into four deployable pieces: an Angular frontend, a Spring Boot backend, a Node/TypeScript collaboration-state worker, and a Go WebSocket service. A `docker-compose.yml` and `haproxy` config suggest the services are intended to run together behind a reverse proxy.

2. The Spring Boot backend is the main application API and business-logic layer. It owns authentication, documents, permissions, sharing/invites, locks, access requests, and issuing WebSocket tickets. It also exposes internal endpoints used by the collaboration worker service.

3. The frontend is an Angular SPA. It contains distinct UI areas for auth, document library, document workspace, sharing/invites, and live collaboration. Frontend services indicate it talks to the backend over HTTP for normal CRUD flows and to the WebSocket service for real-time editing.

4. Authentication is backend-owned and JWT-based. The backend includes `AuthController`, `AuthService`, `JwtService`, JWT and internal auth filters, a `CustomUserDetailsService`, and a `SecurityConfig`. The frontend has a JWT interceptor, so authenticated API calls are token-attached on the client side.

5. The document subsystem is the core persistence boundary in the backend. It has document metadata and content models/repositories, plus `DocumentService` and `DocumentController`. The frontend mirrors this with document models, library pages, entry pages, and workspace pages, indicating separate flows for browsing documents versus editing a specific document.

6. Sharing and access control are first-class backend subsystems. `sharing`, `invite`, `permission`, and `access` packages show a model where users can invite others, manage permission levels, and request access. The frontend has matching document-sharing pages and invite-link UI, so sharing is a user-visible workflow rather than an internal admin feature.

7. Locking is a separate coordination layer in the backend. The presence of `DocumentLock`, `LockService`, lock status/type enums, and lock repository suggests the system prevents conflicting edits or distinguishes editing modes. This is likely used alongside collaboration to manage who can edit and when.

8. Real-time collaboration is offloaded to dedicated services rather than handled directly in the Spring API. The backend has a `collaborationstateworkerclient` package with proxying/routing components, and an internal `collaborationstateworker` package for syncing worker-owned document state. This implies the backend brokers document sessions and delegates live state handling to a separate worker tier.

9. The Node/TypeScript `collaboration-state-worker` appears to maintain document runtime state and bridge to Spring. Its `documentManager`, `documentRuntime`, `springClient`, and `server` files suggest it receives collaboration requests, tracks per-document session state, and synchronizes with backend-persisted state or permissions. This is the stateful collaboration layer.

10. The Go `ws-service` is the real-time transport layer. Its internal packages for `ws`, `hub`, `broker`, `auth`, and `protocol` indicate it terminates WebSocket connections, authenticates them via tickets/Redis-backed auth state, and fans messages out through a hub/broker abstraction. This service is the live message bus between editors.

11. WebSocket access is ticket-based rather than raw JWT handoff. The backend has `websocketticket` models/services, and the frontend has a `websocket-ticket.service.ts`. That suggests the frontend first asks the backend for a short-lived ticket, then uses that ticket to connect to the Go WebSocket service.

12. The collaboration flow likely looks like this: user logs in through Angular, receives a JWT, loads a document via backend APIs, requests a WebSocket ticket, connects to the WebSocket service, and then exchanges editing events through the collaboration stack. The worker and backend synchronize document/session state, while persistent document data remains in the Spring backend database layer.

13. The repo also includes strong cross-cutting concerns in the backend: a global exception model, API error response type, and utility security helpers. That indicates the Spring service is the canonical place for request validation, authorization failures, and domain errors.

14. From an architecture-diagram perspective, the main boundaries are: browser UI, Spring backend API, worker/state service, WebSocket transport service, and the shared backing stores implied by JPA and Redis usage. The important external interactions are HTTP for normal app operations, Redis for WebSocket/session coordination, and proxied WebSocket connections for live editing.

Main entry points: [`backend/src/main/java/com/somedomain/collab_editor/CollabEditorApplication.java`](https://github.com/afnan9700/some-document-editor/blob/main/backend/src/main/java/com/somedomain/collab_editor/CollabEditorApplication.java) (Spring app), [`collaboration-state-worker/src/server.ts`](https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/server.ts) (Worker server), [`frontend/src/app/collaboration`](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/collaboration) (Collab UI), [`haproxy/haproxy.cfg`](https://github.com/afnan9700/some-document-editor/blob/main/haproxy/haproxy.cfg) (Reverse proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular UI"]
  node_frontend_app["Angular app<br/>spa shell"]
  node_frontend_auth["Auth UI<br/>login/signup"]
  node_frontend_docs["Document UI<br/>library/editing"]
  node_frontend_workspace["Workspace UI<br/>editing pages"]
  node_frontend_sharing["Sharing UI<br/>invite/access"]
  node_frontend_collab["Collab UI<br/>live editing"]
  node_frontend_core["HTTP core<br/>api/jwt"]
end

subgraph group_backend["Spring API"]
  node_backend_app["Spring app<br/>api monolith"]
  node_backend_security["Security<br/>jwt auth"]
  node_backend_documents["Documents<br/>persistence/api"]
  node_backend_sharing["Sharing<br/>permissions"]
  node_backend_access["Access"]
  node_backend_invitations["Invites<br/>invite model"]
  node_backend_permissions["Permissions<br/>permission model"]
  node_backend_locks["Locks<br/>coordination"]
  node_backend_ws_ticket["WS tickets<br/>ticketing"]
  node_backend_worker_bridge["Worker bridge<br/>proxy/routing"]
  node_backend_worker_sync["Worker sync<br/>internal sync"]
  node_backend_common["API errors<br/>exceptions"]
end

subgraph group_worker["State Worker"]
  node_worker_server["Worker server<br/>collab state<br/>[server.ts]"]
  node_worker_runtime["Doc runtime<br/>session state<br/>[documentRuntime.ts]"]
  node_worker_manager["Doc manager<br/>orchestration<br/>[documentManager.ts]"]
  node_worker_spring["Spring client<br/>backend bridge<br/>[springClient.ts]"]
end

subgraph group_ws["WebSocket Service"]
  node_ws_server["WS server<br/>transport<br/>[main.go]"]
  node_ws_handler["WS handler<br/>socket io<br/>[handler.go]"]
  node_ws_hub["Hub<br/>fanout"]
  node_ws_broker["Broker<br/>redis fanout"]
  node_ws_auth["WS auth<br/>ticket auth"]
  node_ws_protocol["Protocol<br/>envelope/payloads"]
end

subgraph group_infra["Shared Infra"]
  node_infra_proxy["Reverse proxy<br/>haproxy<br/>[haproxy.cfg]"]
  node_infra_db[("Primary DB<br/>relational store")]
  node_infra_redis[("Redis<br/>shared cache")]
end

node_frontend_app -->|"uses"| node_frontend_core
node_frontend_core -->|"JWT auth"| node_backend_security
node_frontend_auth -->|"login/signup"| node_backend_security
node_frontend_docs -->|"CRUD"| node_backend_documents
node_frontend_workspace -->|"opens"| node_frontend_docs
node_frontend_sharing -->|"share flows"| node_backend_sharing
node_frontend_sharing -->|"requests"| node_backend_access
node_frontend_collab -->|"gets ticket"| node_backend_ws_ticket
node_frontend_collab -->|"connects"| node_ws_server
node_frontend_collab -->|"sync state"| node_worker_server
node_backend_app -->|"protects"| node_backend_security
node_backend_app -->|"hosts"| node_backend_documents
node_backend_app -->|"hosts"| node_backend_sharing
node_backend_app -->|"coordinates"| node_backend_locks
node_backend_app -->|"issues"| node_backend_ws_ticket
node_backend_app -->|"delegates"| node_backend_worker_bridge
node_backend_worker_bridge -->|"routes to"| node_worker_server
node_backend_worker_sync -->|"syncs"| node_worker_server
node_worker_server -->|"orchestrates"| node_worker_manager
node_worker_manager -->|"creates"| node_worker_runtime
node_worker_spring -->|"syncs state"| node_backend_worker_sync
node_ws_server -->|"accepts"| node_ws_handler
node_ws_handler -->|"joins"| node_ws_hub
node_ws_handler -->|"encodes"| node_ws_protocol
node_ws_hub -->|"fanout"| node_ws_broker
node_ws_auth -->|"reads/writes"| node_infra_redis
node_ws_broker -->|"pub/sub"| node_infra_redis
node_backend_documents -->|"persists"| node_infra_db
node_backend_sharing -->|"persists"| node_infra_db
node_backend_locks -->|"persists"| node_infra_db
node_backend_worker_sync -->|"persists"| node_infra_db
node_infra_proxy -->|"routes UI"| node_frontend_app
node_infra_proxy -->|"routes API"| node_backend_app
node_infra_proxy -->|"routes WS"| node_ws_server

click node_frontend_app "https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app"
click node_frontend_auth "https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/auth"
click node_frontend_docs "https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/documents"
click node_frontend_workspace "https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/document-workspace"
click node_frontend_sharing "https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/document-sharing"
click node_frontend_collab "https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/collaboration"
click node_frontend_core "https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/core"
click node_backend_app "https://github.com/afnan9700/some-document-editor/blob/main/backend/src/main/java/com/somedomain/collab_editor/CollabEditorApplication.java"
click node_backend_security "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/auth"
click node_backend_documents "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/document"
click node_backend_sharing "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/sharing"
click node_backend_access "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/access"
click node_backend_invitations "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/invite"
click node_backend_permissions "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/permission"
click node_backend_locks "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/lock"
click node_backend_ws_ticket "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/websocketticket"
click node_backend_worker_bridge "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/collaborationstateworkerclient"
click node_backend_worker_sync "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/internal/collaborationstateworker"
click node_backend_common "https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/common"
click node_worker_server "https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/server.ts"
click node_worker_runtime "https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/documentRuntime.ts"
click node_worker_manager "https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/documentManager.ts"
click node_worker_spring "https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/springClient.ts"
click node_ws_server "https://github.com/afnan9700/some-document-editor/blob/main/ws-service/cmd/ws-server/main.go"
click node_ws_handler "https://github.com/afnan9700/some-document-editor/blob/main/ws-service/internal/ws/handler.go"
click node_ws_hub "https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/hub"
click node_ws_broker "https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/broker"
click node_ws_auth "https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/auth"
click node_ws_protocol "https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/protocol"
click node_infra_proxy "https://github.com/afnan9700/some-document-editor/blob/main/haproxy/haproxy.cfg"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_frontend_app,node_frontend_auth,node_frontend_docs,node_frontend_workspace,node_frontend_sharing,node_frontend_collab,node_frontend_core toneBlue
class node_backend_app,node_backend_security,node_backend_documents,node_backend_sharing,node_backend_access,node_backend_invitations,node_backend_permissions,node_backend_locks,node_backend_ws_ticket,node_backend_worker_bridge,node_backend_worker_sync,node_backend_common toneAmber
class node_worker_server,node_worker_runtime,node_worker_manager,node_worker_spring toneMint
class node_ws_server,node_ws_handler,node_ws_hub,node_ws_broker,node_ws_auth,node_ws_protocol toneRose
class node_infra_proxy,node_infra_db,node_infra_redis toneIndigo
```

## Components

### Angular UI

Browser SPA for auth, documents, sharing, and collaboration.

- [Angular app](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app): spa shell · Top-level browser application shell and routing entry point. · `frontend/src/app`
- [Auth UI](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/auth): login/signup · Login and signup screens plus auth models/services. · `frontend/src/app/auth`
- [Document UI](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/documents): library/editing · Document library, entry page, and document service for CRUD flows. · `frontend/src/app/documents`
- [Workspace UI](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/document-workspace): editing pages · Document workspace pages and layout for editing or readonly viewing. · `frontend/src/app/document-workspace`
- [Sharing UI](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/document-sharing): invite/access · Sharing, invite-link, and access-request screens and service. · `frontend/src/app/document-sharing`
- [Collab UI](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/collaboration): live editing · Collaboration workspace, chat, WebSocket ticket flow, and state-worker integration. · `frontend/src/app/collaboration`
- [HTTP core](https://github.com/afnan9700/some-document-editor/tree/main/frontend/src/app/core): api/jwt · Shared API client, JWT interceptor, and app-wide tokens/services. · `frontend/src/app/core`

### Spring API

Main application API, business logic, persistence, and security.

- [Spring app](https://github.com/afnan9700/some-document-editor/blob/main/backend/src/main/java/com/somedomain/collab_editor/CollabEditorApplication.java): api monolith · Main backend application entry point and runtime. · `backend/src/main/java/com/somedomain/collab_editor/CollabEditorApplication.java`
- [Security](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/auth): jwt auth · JWT auth, internal auth, user details, password, and security config. · `backend/src/main/java/com/somedomain/collab_editor/auth`
- [Documents](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/document): persistence/api · Document metadata, content, repository, service, and controller. · `backend/src/main/java/com/somedomain/collab_editor/document`
- [Sharing](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/sharing): permissions · Sharing workflows and access-control orchestration. · `backend/src/main/java/com/somedomain/collab_editor/sharing`
- [Access](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/access): access requests · Access-request model and repository used for document access workflows. · `backend/src/main/java/com/somedomain/collab_editor/access`
- [Invites](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/invite): invite model · Invite persistence for share/invite flows. · `backend/src/main/java/com/somedomain/collab_editor/invite`
- [Permissions](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/permission): permission model · Document permission model and repository. · `backend/src/main/java/com/somedomain/collab_editor/permission`
- [Locks](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/lock): coordination · Document locking and lock-state services for edit coordination. · `backend/src/main/java/com/somedomain/collab_editor/lock`
- [WS tickets](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/websocketticket): ticketing · Short-lived WebSocket ticket issuance for real-time connections. · `backend/src/main/java/com/somedomain/collab_editor/websocketticket`
- [Worker bridge](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/collaborationstateworkerclient): proxy/routing · Proxy endpoints and routing logic that delegate collaboration-state operations to the worker. · `backend/src/main/java/com/somedomain/collab_editor/collaborationstateworkerclient`
- [Worker sync](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/internal/collaborationstateworker): internal sync · Internal backend endpoints and persistence for worker-synchronized document state. · `backend/src/main/java/com/somedomain/collab_editor/internal/collaborationstateworker`
- [API errors](https://github.com/afnan9700/some-document-editor/tree/main/backend/src/main/java/com/somedomain/collab_editor/common): exceptions · Global exception handling and API error model. · `backend/src/main/java/com/somedomain/collab_editor/common`

### State Worker

Node/TypeScript service that manages collaboration state and bridges to Spring.

- [Worker server](https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/server.ts): collab state · Node service entrypoint exposing collaboration-state APIs. · `collaboration-state-worker/src/server.ts`
- [Doc runtime](https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/documentRuntime.ts): session state · Per-document runtime/session state management. · `collaboration-state-worker/src/documentRuntime.ts`
- [Doc manager](https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/documentManager.ts): orchestration · Document lifecycle and routing orchestration for collaboration sessions. · `collaboration-state-worker/src/documentManager.ts`
- [Spring client](https://github.com/afnan9700/some-document-editor/blob/main/collaboration-state-worker/src/springClient.ts): backend bridge · Client used to synchronize with Spring backend services. · `collaboration-state-worker/src/springClient.ts`

### WebSocket Service

Go service that terminates live editor connections and routes messages.

- [WS server](https://github.com/afnan9700/some-document-editor/blob/main/ws-service/cmd/ws-server/main.go): transport · Go WebSocket server entrypoint. · `ws-service/cmd/ws-server/main.go`
- [WS handler](https://github.com/afnan9700/some-document-editor/blob/main/ws-service/internal/ws/handler.go): socket io · Connection upgrade and message handling for WebSocket clients. · `ws-service/internal/ws/handler.go`
- [Hub](https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/hub): fanout · Connected-client hub for room membership and broadcast coordination. · `ws-service/internal/hub`
- [Broker](https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/broker): redis fanout · Redis-backed message distribution between WebSocket instances. · `ws-service/internal/broker`
- [WS auth](https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/auth): ticket auth · Ticket validation and Redis-backed auth state for WebSocket access. · `ws-service/internal/auth`
- [Protocol](https://github.com/afnan9700/some-document-editor/tree/main/ws-service/internal/protocol): envelope/payloads · Message envelopes and payload definitions for live collaboration. · `ws-service/internal/protocol`

### Shared Infra

Backing stores and edge routing used by the deployable services.

- [Reverse proxy](https://github.com/afnan9700/some-document-editor/blob/main/haproxy/haproxy.cfg): haproxy · Edge proxy for routing browser and service traffic. · `haproxy/haproxy.cfg`
- **Primary DB**: relational store · Persistent store for users, documents, permissions, locks, and invites.
- **Redis**: shared cache · Shared Redis store used by WebSocket auth and broker coordination.

## Connections

- Angular app → HTTP core: uses · App shell uses shared HTTP/auth plumbing.
- HTTP core → Security: JWT auth · Client attaches JWTs to API calls.
- Auth UI → Security: login/signup · Auth screens call backend auth endpoints.
- Document UI → Documents: CRUD · Document browsing and metadata flows use backend APIs.
- Workspace UI → Document UI: opens · Workspace builds on selected document flows.
- Sharing UI → Sharing: share flows · Invite and access-request UI calls sharing APIs.
- Sharing UI → Access: requests · Access request UI hits access endpoints.
- Collab UI → WS tickets: gets ticket · Frontend requests short-lived WebSocket tickets.
- Collab UI → WS server: connects · Editor connects to live WebSocket transport.
- Collab UI → Worker server: sync state · Collaboration UI interacts with the state worker.
- Spring app → Security: protects · Spring app uses JWT and internal auth filters.
- Spring app → Documents: hosts · Main API exposes document endpoints.
- Spring app → Sharing: hosts · Main API exposes sharing endpoints.
- Spring app → Locks: coordinates · Backend manages document lock state.
- Spring app → WS tickets: issues · Backend issues WebSocket access tickets.
- Spring app → Worker bridge: delegates · Backend proxies collaboration-state operations to the worker tier.
- Worker bridge → Worker server: routes to · Proxy layer forwards requests to the worker service.
- Worker sync → Worker server: syncs · Internal worker-sync endpoints mirror worker-owned state.
- Worker server → Doc manager: orchestrates · Server coordinates document lifecycle logic.
- Doc manager → Doc runtime: creates · Manager maintains per-document runtime state.
- Spring client → Worker sync: syncs state · Worker uses Spring-facing sync endpoints.
- WS server → WS handler: accepts · Server upgrades and handles WebSocket connections.
- WS handler → Hub: joins · Connections are registered in the hub.
- WS handler → Protocol: encodes · Handler uses collaboration message envelopes and payloads.
- Hub → Broker: fanout · Hub uses broker for multi-instance message distribution.
- WS auth → Redis: reads/writes · Ticket auth uses Redis-backed state.
- Broker → Redis: pub/sub · Broker relies on Redis for cross-instance coordination.
- Documents → Primary DB: persists · Documents and content are stored in the main database.
- Sharing → Primary DB: persists · Sharing state is persisted in the main database.
- Locks → Primary DB: persists · Lock state is persisted in the main database.
- Worker sync → Primary DB: persists · Worker-sync state is stored in the main database.
- Reverse proxy → Angular app: routes UI · Proxy routes browser traffic to the frontend.
- Reverse proxy → Spring app: routes API · Proxy routes HTTP API traffic to Spring.
- Reverse proxy → WS server: routes WS · Proxy routes WebSocket traffic to the Go service.
