Conversation
- Created `.scribe/journal.md` to document code ambiguities and magic logic. - Rewrote `README.md` to be a "Hero" entry point with Quick Start and C4 Context diagram. - Created `docs/ARCHITECTURE.md` with detailed C4 Container, Sequence, and ER diagrams. - Created `docs/DEVELOPER_GUIDE.md` for setup and build instructions. - Updated `CONTRIBUTING.md` to link to the new Developer Guide. Co-authored-by: alanvito1 <46165592+alanvito1@users.noreply.github.com>
…862278054872543399 ✍️ Scribe: Comprehensive Documentation Overhaul
📝 WalkthroughWalkthroughDocumentation restructure introducing comprehensive architecture and developer guides with Docker-first quick start, rebranding README to "Canary 🦜", updating contributing guidelines, and documenting internal observations on configuration and system behaviors. No code changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@docs/ARCHITECTURE.md`:
- Around line 24-29: The Mermaid diagram has a mismatched identifier: Container
defines LoginServer but the relationship uses LoginService; update the
relationship call Rel(Player, LoginService, ...) to Rel(Player, LoginServer,
...) (or alternatively rename the Container identifier to LoginService) so the
Container and Rel use the same symbol (LoginServer) ensuring the diagram renders
correctly; check for any other occurrences of LoginService and make them
consistent with the LoginServer identifier.
- Around line 46-79: The sequence diagram references the participant Webhook but
it isn't declared, breaking Mermaid rendering; add a participant declaration for
Webhook in the participant list (alongside Main, CanaryServer, ConfigManager,
Database, LuaEnv, Game, Dispatcher) so the diagram can reference Webhook in the
flow (ensure the symbol name exactly matches "Webhook" used later).
In `@docs/DEVELOPER_GUIDE.md`:
- Line 28: Update the phrasing in the document where it reads "C++20 compatible
compiler" to use a hyphenated form "C++20-compatible compiler" for readability;
locate the sentence containing that phrase (the line referencing compiler
requirements and vcpkg) and replace the unhyphenated term accordingly.
| ContainerDb(Database, "MariaDB", "MySQL Protocol", "Stores persistent data (Players, Houses, KV Store)") | ||
| Container(LoginServer, "Login Server", "Go/C++", "Handles authentication and character list retrieval") | ||
|
|
||
| Rel(Player, LoginService, "1. Authenticates", "HTTP/GRPC") | ||
| Rel(Player, NetworkLayer, "2. Connects to Game", "TCP (7171/7172)") | ||
|
|
There was a problem hiding this comment.
Fix Mermaid identifier mismatch (LoginServer vs LoginService).
Container(LoginServer, ...) is defined, but Rel(Player, LoginService, ...) references LoginService. This breaks diagram rendering.
💡 Suggested fix
- Rel(Player, LoginService, "1. Authenticates", "HTTP/GRPC")
+ Rel(Player, LoginServer, "1. Authenticates", "HTTP/GRPC")
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ContainerDb(Database, "MariaDB", "MySQL Protocol", "Stores persistent data (Players, Houses, KV Store)") | |
| Container(LoginServer, "Login Server", "Go/C++", "Handles authentication and character list retrieval") | |
| Rel(Player, LoginService, "1. Authenticates", "HTTP/GRPC") | |
| Rel(Player, NetworkLayer, "2. Connects to Game", "TCP (7171/7172)") | |
| ContainerDb(Database, "MariaDB", "MySQL Protocol", "Stores persistent data (Players, Houses, KV Store)") | |
| Container(LoginServer, "Login Server", "Go/C++", "Handles authentication and character list retrieval") | |
| Rel(Player, LoginServer, "1. Authenticates", "HTTP/GRPC") | |
| Rel(Player, NetworkLayer, "2. Connects to Game", "TCP (7171/7172)") |
🤖 Prompt for AI Agents
In `@docs/ARCHITECTURE.md` around lines 24 - 29, The Mermaid diagram has a
mismatched identifier: Container defines LoginServer but the relationship uses
LoginService; update the relationship call Rel(Player, LoginService, ...) to
Rel(Player, LoginServer, ...) (or alternatively rename the Container identifier
to LoginService) so the Container and Rel use the same symbol (LoginServer)
ensuring the diagram renders correctly; check for any other occurrences of
LoginService and make them consistent with the LoginServer identifier.
| participant Main | ||
| participant CanaryServer | ||
| participant ConfigManager | ||
| participant Database | ||
| participant LuaEnv | ||
| participant Game | ||
| participant Dispatcher | ||
|
|
||
| Main->>CanaryServer: run() | ||
| CanaryServer->>Dispatcher: init() | ||
| CanaryServer->>Dispatcher: addEvent(StartupTask) | ||
|
|
||
| Note over CanaryServer, Dispatcher: Startup runs asynchronously on the main thread | ||
|
|
||
| Dispatcher->>CanaryServer: Execute Startup Task | ||
| CanaryServer->>ConfigManager: loadConfigLua() | ||
| alt Config Missing | ||
| ConfigManager->>ConfigManager: Copy config.lua.dist -> config.lua | ||
| end | ||
|
|
||
| CanaryServer->>Database: initializeDatabase() | ||
| Database-->>CanaryServer: Connection Established | ||
|
|
||
| CanaryServer->>LuaEnv: initState() | ||
| CanaryServer->>LuaEnv: loadModules() (XMLs, Scripts, NPCs) | ||
|
|
||
| CanaryServer->>Game: loadMaps() | ||
| Game-->>CanaryServer: Map Loaded (OTBM) | ||
|
|
||
| CanaryServer->>Game: start() | ||
| Game->>NetworkLayer: Open Ports | ||
|
|
||
| CanaryServer->>Webhook: Send "Server Online" status | ||
| ``` |
There was a problem hiding this comment.
Declare the Webhook participant in the sequence diagram.
Webhook is used but never defined, which prevents Mermaid from rendering.
💡 Suggested fix
participant LuaEnv
participant Game
participant Dispatcher
+ participant Webhook
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| participant Main | |
| participant CanaryServer | |
| participant ConfigManager | |
| participant Database | |
| participant LuaEnv | |
| participant Game | |
| participant Dispatcher | |
| Main->>CanaryServer: run() | |
| CanaryServer->>Dispatcher: init() | |
| CanaryServer->>Dispatcher: addEvent(StartupTask) | |
| Note over CanaryServer, Dispatcher: Startup runs asynchronously on the main thread | |
| Dispatcher->>CanaryServer: Execute Startup Task | |
| CanaryServer->>ConfigManager: loadConfigLua() | |
| alt Config Missing | |
| ConfigManager->>ConfigManager: Copy config.lua.dist -> config.lua | |
| end | |
| CanaryServer->>Database: initializeDatabase() | |
| Database-->>CanaryServer: Connection Established | |
| CanaryServer->>LuaEnv: initState() | |
| CanaryServer->>LuaEnv: loadModules() (XMLs, Scripts, NPCs) | |
| CanaryServer->>Game: loadMaps() | |
| Game-->>CanaryServer: Map Loaded (OTBM) | |
| CanaryServer->>Game: start() | |
| Game->>NetworkLayer: Open Ports | |
| CanaryServer->>Webhook: Send "Server Online" status | |
| ``` | |
| participant Main | |
| participant CanaryServer | |
| participant ConfigManager | |
| participant Database | |
| participant LuaEnv | |
| participant Game | |
| participant Dispatcher | |
| participant Webhook | |
| Main->>CanaryServer: run() | |
| CanaryServer->>Dispatcher: init() | |
| CanaryServer->>Dispatcher: addEvent(StartupTask) | |
| Note over CanaryServer, Dispatcher: Startup runs asynchronously on the main thread | |
| Dispatcher->>CanaryServer: Execute Startup Task | |
| CanaryServer->>ConfigManager: loadConfigLua() | |
| alt Config Missing | |
| ConfigManager->>ConfigManager: Copy config.lua.dist -> config.lua | |
| end | |
| CanaryServer->>Database: initializeDatabase() | |
| Database-->>CanaryServer: Connection Established | |
| CanaryServer->>LuaEnv: initState() | |
| CanaryServer->>LuaEnv: loadModules() (XMLs, Scripts, NPCs) | |
| CanaryServer->>Game: loadMaps() | |
| Game-->>CanaryServer: Map Loaded (OTBM) | |
| CanaryServer->>Game: start() | |
| Game->>NetworkLayer: Open Ports | |
| CanaryServer->>Webhook: Send "Server Online" status |
🤖 Prompt for AI Agents
In `@docs/ARCHITECTURE.md` around lines 46 - 79, The sequence diagram references
the participant Webhook but it isn't declared, breaking Mermaid rendering; add a
participant declaration for Webhook in the participant list (alongside Main,
CanaryServer, ConfigManager, Database, LuaEnv, Game, Dispatcher) so the diagram
can reference Webhook in the flow (ensure the symbol name exactly matches
"Webhook" used later).
|
|
||
| ### Option B: Manual Build (C++) | ||
|
|
||
| If you prefer running on bare metal, you will need a C++20 compatible compiler (GCC 11+, Clang 14+, or MSVC). We use **vcpkg** for dependency management. |
There was a problem hiding this comment.
Hyphenate “C++20-compatible” for readability.
Minor grammar/style: “C++20-compatible compiler”.
🧰 Tools
🪛 LanguageTool
[grammar] ~28-~28: Use a hyphen to join words.
Context: ...ing on bare metal, you will need a C++20 compatible compiler (GCC 11+, Clang 14+,...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
In `@docs/DEVELOPER_GUIDE.md` at line 28, Update the phrasing in the document
where it reads "C++20 compatible compiler" to use a hyphenated form
"C++20-compatible compiler" for readability; locate the sentence containing that
phrase (the line referencing compiler requirements and vcpkg) and replace the
unhyphenated term accordingly.
|
We should take some time to analyze this change. Thanks for the effort put into improving the documentation and for taking the time to work on this. |



Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Behaviour
Actual
Do this and that doesn't happens
Expected
Do this and that happens
Fixes #issuenumber
Type of change
Please delete options that are not relevant.
How Has This Been Tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist
Summary by CodeRabbit