Repository navigation
docs: Add architecture overview and ADRs with mermaid diagrams - #54
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c26e306d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| |---|---|---|---| | ||
| | Endpoint | `/ws` | `/ws/tictactoe` | `/ws/battle-tanks` | | ||
| | Client command | continuous paddle input | discrete cell move | versioned move/aim/fire command | | ||
| | State delivery | 30 Hz snapshots | after actions | 60 Hz simulation snapshots | |
There was a problem hiding this comment.
Document the actual Battle Tanks snapshot cadence
The Battle Tanks server simulates at 60 Hz, but it does not deliver snapshots at that rate: server/battle-tanks-rooms.js gates broadcastStates() on at least 40 ms since the previous broadcast, so state delivery is capped at 25 Hz and is typically lower when sampled by the 60 Hz timer in server/index.js. This table gives incorrect expectations for client interpolation and bandwidth planning; either document the throttled delivery cadence or change the broadcaster if 60 Hz snapshots are intended.
Useful? React with 👍 / 👎.
Motivation
Description
docs/hub witharchitecture.mdthat maps the browser shell, Node process, room managers, SQLite persistence and deployment topology using multiplemermaiddiagrams and sequence/ER views.docs/adr/with seven concise ADR files (0001–0007) documenting decisions about the build-free client, SQLite migrations, server-side scoring and achievements, authoritative ephemeral rooms, session boundaries, preserving classic games, and same-origin security, plus anadr/README.mdindex.docs/README.mdthat points to the architecture map and ADR index so the documentation is discoverable from the repo root.docs/README.md,docs/architecture.md, anddocs/adr/0001-*through0007-*anddocs/adr/README.md.Testing
npm test(the repository test suite vianode --test) and all tests completed successfully.git diff --checkwith no issues reported.14mermaiddiagrams in the new docs.Codex Task