forge/docus/dist/raw/client-addons/organization.md
Jacob Schmidt 827f3303a2 feat: add initial Docus setup and sync tool for documentation generation
- Created package.json for Docus with necessary scripts and dependencies.
- Implemented sync-docus-docs.mjs to automate the generation of documentation files from source markdown.
- Defined mappings for generated pages and virtual routes to ensure proper linking in documentation.
- Added static content files for the documentation structure, including navigation and index pages.
2026-04-21 16:07:27 -05:00

5.8 KiB

Client Organization Usage Guide

The client organization addon provides the organization portal UI and browser bridge for login, registration, membership, invites, credit lines, leave and disband flows, assets, fleet, and treasury display.

Open Organization UI

call forge_client_org_fnc_openUI;

The UI opens RscOrg, loads ui/_site/index.html, and routes browser alerts through forge_client_org_fnc_handleUIEvents.

Repository and Bridge

forge_client_org_fnc_initRepository caches organization portal state.

forge_client_org_fnc_initUIBridge owns:

  • active browser control tracking
  • portal hydrate requests
  • create/login response routing
  • leave and disband requests
  • credit-line assignment requests
  • invite, accept invite, and decline invite requests
  • targeted browser response events

Browser Events

<th>
  Client behavior
</th>
<td>
  Mark browser ready and request <code>
    org::sync
  </code>
  
  .
</td>
<td>
  Request portal hydrate as <code>
    org::login::success
  </code>
  
  .
</td>
<td>
  Validate org name and request creation on server.
</td>
<td>
  Request disband on server.
</td>
<td>
  Request leave on server.
</td>
<td>
  Request credit-line assignment.
</td>
<td>
  Request member invite.
</td>
<td>
  Accept invite by org ID.
</td>
<td>
  Decline invite by org ID.
</td>
<td>
  Close the display.
</td>
Event
org::ready
org::login::request
org::create::request
org::disband::request
org::leave::request
org::credit::request
org::invite::request
org::invite::accept
org::invite::decline
org::close

Browser Response Events

<th>
  Purpose
</th>
<td>
  Full portal sync payload.
</td>
<td>
  Login hydrate payload.
</td>
<td>
  Creation hydrate payload.
</td>
<td>
  Creation validation or server failure.
</td>
<td>
  Requester disband success.
</td>
<td>
  Disband failure.
</td>
<td>
  Portal state revoked by someone else's disband action.
</td>
<td>
  Leave success.
</td>
<td>
  Leave failure.
</td>
<td>
  Credit-line request success.
</td>
<td>
  Credit-line request failure.
</td>
<td>
  Targeted member credit-line patch.
</td>
<td>
  Invite success.
</td>
<td>
  Invite failure.
</td>
<td>
  Invite accept/decline success.
</td>
<td>
  Invite accept/decline failure.
</td>
Event
org::sync
org::login::success
org::create::success
org::create::failure
org::disband::success
org::disband::failure
org::portal::revoked
org::leave::success
org::leave::failure
org::credit::success
org::credit::failure
org::member::creditUpdated
org::invite::success
org::invite::failure
org::invite::decision::success
org::invite::decision::failure

Request Examples

Create organization request payload:

{
  "orgName": "Example Logistics"
}

Credit-line request payload:

{
  "memberUid": "76561198000000000",
  "memberName": "Player Name",
  "amount": 2500
}

Invite request payload:

{
  "targetUid": "76561198000000000",
  "targetName": "Player Name"
}

Authoritative State

Organization funds, reputation, membership, invites, credit lines, assets, fleet, and persistence are server-owned. The client portal only displays and requests changes.