# Client Usage Guide Forge Client contains the Arma client-side addons that open player interfaces, handle browser events, cache client-visible state, and forward authoritative requests to the server addons. Use this guide as the entry point for client-side integration. Domain data, validation, persistence, rewards, ownership, and checkout behavior remain server-side responsibilities. ## Client Responsibilities - Open Arma displays and `CT_WEBBROWSER` controls. - Load browser UI assets from each addon's `ui/_site` folder. - Receive browser alerts through `JSDialog` handlers. - Translate browser events into local actions or CBA server events. - Cache display state in client repositories. - Push server responses back into browser UIs with `ExecJS`. - Provide local-only utility state where the feature is intentionally local. ## Authoritative Boundaries Client repositories are view state. They are useful for rendering, local UI decisions, and short-lived session behavior, but they should not be treated as durable state. Authoritative state lives in: - server SQF addons for mission and player workflow ownership - the `forge_server` extension for durable and hot-state domain logic - SurrealDB where the extension persists durable domain records ## Common Runtime Flow Most browser-backed client addons follow this shape: 1. The addon creates a display, finds a browser control, and registers a `JSDialog` event handler. 2. The browser loads an HTML entrypoint from `ui/_site`. 3. The browser sends JSON alerts with an `event` name and `data` payload. 4. `fnc_handleUIEvents.sqf` parses the alert and routes the event. 5. A bridge object or repository sends a CBA server event when server data is needed. 6. Server responses are caught in `XEH_postInitClient.sqf`. 7. The bridge sends browser update events back through `ExecJS`. Browser alert payload: ```json { "event": "module::action", "data": {} } ``` ## Open UI Entry Points
| UI | Entry point |
|---|---|
| Actor menu |
call forge_client_actor_fnc_openUI;
|
| Bank |
call forge_client_bank_fnc_openUI;
|
| ATM |
[true] call forge_client_bank_fnc_openUI;
|
| CAD |
call forge_client_cad_fnc_openUI;
|
| Garage |
call forge_client_garage_fnc_openUI;
|
| Virtual garage |
call forge_client_garage_fnc_openVG;
|
| Organization portal |
call forge_client_org_fnc_openUI;
|
| Phone |
call forge_client_phone_fnc_openUI;
|
| Store |
call forge_client_store_fnc_openUI;
|