Skip to content

Scribe#3834

Draft
alanvito1 wants to merge 2 commits intoopentibiabr:mainfrom
alanvito1:main
Draft

Scribe#3834
alanvito1 wants to merge 2 commits intoopentibiabr:mainfrom
alanvito1:main

Conversation

@alanvito1
Copy link

@alanvito1 alanvito1 commented Feb 5, 2026

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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 A
  • Test B

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Summary by CodeRabbit

  • Documentation
    • Refreshed project README with new branding and Docker-first quick-start setup
    • Added comprehensive Architecture documentation with system diagrams and design overview
    • Introduced Developer Guide covering environment setup, build instructions, and contribution guidelines
    • Enhanced documentation structure for improved navigation and accessibility

google-labs-jules bot and others added 2 commits February 5, 2026 10:22
- 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
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

Documentation 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

Cohort / File(s) Summary
README Rebranding & Structure
README.md
Complete content overhaul replacing OpenTibiaBR branding with Canary 🦜, adding Docker-centric quick start, architectural C4 diagram, and reorganized navigation guide with platform deployment details.
Architecture Documentation
docs/ARCHITECTURE.md
New comprehensive file detailing system architecture with C4/UML diagrams, server startup sequence, database schema (ER diagram), and explanation of KV store and Dispatcher patterns.
Developer Resources
docs/DEVELOPER_GUIDE.md, CONTRIBUTING.md
New developer guide covering project structure, environment setup, build instructions (CMake/Ninja/Visual Studio), testing, and database configuration; contributing file updated with Developer Guide reference.
Internal Documentation
.scribe/journal.md
New file documenting observed ambiguities and magic logic including automated configuration, datapack validation, database initialization dependencies, and KV store coupling, plus knowledge gaps on Docker environment complexity.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hop, hop! New docs take flight,
Architecture mapped in diagrams bright,
Docker quickstart, paths now clear,
From code to knowledge, we've built it here! 🦜✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Scribe' is vague and generic, failing to convey what changes are being made. While commit messages reveal the PR adds documentation (journal.md, ARCHITECTURE.md, DEVELOPER_GUIDE.md, README rewrite), the title itself provides no meaningful information about these changes. Consider a more descriptive title like 'Add comprehensive documentation and architecture guides' or 'Implement Scribe documentation methodology with architecture diagrams' to clearly communicate the changeset's scope.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +24 to +29
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)")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Suggested change
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.

Comment on lines +46 to +79
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
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Suggested change
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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@dudantas dudantas marked this pull request as draft February 5, 2026 11:46
@dudantas
Copy link
Member

dudantas commented Feb 5, 2026

We should take some time to analyze this change.
Currently, https://docs.opentibiabr.com is the place that actually contains tutorials and practical guides, while the repository /docs does not.
Removing the reference is not necessarily wrong, but it represents a documentation governance decision, not just a cosmetic change.
Before merging, it would be good to align on whether the repository docs are meant to replace the existing site or to coexist with it and stay in sync.

Thanks for the effort put into improving the documentation and for taking the time to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants