docs: add jump-to-top links to Architecture Server

2026-07-05 13:42:18 +08:00
parent caae09a09c
commit d205c8ecf2
+20
@@ -1,12 +1,20 @@
<a id="top"></a>
# Tekton Dash Armageddon - Server Architecture # Tekton Dash Armageddon - Server Architecture
## Nakama Backend (`server/nakama/lua/`) ## 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. 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()`. Godot clients call these endpoints via `BackendService.api_rpc_async()`.
### Key Lua Modules ### Key Lua Modules
[Back to top](#top)
- **`economy.lua`:** - **`economy.lua`:**
- `buy_currency`: Validates mock/Google/Apple receipts and directly adds Gold or subtracts Gold for Stars via `nk.wallet_update`. - `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. - `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 ## Client / Server Wallet Synchronization
[Back to top](#top)
There is **only one authoritative wallet** per user stored on the Nakama backend. There is **only one authoritative wallet** per user stored on the Nakama backend.
1. Lua calls `nk.wallet_update(changeset)` upon any transaction. 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/`) ## CI/CD and Hot-Patching Pipeline (`.gitea/workflows/`)
[Back to top](#top)
The game features two distinct automated deployment pipelines. The game features two distinct automated deployment pipelines.
### Full Releases (`ci.yml`) ### Full Releases (`ci.yml`)
[Back to top](#top)
- **Trigger:** Pushing a git tag (e.g. `v3.0.0`). - **Trigger:** Pushing a git tag (e.g. `v3.0.0`).
- **Purpose:** Compiling heavy native binaries (Windows `.exe`, Linux binaries, macOS `.app`). - **Purpose:** Compiling heavy native binaries (Windows `.exe`, Linux binaries, macOS `.app`).
- **Flow:** - **Flow:**
@@ -44,6 +61,9 @@ The game features two distinct automated deployment pipelines.
- **Player Experience:** Must download and replace their entire game folder/executable. - **Player Experience:** Must download and replace their entire game folder/executable.
### Hot-Patching (`deploy_patch.yml`) ### Hot-Patching (`deploy_patch.yml`)
[Back to top](#top)
- **Trigger:** Manual `workflow_dispatch` button from the Gitea UI. - **Trigger:** Manual `workflow_dispatch` button from the Gitea UI.
- **Purpose:** Pushing lightweight Godot asset changes (Scripts, Scenes, VFX, Sounds) instantly. - **Purpose:** Pushing lightweight Godot asset changes (Scripts, Scenes, VFX, Sounds) instantly.
- **Flow:** - **Flow:**