flowchart LR
User([User])
FE[frontend<br/>Next.js · Expo]
KC[(Keycloak<br/>PKCE)]
ARB[arbiter<br/>Spring Boot]
MQ[(RabbitMQ)]
DT[deep-thought]
S3[(MinIO / S3<br/>annotated PGNs)]
TT[tactician]
ZZ[zugzwang]
Syzygy[(Syzygy<br/>Tablebases)]
DB0[(MySQL<br/>+ Redis)]
DB1[(MySQL)]
DB2[(MySQL)]
User <--> FE
FE <-. OIDC .-> KC
FE -- Bearer JWT --> ARB
ARB -. validates .-> KC
ARB <-. AMQP .-> MQ
MQ <-. AMQP .-> DT
DT -- produces --> S3
S3 -- nightly mining --> TT
ARB -- HTTP --> TT
ARB -- HTTP --> ZZ
ZZ --> Syzygy
ARB --> DB0
TT --> DB1
ZZ --> DB2
arbiter is the user-facing API gateway and Keycloak OAuth2 resource server; frontend is the only client surface. Annotated PGNs in the shared S3-compatible bucket form the cross-service contract — deep-thought produces them, tactician consumes them.
| Repo | Layer | Role | Stack |
|---|---|---|---|
| frontend | Client | pnpm monorepo — Next.js web today, Expo mobile planned. Talks to Keycloak directly and to Arbiter as Bearer JWT. | TypeScript · Next.js 16 · Tailwind v4 · shadcn/ui · Zustand · TanStack Query · chess.js · chessground · Stockfish (WASM) |
| arbiter | Gateway | API gateway and OAuth2 resource server. Aggregates platform state, brokers analysis jobs to deep-thought, proxies puzzle and endgame calls. |
Java 21 · Spring Boot 3.5 · Keycloak · MySQL · Redis · RabbitMQ · Flyway · Prometheus · Grafana |
| deep-thought | Worker | Game analysis worker — RabbitMQ-driven Stockfish producing annotated PGNs. | Python · RabbitMQ · Stockfish · MinIO |
| tactician | Service | Tactical puzzle service — daily Stockfish mining + HTTP API. | Python · FastAPI · MySQL · Stockfish |
| zugzwang | Service | Endgame trainer — perfect-play opponent via Syzygy tablebases. | Python · FastAPI · MySQL · Syzygy |
Built by @FickleBoBo