2026-05-23 09:23:12 -05:00

1 line
14 KiB
JSON

[{"data":1,"prerenderedAt":477},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-architecture":145,"-getting-started-architecture-surround":472},[4,27,41,93],{"title":5,"path":6,"stem":7,"children":8,"icon":26},"Getting Started","\u002Fgetting-started","1.getting-started\u002F0.index",[9,10,14,18,22],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13},"Framework Architecture","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F1.architecture",{"title":15,"path":16,"stem":17},"Module Reference","\u002Fgetting-started\u002Fmodule-reference","1.getting-started\u002F2.module-reference",{"title":19,"path":20,"stem":21},"Development Guide","\u002Fgetting-started\u002Fdevelopment","1.getting-started\u002F3.development",{"title":23,"path":24,"stem":25},"SurrealDB Setup","\u002Fgetting-started\u002Fsurrealdb-setup","1.getting-started\u002F4.surrealdb-setup","i-lucide-rocket",{"title":28,"path":29,"stem":30,"children":31},"Forge Server Extension","\u002Fserver-extension","2.server-extension\u002F0.index",[32,33,37],{"title":28,"path":29,"stem":30},{"title":34,"path":35,"stem":36},"Forge Server API Reference","\u002Fserver-extension\u002Fapi-reference","2.server-extension\u002F1.api-reference",{"title":38,"path":39,"stem":40},"Forge Server Usage Examples","\u002Fserver-extension\u002Fusage-examples","2.server-extension\u002F2.usage-examples",{"title":42,"path":43,"stem":44,"children":45,"icon":92},"Server Modules","\u002Fserver-modules","3.server-modules\u002F0.index",[46,48,52,56,60,64,68,72,76,80,84,88],{"title":47,"path":43,"stem":44},"Server Module Guides",{"title":49,"path":50,"stem":51},"Actor Usage Guide","\u002Fserver-modules\u002Factor","3.server-modules\u002F1.actor",{"title":53,"path":54,"stem":55},"Store Usage Guide","\u002Fserver-modules\u002Fstore","3.server-modules\u002F10.store",{"title":57,"path":58,"stem":59},"Task Usage Guide","\u002Fserver-modules\u002Ftask","3.server-modules\u002F11.task",{"title":61,"path":62,"stem":63},"Bank Usage Guide","\u002Fserver-modules\u002Fbank","3.server-modules\u002F2.bank",{"title":65,"path":66,"stem":67},"CAD Usage Guide","\u002Fserver-modules\u002Fcad","3.server-modules\u002F3.cad",{"title":69,"path":70,"stem":71},"Economy Usage Guide","\u002Fserver-modules\u002Feconomy","3.server-modules\u002F4.economy",{"title":73,"path":74,"stem":75},"Garage Usage Guide","\u002Fserver-modules\u002Fgarage","3.server-modules\u002F5.garage",{"title":77,"path":78,"stem":79},"Locker Usage Guide","\u002Fserver-modules\u002Flocker","3.server-modules\u002F6.locker",{"title":81,"path":82,"stem":83},"Organization Usage Guide","\u002Fserver-modules\u002Forganization","3.server-modules\u002F7.organization",{"title":85,"path":86,"stem":87},"Owned Storage Usage Guide","\u002Fserver-modules\u002Fowned-storage","3.server-modules\u002F8.owned-storage",{"title":89,"path":90,"stem":91},"Phone Usage Guide","\u002Fserver-modules\u002Fphone","3.server-modules\u002F9.phone","i-lucide-layers-3",{"title":94,"path":95,"stem":96,"children":97,"icon":144},"Client Addons","\u002Fclient-addons","4.client-addons\u002F0.index",[98,100,104,108,112,116,120,124,128,132,136,140],{"title":99,"path":95,"stem":96},"Client Usage Guide",{"title":101,"path":102,"stem":103},"Client Main Usage Guide","\u002Fclient-addons\u002Fmain","4.client-addons\u002F1.main",{"title":105,"path":106,"stem":107},"Client Phone Usage Guide","\u002Fclient-addons\u002Fphone","4.client-addons\u002F10.phone",{"title":109,"path":110,"stem":111},"Client Store Usage Guide","\u002Fclient-addons\u002Fstore","4.client-addons\u002F11.store",{"title":113,"path":114,"stem":115},"Client Common Usage Guide","\u002Fclient-addons\u002Fcommon","4.client-addons\u002F2.common",{"title":117,"path":118,"stem":119},"Client Actor Usage Guide","\u002Fclient-addons\u002Factor","4.client-addons\u002F3.actor",{"title":121,"path":122,"stem":123},"Client Bank Usage Guide","\u002Fclient-addons\u002Fbank","4.client-addons\u002F4.bank",{"title":125,"path":126,"stem":127},"Client CAD Usage Guide","\u002Fclient-addons\u002Fcad","4.client-addons\u002F5.cad",{"title":129,"path":130,"stem":131},"Client Garage Usage Guide","\u002Fclient-addons\u002Fgarage","4.client-addons\u002F6.garage",{"title":133,"path":134,"stem":135},"Client Locker Usage Guide","\u002Fclient-addons\u002Flocker","4.client-addons\u002F7.locker",{"title":137,"path":138,"stem":139},"Client Notifications Usage Guide","\u002Fclient-addons\u002Fnotifications","4.client-addons\u002F8.notifications",{"title":141,"path":142,"stem":143},"Client Organization Usage Guide","\u002Fclient-addons\u002Forganization","4.client-addons\u002F9.organization","i-lucide-monitor-smartphone",{"id":146,"title":11,"body":147,"description":157,"extension":466,"links":467,"meta":468,"navigation":469,"path":12,"seo":470,"stem":13,"__hash__":471},"docs\u002F1.getting-started\u002F1.architecture.md",{"type":148,"value":149,"toc":453},"minimark",[150,154,158,163,174,185,189,193,200,204,219,223,233,236,252,256,263,289,293,304,311,315,322,325,331,334,338,341,344,358,361,367,371,378,426,432,435,449],[151,152,11],"h1",{"id":153},"framework-architecture",[155,156,157],"p",{},"Forge is organized around domain modules. A domain usually has SQF addon\nentry points, Rust models, repository traits, service logic, extension command\nhandlers, and optional browser UI.",[159,160,162],"h2",{"id":161},"runtime-flow","Runtime Flow",[164,165,171],"pre",{"className":166,"code":168,"language":169,"meta":170},[167],"language-text","Arma client UI or SQF action\n -> client addon bridge\n -> server addon function\n -> forge_server callExtension command\n -> extension command group\n -> forge-services domain service\n -> forge-repositories trait\n -> SurrealDB repository implementation\n -> SurrealDB\n","text","",[172,173,168],"code",{"__ignoreMap":170},[155,175,176,177,180,181,184],{},"For small payloads, server SQF calls ",[172,178,179],{},"forge_server"," directly through the\nextension bridge. For large payloads, ",[172,182,183],{},"arma\u002Fserver\u002Faddons\u002Fextension"," stages\nrequest and response chunks through the extension transport module.",[159,186,188],{"id":187},"main-layers","Main Layers",[190,191,94],"h3",{"id":192},"client-addons",[155,194,195,196,199],{},"Client addons live under ",[172,197,198],{},"arma\u002Fclient\u002Faddons",". They own local player UX,\nkeybinds, browser UI dialogs, and UI-to-SQF event handling. When a client needs\ndurable or authoritative state, it routes work to the matching server addon\ninstead of touching persistence directly.",[190,201,203],{"id":202},"server-addons","Server Addons",[155,205,206,207,210,211,214,215,218],{},"Server addons live under ",[172,208,209],{},"arma\u002Fserver\u002Faddons",". They own server-side SQF\ninitialization, game-object integration, validation near the Arma runtime, and\ncalls into the Rust extension. The ",[172,212,213],{},"extension"," addon is the shared bridge for\n",[172,216,217],{},"callExtension"," and transport handling.",[190,220,222],{"id":221},"rust-extension","Rust Extension",[155,224,225,226,229,230,232],{},"The server extension lives under ",[172,227,228],{},"arma\u002Fserver\u002Fextension",". It registers the\n",[172,231,179],{}," command groups, loads configuration, initializes SurrealDB, and\nmaps SQF command inputs into service calls.",[155,234,235],{},"The extension should stay thin:",[237,238,239,243,246,249],"ul",{},[240,241,242],"li",{},"Parse and validate command arguments that arrive from SQF.",[240,244,245],{},"Resolve Arma-specific context such as player UID when required.",[240,247,248],{},"Call the matching service.",[240,250,251],{},"Serialize the service result back to JSON or a simple string.",[190,253,255],{"id":254},"shared-rust-crates","Shared Rust Crates",[155,257,258,259,262],{},"The ",[172,260,261],{},"lib"," workspace contains reusable Rust crates:",[237,264,265,271,277,283],{},[240,266,267,270],{},[172,268,269],{},"forge-models",": shared domain structs and serialization rules.",[240,272,273,276],{},[172,274,275],{},"forge-repositories",": storage-agnostic repository traits and in-memory\nimplementations used by tests and hot-state services.",[240,278,279,282],{},[172,280,281],{},"forge-services",": domain behavior, validation, and mutation workflows.",[240,284,285,288],{},[172,286,287],{},"forge-shared",": cross-crate helpers.",[190,290,292],{"id":291},"persistence","Persistence",[155,294,295,296,299,300,303],{},"Durable storage is SurrealDB. Schema modules live under\n",[172,297,298],{},"arma\u002Fserver\u002Fextension\u002Fsrc\u002Fschema",", and concrete SurrealDB repository\nimplementations live under ",[172,301,302],{},"arma\u002Fserver\u002Fextension\u002Fsrc\u002Fstorage",".",[155,305,306,307,310],{},"Repository traits stay in ",[172,308,309],{},"lib\u002Frepositories"," so service logic remains testable\nwithout a database.",[159,312,314],{"id":313},"hot-state","Hot State",[155,316,317,318,321],{},"Several domains have ",[172,319,320],{},"hot"," command groups. Hot state keeps a runtime copy of\nfrequently accessed data in memory, then saves it back to durable storage when\nrequested. This is useful for player state that changes often during a session.",[155,323,324],{},"Typical hot-state flow:",[164,326,329],{"className":327,"code":328,"language":169,"meta":170},[167],"actor:hot:init\nactor:hot:get\nactor:hot:override\nactor:hot:save\nactor:hot:remove\n",[172,330,328],{"__ignoreMap":170},[155,332,333],{},"Use hot state for session workflows. Use normal domain commands for direct\ndurable CRUD operations.",[159,335,337],{"id":336},"transport-layer","Transport Layer",[155,339,340],{},"The transport layer exists because Arma extension calls have practical payload\nsize limits. It provides chunked request and response handling while still\nrouting to the same domain command groups.",[155,342,343],{},"Common direct command:",[164,345,349],{"className":346,"code":347,"language":348,"meta":170,"style":170},"language-sqf shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"forge_server\" callExtension [\"status\", []];\n","sqf",[172,350,351],{"__ignoreMap":170},[352,353,356],"span",{"class":354,"line":355},"line",1,[352,357,347],{},[155,359,360],{},"Common transport path:",[164,362,365],{"className":363,"code":364,"language":169,"meta":170},[167],"server addon fnc_extCall\n -> transport:request:append\n -> transport:invoke_stored\n -> transport:response:get\n",[172,366,364],{"__ignoreMap":170},[159,368,370],{"id":369},"configuration","Configuration",[155,372,373,374,377],{},"The server extension reads ",[172,375,376],{},"config.toml"," next to the extension DLL. The current\npersistence section is:",[164,379,383],{"className":380,"code":381,"language":382,"meta":170,"style":170},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[surreal]\nendpoint = \"127.0.0.1:8000\"\nnamespace = \"forge\"\ndatabase = \"main\"\nusername = \"root\"\npassword = \"root\"\nconnect_timeout_ms = 5000\n","toml",[172,384,385,390,396,402,408,414,420],{"__ignoreMap":170},[352,386,387],{"class":354,"line":355},[352,388,389],{},"[surreal]\n",[352,391,393],{"class":354,"line":392},2,[352,394,395],{},"endpoint = \"127.0.0.1:8000\"\n",[352,397,399],{"class":354,"line":398},3,[352,400,401],{},"namespace = \"forge\"\n",[352,403,405],{"class":354,"line":404},4,[352,406,407],{},"database = \"main\"\n",[352,409,411],{"class":354,"line":410},5,[352,412,413],{},"username = \"root\"\n",[352,415,417],{"class":354,"line":416},6,[352,418,419],{},"password = \"root\"\n",[352,421,423],{"class":354,"line":422},7,[352,424,425],{},"connect_timeout_ms = 5000\n",[155,427,428,429,303],{},"For install links and role-based setup guidance, see\n",[430,431,23],"a",{"href":24},[155,433,434],{},"Check persistence readiness before issuing commands that require storage:",[164,436,438],{"className":346,"code":437,"language":348,"meta":170,"style":170},"\"forge_server\" callExtension [\"status\", []];\n\"forge_server\" callExtension [\"surreal:status\", []];\n",[172,439,440,444],{"__ignoreMap":170},[352,441,442],{"class":354,"line":355},[352,443,347],{},[352,445,446],{"class":354,"line":392},[352,447,448],{},"\"forge_server\" callExtension [\"surreal:status\", []];\n",[450,451,452],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":170,"searchDepth":392,"depth":392,"links":454},[455,456,463,464,465],{"id":161,"depth":392,"text":162},{"id":187,"depth":392,"text":188,"children":457},[458,459,460,461,462],{"id":192,"depth":398,"text":94},{"id":202,"depth":398,"text":203},{"id":221,"depth":398,"text":222},{"id":254,"depth":398,"text":255},{"id":291,"depth":398,"text":292},{"id":313,"depth":392,"text":314},{"id":336,"depth":392,"text":337},{"id":369,"depth":392,"text":370},"md",null,{},true,{"title":11,"description":157},"iMv3ZlJLneWaY-rT4sboHwZgTUNknan2htKsPAMBaw0",[473,475],{"title":5,"path":6,"stem":7,"description":474,"children":-1},"Use this section as the main entry point for the Forge framework.",{"title":15,"path":16,"stem":17,"description":476,"children":-1},"This reference lists the main Forge modules and where each layer lives.",1776806627742]