diff --git a/Architecture-Server.md b/Architecture-Server.md index 1ff5da3..2d76767 100644 --- a/Architecture-Server.md +++ b/Architecture-Server.md @@ -1,12 +1,20 @@ + + # Tekton Dash Armageddon - Server Architecture ## Nakama Backend (`server/nakama/lua/`) +[Back to top](#top) + + The backend runs on Nakama, written in Lua. It provides authoritative server-side logic for the economy, anti-cheat, mail, and gacha pulls. Godot clients call these endpoints via `BackendService.api_rpc_async()`. ### Key Lua Modules + +[Back to top](#top) + - **`economy.lua`:** - `buy_currency`: Validates mock/Google/Apple receipts and directly adds Gold or subtracts Gold for Stars via `nk.wallet_update`. - `purchase_item`: Buys cosmetic items from the shop catalog. Validates wallet funds and writes to `inventory` storage. @@ -21,6 +29,9 @@ Godot clients call these endpoints via `BackendService.api_rpc_async()`. ## Client / Server Wallet Synchronization +[Back to top](#top) + + There is **only one authoritative wallet** per user stored on the Nakama backend. 1. Lua calls `nk.wallet_update(changeset)` upon any transaction. @@ -31,9 +42,15 @@ There is **only one authoritative wallet** per user stored on the Nakama backend ## CI/CD and Hot-Patching Pipeline (`.gitea/workflows/`) +[Back to top](#top) + + The game features two distinct automated deployment pipelines. ### Full Releases (`ci.yml`) + +[Back to top](#top) + - **Trigger:** Pushing a git tag (e.g. `v3.0.0`). - **Purpose:** Compiling heavy native binaries (Windows `.exe`, Linux binaries, macOS `.app`). - **Flow:** @@ -44,6 +61,9 @@ The game features two distinct automated deployment pipelines. - **Player Experience:** Must download and replace their entire game folder/executable. ### Hot-Patching (`deploy_patch.yml`) + +[Back to top](#top) + - **Trigger:** Manual `workflow_dispatch` button from the Gitea UI. - **Purpose:** Pushing lightweight Godot asset changes (Scripts, Scenes, VFX, Sounds) instantly. - **Flow:**