From 9ab4ff9fd92f651fd2614999cd7eee64fb14808e Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Sat, 16 May 2026 10:09:25 -0500 Subject: [PATCH] Update documentation for phone repository and SurrealDB setup - Changed references from `PhoneClass` to `PhoneRepository` in the phone usage guide. - Added payroll and treasury transfer requests to the client organization usage guide. - Updated SurrealDB setup documentation with helper scripts for database management. --- arma/client/addons/phone/README.md | 4 ++-- arma/server/docs/api-reference.md | 1 + docs/CLIENT_ORG_USAGE_GUIDE.md | 21 +++++++++++++++++++++ docs/CLIENT_PHONE_USAGE_GUIDE.md | 7 ++++--- docs/SURREALDB_SETUP.md | 27 +++++++++++++++++++++++---- docs/surrealdb-setup.md | 4 ++-- 6 files changed, 53 insertions(+), 11 deletions(-) diff --git a/arma/client/addons/phone/README.md b/arma/client/addons/phone/README.md index d719a9e..3eb674d 100644 --- a/arma/client/addons/phone/README.md +++ b/arma/client/addons/phone/README.md @@ -2,7 +2,7 @@ ## Overview The phone addon provides the in-game phone UI for contacts, SMS messages, and -email. It keeps a local `PhoneClass` facade for view state and sends all +email. It keeps a local `PhoneRepository` facade for view state and sends all authoritative operations to the server phone addon. ## Dependencies @@ -11,7 +11,7 @@ authoritative operations to the server phone addon. - notifications for contact/message/email feedback ## Main Components -- `fnc_initClass.sqf` initializes the local phone facade. +- `fnc_initRepository.sqf` initializes the local phone repository. - `fnc_handleUIEvents.sqf` translates browser events into server phone RPCs. - `fnc_openUI.sqf` opens `RscPhone`. - `ui/_site` contains the browser phone UI source. diff --git a/arma/server/docs/api-reference.md b/arma/server/docs/api-reference.md index b4844fd..8cdd8c2 100644 --- a/arma/server/docs/api-reference.md +++ b/arma/server/docs/api-reference.md @@ -39,6 +39,7 @@ needed by `forge_server_addons_extension_fnc_extCall`. - [Actor](../../../docs/ACTOR_USAGE_GUIDE.md) - [Bank](../../../docs/BANK_USAGE_GUIDE.md) - [CAD](../../../docs/CAD_USAGE_GUIDE.md) +- [Economy](../../../docs/ECONOMY_USAGE_GUIDE.md) - [Garage](../../../docs/GARAGE_USAGE_GUIDE.md) - [Locker](../../../docs/LOCKER_USAGE_GUIDE.md) - [Organization](../../../docs/ORG_USAGE_GUIDE.md) diff --git a/docs/CLIENT_ORG_USAGE_GUIDE.md b/docs/CLIENT_ORG_USAGE_GUIDE.md index 5a5723b..37b0b7c 100644 --- a/docs/CLIENT_ORG_USAGE_GUIDE.md +++ b/docs/CLIENT_ORG_USAGE_GUIDE.md @@ -24,6 +24,7 @@ through `forge_client_org_fnc_handleUIEvents`. - create/login response routing - leave and disband requests - credit-line assignment requests +- payroll and treasury transfer requests - invite, accept invite, and decline invite requests - targeted browser response events @@ -37,6 +38,8 @@ through `forge_client_org_fnc_handleUIEvents`. | `org::disband::request` | Request disband on server. | | `org::leave::request` | Request leave on server. | | `org::credit::request` | Request credit-line assignment. | +| `org::payroll::request` | Request payroll payout from the organization treasury. | +| `org::transfer::request` | Request treasury transfer to a member. | | `org::invite::request` | Request member invite. | | `org::invite::accept` | Accept invite by org ID. | | `org::invite::decline` | Decline invite by org ID. | @@ -83,6 +86,24 @@ Credit-line request payload: } ``` +Payroll request payload: + +```json +{ + "amount": 1000 +} +``` + +Treasury transfer request payload: + +```json +{ + "memberUid": "76561198000000000", + "memberName": "Player Name", + "amount": 1000 +} +``` + Invite request payload: ```json diff --git a/docs/CLIENT_PHONE_USAGE_GUIDE.md b/docs/CLIENT_PHONE_USAGE_GUIDE.md index 28832a1..f085d7d 100644 --- a/docs/CLIENT_PHONE_USAGE_GUIDE.md +++ b/docs/CLIENT_PHONE_USAGE_GUIDE.md @@ -26,11 +26,12 @@ Local utility app state is stored in `profileNamespace`: - alarms - theme/preferences -## Phone Class +## Phone Repository -`forge_client_phone_fnc_initClass` creates `GVAR(PhoneClass)`. +`forge_client_phone_fnc_initRepository` creates `GVAR(PhoneRepository)`. -The phone class currently owns local notes, events, and settings helpers. +The phone repository owns local notes, events, clocks, alarms, and settings +helpers. Contacts, messages, and emails continue to use server-backed request/response events. diff --git a/docs/SURREALDB_SETUP.md b/docs/SURREALDB_SETUP.md index 918a801..b865024 100644 --- a/docs/SURREALDB_SETUP.md +++ b/docs/SURREALDB_SETUP.md @@ -14,7 +14,23 @@ hosting the live Arma server. Official SurrealDB resources: - [SurrealDB install page](https://surrealdb.com/install) -- [SurrealDB CLI `start` reference](https://surrealdb.com/docs/reference/cli/surrealdb-cli/commands/start) +- [SurrealDB CLI `start` reference](https://surrealdb.com/docs/surrealdb/cli/start) + +Forge also includes helper scripts under `arma/server/surrealdb`: + +```powershell +cd arma/server/surrealdb +.\UpdateMe.bat +.\RunMe.bat +``` + +On Linux or macOS: + +```bash +cd arma/server/surrealdb +./setup.sh +./run.sh +``` Install SurrealDB with the official method for your platform: @@ -37,9 +53,12 @@ For Forge, start a persistent local database instead of the default in-memory mode: ```powershell -surreal start surrealkv://forge.db --bind 127.0.0.1:8000 --user root --pass root +surreal start --user root --pass root --bind 127.0.0.1:8000 rocksdb://forge.db ``` +`root`/`root` is only the local development default. For a public or shared +server, set a real password and keep `config.toml` aligned. + Then copy `arma/server/extension/config.example.toml` to `config.toml` next to `forge_server_x64.dll` and keep the values aligned with the database you started: @@ -75,9 +94,9 @@ or live server and you are not changing Forge source code. Official SurrealDB resources: -- [Surrealist installation](https://surrealdb.com/docs/explore/surrealist/installation) +- [Surrealist installation](https://surrealdb.com/docs/surrealist/installation) - [Surrealist web app](https://app.surrealdb.com) -- [Surrealist local database serving](https://surrealdb.com/docs/explore/surrealist/concepts/local-database-serving) +- [Surrealist local database serving](https://surrealdb.com/docs/surrealist/concepts/local-database-serving) Recommended approach: diff --git a/docs/surrealdb-setup.md b/docs/surrealdb-setup.md index de7ecc4..b865024 100644 --- a/docs/surrealdb-setup.md +++ b/docs/surrealdb-setup.md @@ -94,9 +94,9 @@ or live server and you are not changing Forge source code. Official SurrealDB resources: -- [Surrealist installation](https://surrealdb.com/docs/explore/surrealist/installation) +- [Surrealist installation](https://surrealdb.com/docs/surrealist/installation) - [Surrealist web app](https://app.surrealdb.com) -- [Surrealist local database serving](https://surrealdb.com/docs/explore/surrealist/concepts/local-database-serving) +- [Surrealist local database serving](https://surrealdb.com/docs/surrealist/concepts/local-database-serving) Recommended approach: