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.
This commit is contained in:
Jacob Schmidt 2026-05-16 10:09:25 -05:00
parent df325e2114
commit 9ab4ff9fd9
6 changed files with 53 additions and 11 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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

View File

@ -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.

View File

@ -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:

View File

@ -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: