Merge Docusaurus site: all content under docs/, align with gregFramework split layout

- Move markdown and wiki-import tree into docs/; keep app shell at repo root
- Point docusaurus docs path to docs/; edit links to mleem97/gregWiki
- Sync and i18n scripts use gregWiki root and ../.wiki under gregFramework
- Sidebars: workspace layout from root docs ids; plugins under mods/extensions
- Fix redirects, module catalog URLs, release note paths, and wiki-import category keys
- Update repo inventory for split repos; Dockerfile for single-repo context

Made-with: Cursor
This commit is contained in:
Marvin
2026-04-09 23:39:32 +02:00
parent 33636fde00
commit e2839584f4
320 changed files with 38803 additions and 97 deletions

View File

@@ -0,0 +1,70 @@
---
id: fmf-hook-naming
title: FMF hook and event naming
slug: /reference/fmf-hook-naming
description: Canonical naming for hooks, events, and cross-language documentation stubs.
---
# FMF hook and event naming
## Target format
All **new** public hook and event identifiers should follow:
```text
FMF.<Domain>.<EventOrHook>
```
- **`FMF`** — Fixed prefix (Frika Mod Framework).
- **`<Domain>`** — Uppercase domain from the [approved domain list](#approved-domain-segments). Describes *where* the signal belongs in the game (player, rack, server, economy, …).
- **`<EventOrHook>`** — `PascalCase` segment(s), usually `OnSomething` for events or a verb phrase for commands.
Examples (illustrative): `FMF.RACK.CableSpinnerColorResolved`, `FMF.PLAYER.InputPoll`, `FMF.NETWORK.Cable.OnConnected`.
## Approved domain segments
Domains are **closed by default**. Add a new domain only via changelog + maintainer review.
| Domain | Scope |
|--------|--------|
| `GAMEPLAY` | Rules, scoring, simulation beats not covered elsewhere |
| `PLAYER` | Local player input, camera, UI focus |
| `EMPLOYEE` | NPC staff, hiring, schedules |
| `CUSTOMER` | Contracts, SLA, satisfaction |
| `SERVER` | In-game server racks, VMs, power |
| `RACK` | Physical rack placement, mounting |
| `NETWORK` | Cables, switches, traffic |
| `STORE` | Shop cart, checkout |
| `WORLD` | Rooms, expansion, walls |
| `UI` | HUD overlays, menus (when not `PLAYER`) |
| `SAVE` | Save/load lifecycle |
| `FRAMEWORK` | Loader, bridge, diagnostics |
## Legacy: `FFM.*` strings in code
The runtime currently maps numeric event IDs to **`FFM.*`** string constants in [`FrikaMF/HookNames.cs`](https://github.com/mleem97/gregFramework/blob/master/FrikaMF/HookNames.cs) (e.g. `FFM.Economy.Balance.OnChanged`). That is **legacy naming** (four segments after `FFM`).
**Policy**
- New documentation and greenfield APIs should use **`FMF.<Domain>.*`** as above.
- When touching `HookNames.cs`, prefer aligning new entries to **`FMF.*`**; otherwise keep **`FFM.*`** until a planned major version bump documents a rename map.
- The [generated hook catalog](./fmf-hooks-catalog.md) lists **what the code emits today** (including `FFM.*`).
## Cross-language stubs (documentation)
For each canonical hook, the wiki may add **non-normative** snippets:
| Language | Convention |
|----------|------------|
| C# | `FMF.Domain.OnSomething.Subscribe(...)` or string literal |
| Lua | `FMF.Domain.OnSomething:subscribe(...)` |
| Rust | `fmf::domain::on_something::subscribe(...)` |
| Python | `fmf.domain.on_something.subscribe(...)` |
| TypeScript | `FMF.Domain.OnSomething.subscribe(...)` |
Bindings are **not** auto-generated for all languages; stubs are for contributor clarity.
## Related
- [FMF hooks catalog](./fmf-hooks-catalog.md) (generated)
- [Legacy wiki: HOOK-NAMING-CONVENTION](../wiki-import/HOOK-NAMING-CONVENTION) (extended examples)

View File

@@ -0,0 +1,109 @@
---
id: fmf-hooks-catalog
title: FMF hooks catalog
slug: /reference/fmf-hooks-catalog
description: Auto-generated catalog of hook strings and event id mappings from FrikaMF sources.
---
<!-- AUTO-GENERATED by tools/Generate-FmfHookCatalog.ps1 - DO NOT EDIT BY HAND -->
# FMF hooks catalog
This page is **generated** from `framework/FrikaMF/HookNames.cs` and `framework/FrikaMF/EventIds.cs`.
**Generated:** 2026-04-06 14:26:09 UTC
## Hook string constants
| C# field | Hook string |
|----------|-------------|
| ``CustomerContractOnSigned`` | ``FFM.Customer.Contract.OnSigned`` |
| ``CustomerReputationOnChanged`` | ``FFM.Customer.Reputation.OnChanged`` |
| ``CustomerSlaOnBreached`` | ``FFM.Customer.SLA.OnBreached`` |
| ``CustomerSlaOnRestored`` | ``FFM.Customer.SLA.OnRestored`` |
| ``EconomyBalanceOnChanged`` | ``FFM.Economy.Balance.OnChanged`` |
| ``EmployeesStaffOnHiredCustom`` | ``FFM.Employees.Staff.OnHired`` |
| ``EmployeesStaffOnTerminatedCustom`` | ``FFM.Employees.Staff.OnTerminated`` |
| ``FrameworkHooksOnBridgeInstalled`` | ``FFM.Framework.Hooks.OnBridgeInstalled`` |
| ``FrameworkHooksOnBridgeTriggered`` | ``FFM.Framework.Hooks.OnBridgeTriggered`` |
| ``GameLoadOnCompleted`` | ``FFM.Game.Load.OnCompleted`` |
| ``GameSaveOnCompleted`` | ``FFM.Game.Save.OnCompleted`` |
| ``GameSaveOnRequested`` | ``FFM.Game.Save.OnRequested`` |
| ``GameTimeOnDayChanged`` | ``FFM.Game.Time.OnDayChanged`` |
| ``GameTimeOnMonthChanged`` | ``FFM.Game.Time.OnMonthChanged`` |
| ``GameXpOnGained`` | ``FFM.Game.XP.OnGained`` |
| ``NetworkCableOnConnected`` | ``FFM.Network.Cable.OnConnected`` |
| ``NetworkCableOnConnectedSuppress`` | ``FFM.Network.Cable.OnConnected.Suppress`` |
| ``NetworkCableOnDisconnected`` | ``FFM.Network.Cable.OnDisconnected`` |
| ``NetworkCableOnDisconnectedSuppress`` | ``FFM.Network.Cable.OnDisconnected.Suppress`` |
| ``NetworkCableOnLinkDown`` | ``FFM.Network.Cable.OnLinkDown`` |
| ``NetworkCableOnLinkUp`` | ``FFM.Network.Cable.OnLinkUp`` |
| ``NetworkTrafficOnThresholdExceeded`` | ``FFM.Network.Traffic.OnThresholdExceeded`` |
| ``ObjectsDeviceOnDegraded`` | ``FFM.Objects.Device.OnDegraded`` |
| ``ObjectsDeviceOnEOL`` | ``FFM.Objects.Device.OnEOL`` |
| ``ObjectsDeviceOnPoweredOff`` | ``FFM.Objects.Device.OnPoweredOff`` |
| ``ObjectsDeviceOnPoweredOn`` | ``FFM.Objects.Device.OnPoweredOn`` |
| ``ObjectsDeviceOnRepaired`` | ``FFM.Objects.Device.OnRepaired`` |
| ``ObjectsRackOnDevicePlaced`` | ``FFM.Objects.Rack.OnDevicePlaced`` |
| ``ObjectsRackOnRemoved`` | ``FFM.Objects.Rack.OnRemoved`` |
| ``ObjectsServerOnClientAssigned`` | ``FFM.Objects.Server.OnClientAssigned`` |
| ``ObjectsServerOnClientUnassigned`` | ``FFM.Objects.Server.OnClientUnassigned`` |
| ``StoreCartOnCheckedOutCleared`` | ``FFM.Store.Cart.OnCheckedOut`` |
| ``StoreCartOnItemAdded`` | ``FFM.Store.Cart.OnItemAdded`` |
| ``StoreCartOnItemRemoved`` | ``FFM.Store.Cart.OnItemRemoved`` |
| ``WorldRoomOnExpanded`` | ``FFM.World.Room.OnExpanded`` |
## Event id to hook mapping
| Event id (uint) | EventIds name | Resolves to field | Hook string |
|-----------------|---------------|---------------------|-------------|
| 213 | `CableCleared` | `StoreCartOnCheckedOutCleared` | `FFM.Store.Cart.OnCheckedOut` |
| 204 | `CableConnected` | `NetworkCableOnConnected` | `FFM.Network.Cable.OnConnected` |
| 211 | `CableCreated` | `NetworkCableOnConnected` | `FFM.Network.Cable.OnConnected` |
| 205 | `CableDisconnected` | `NetworkCableOnDisconnected` | `FFM.Network.Cable.OnDisconnected` |
| 212 | `CableRemoved` | `NetworkCableOnDisconnected` | `FFM.Network.Cable.OnDisconnected` |
| 215 | `CableSfpInserted` | `NetworkCableOnConnected` | `FFM.Network.Cable.OnConnected` |
| 216 | `CableSfpRemoved` | `NetworkCableOnDisconnected` | `FFM.Network.Cable.OnDisconnected` |
| 214 | `CableSpeedChanged` | `NetworkTrafficOnThresholdExceeded` | `FFM.Network.Traffic.OnThresholdExceeded` |
| 1001 | `CustomEmployeeFired` | `EmployeesStaffOnTerminatedCustom` | `FFM.Employees.Staff.OnTerminated` |
| 1000 | `CustomEmployeeHired` | `EmployeesStaffOnHiredCustom` | `FFM.Employees.Staff.OnHired` |
| 400 | `CustomerAccepted` | `CustomerContractOnSigned` | `FFM.Customer.Contract.OnSigned` |
| 401 | `CustomerSatisfied` | `CustomerSlaOnRestored` | `FFM.Customer.SLA.OnRestored` |
| 402 | `CustomerUnsatisfied` | `CustomerSlaOnBreached` | `FFM.Customer.SLA.OnBreached` |
| 300 | `DayEnded` | `GameTimeOnDayChanged` | `FFM.Game.Time.OnDayChanged` |
| 601 | `EmployeeFired` | `EmployeesStaffOnTerminated` | `FFM.Employees.Staff.OnTerminated` |
| 600 | `EmployeeHired` | `EmployeesStaffOnHired` | `FFM.Employees.Staff.OnHired` |
| 702 | `GameAutoSaved` | `GameSaveOnRequested` | `FFM.Game.Save.OnRequested` |
| 701 | `GameLoaded` | `GameLoadOnCompleted` | `FFM.Game.Load.OnCompleted` |
| 700 | `GameSaved` | `GameSaveOnCompleted` | `FFM.Game.Save.OnCompleted` |
| 1100 | `HookBridgeInstalled` | `FrameworkHooksOnBridgeInstalled` | `FFM.Framework.Hooks.OnBridgeInstalled` |
| 1101 | `HookBridgeTriggered` | `FrameworkHooksOnBridgeTriggered` | `FFM.Framework.Hooks.OnBridgeTriggered` |
| 100 | `MoneyChanged` | `EconomyBalanceOnChanged` | `FFM.Economy.Balance.OnChanged` |
| 301 | `MonthEnded` | `GameTimeOnMonthChanged` | `FFM.Game.Time.OnMonthChanged` |
| 900 | `NetWatchDispatched` | `NetworkTrafficOnThresholdExceeded` | `FFM.Network.Traffic.OnThresholdExceeded` |
| 208 | `RackUnmounted` | `ObjectsRackOnRemoved` | `FFM.Objects.Rack.OnRemoved` |
| 102 | `ReputationChanged` | `CustomerReputationOnChanged` | `FFM.Customer.Reputation.OnChanged` |
| 207 | `ServerAppChanged` | `ObjectsServerOnClientUnassigned` | `FFM.Objects.Server.OnClientUnassigned` |
| 201 | `ServerBroken` | `ObjectsDeviceOnDegraded` | `FFM.Objects.Device.OnDegraded` |
| 206 | `ServerCustomerChanged` | `ObjectsServerOnClientAssigned` | `FFM.Objects.Server.OnClientAssigned` |
| 203 | `ServerInstalled` | `ObjectsRackOnDevicePlaced` | `FFM.Objects.Rack.OnDevicePlaced` |
| 200 | `ServerPowered` | `ObjectsDeviceOnPoweredOn` | `FFM.Objects.Device.OnPoweredOn` |
| 202 | `ServerRepaired` | `ObjectsDeviceOnRepaired` | `FFM.Objects.Device.OnRepaired` |
| 502 | `ShopCartCleared` | `StoreCartOnCheckedOutCleared` | `FFM.Store.Cart.OnCheckedOut` |
| 500 | `ShopCheckout` | `StoreCartOnCheckedOut` | `FFM.Store.Cart.OnCheckedOut` |
| 501 | `ShopItemAdded` | `StoreCartOnItemAdded` | `FFM.Store.Cart.OnItemAdded` |
| 503 | `ShopItemRemoved` | `StoreCartOnItemRemoved` | `FFM.Store.Cart.OnItemRemoved` |
| 209 | `SwitchBroken` | `NetworkCableOnLinkDown` | `FFM.Network.Cable.OnLinkDown` |
| 210 | `SwitchRepaired` | `NetworkCableOnLinkUp` | `FFM.Network.Cable.OnLinkUp` |
| 800 | `WallPurchased` | `WorldRoomOnExpanded` | `FFM.World.Room.OnExpanded` |
| 101 | `XPChanged` | `GameXpOnGained` | `FFM.Game.XP.OnGained` |
## Fallback
Unknown event ids resolve to ``FFM.Framework.Unknown.OnEvent`` in `HookNames.Resolve`.
## See also
- [FMF hook naming](./fmf-hook-naming.md)
- [EventIds source](https://github.com/mleem97/gregFramework/blob/master/framework/FrikaMF/EventIds.cs)
- [HookNames source](https://github.com/mleem97/gregFramework/blob/master/framework/FrikaMF/HookNames.cs)

View File

@@ -0,0 +1,69 @@
---
title: MCP server (LLM-friendly modding)
sidebar_label: MCP server
description: Model Context Protocol server bundled with the docs Docker image for assistants and IDEs.
---
# MCP server (FrikaMF modding)
The repository ships a **Model Context Protocol (MCP)** server (`mcp-server/`) that exposes:
- **Docs search & read** — Markdown under `docs/` (same source as Docusaurus).
- **Hook registry** — `fmf_hooks.json` (and the same registry path in the monorepo).
- **CONTRIBUTING** — conventions and workflow.
- **Repo layout** — static overview and a **`fmf_modding_context`** prompt for quick context.
Use it when you want an assistant (Cursor, Claude Code, or any MCP client) to **ground answers** in this repo instead of guessing APIs.
## Docker (single container)
The root `Dockerfile` builds **Docusaurus** into static files and runs **one Node process** that:
- Serves the wiki at **`http://<host>:3000/`** (static HTML).
- Exposes **Streamable HTTP MCP** at **`POST /mcp`** and **`GET /mcp`** (SSE), plus **`GET /health`**.
From the repo root:
```bash
docker compose up docs-mcp
```
Default mapping: **`http://localhost:3040`** (host) → container port **3000**.
- Docs: `http://localhost:3040/wiki/`
- Health: `http://localhost:3040/health`
- MCP: `http://localhost:3040/mcp` (client must speak MCP Streamable HTTP; session via `mcp-session-id` header).
:::note Security
Binding to `0.0.0.0` exposes the MCP endpoint on your network. Use only on trusted networks or behind a reverse proxy with authentication.
:::
## Local (stdio) for Cursor
From `mcp-server/` with the repo root as data (so `docs/`, `CONTRIBUTING.md`, and `FrikaModFramework/fmf_hooks.json` resolve):
```bash
cd mcp-server
node src/index.mjs --stdio --data-root ..
```
Point your MCP client at this command (stdio transport). Adjust `--data-root` if your layout differs.
## Tools (summary)
| Tool | Purpose |
|------|--------|
| `fmf_search_docs` | Substring search across `docs/**/*.md` |
| `fmf_read_doc` | Read one file by path under `docs/` |
| `fmf_list_doc_paths` | Discover Markdown paths |
| `fmf_hook_registry` | Raw `fmf_hooks.json` |
| `fmf_read_contributing` | `CONTRIBUTING.md` |
| `fmf_repo_layout` | Short monorepo overview |
## Related
- [Hook naming](./fmf-hook-naming.md)
- [Hooks catalog](./fmf-hooks-catalog.md)
- [Monorepo target layout](../contributors/monorepo-target-layout.md)

View File

@@ -0,0 +1,31 @@
---
id: mod-store-vision
title: Mod Store Vision (Secure Git-Based)
slug: /reference/mod-store-vision
---
## Vision
Build a Mod Store with Git-based submissions, automated malware scanning, and policy checks before mods are visible.
## Core principles
- All submissions are reviewable in Git.
- Every build artifact is reproducible from source.
- Security checks are mandatory before publish.
## Security pipeline (target)
1. Submit via pull request (manifest + source + checksums).
2. CI runs static checks and signature/metadata validation.
3. Virus scanning runs on produced artifacts.
4. Maintainer review and policy checks.
5. Publish approved metadata index consumed by launcher/site.
## Recommended metadata fields
- `modId`, `version`, `authors`
- `supportedGameVersions`
- `requiredFrameworkVersion`
- `sha256` for each downloadable artifact
- source URL and license

View File

@@ -0,0 +1,42 @@
---
id: release-channels
title: Release channels — Steam vs GitHub
slug: /reference/release-channels
description: Where to download stable builds, beta builds, and how this relates to the Steam Workshop.
---
# Release channels — Steam vs GitHub
This project uses **two complementary channels** for distributing mods and plugins. The wiki and [`/mods`](/mods) catalog are **not** a replacement for the Steam Workshop; they are an **overview**, documentation hub, and **second official source** for files that should not flood the Workshop.
## Steam Workshop (discovery & stable)
- **Game**: [Data Center on Steam](https://store.steampowered.com/app/4170200/) (AppID `4170200`).
- **Workshop**: [Browse items](https://steamcommunity.com/workshop/browse/?appid=4170200) — best for **player discovery**, ratings, and stable “subscribe and play” flows.
- Use Workshop for **production-ready** releases you want every player to see.
## GitHub Releases (beta and alternate downloads)
- **Organization**: [github.com/mleem97/gregFramework](https://github.com/mleem97/gregFramework) (see repo for actual org if renamed).
- **Stable**: tagged releases — same DLLs you may also ship via Workshop.
- **Pre-release / beta**: GitHub **pre-releases** — ideal for testers without publishing unfinished items to Workshop.
- **Why**: avoids “polluting” the Workshop with experimental builds while still offering a **single official URL** for power users and CI.
## This documentation site
| Need | Where |
|------|--------|
| Wiki entry for a module | `/wiki/mods/...` |
| Download link (when configured) | GitHub Releases asset or redirect from [`moduleCatalog`](https://github.com/mleem97/gregFramework/blob/master/wiki/src/data/moduleCatalog.ts) |
| Catalog overview | [`/mods`](/mods) |
## Maintainer checklist
- [ ] Stable: tag + Release notes + optional Workshop update.
- [ ] Beta: pre-release + link from module wiki page + `releaseReady: false` in catalog until promoted.
- [ ] Do not commit large binaries to `main` without a documented policy.
## Related
- [Repo inventory](../contributors/repo-inventory.md)
- [Mod store vision](./mod-store-vision.md)

View File

@@ -0,0 +1,26 @@
---
id: wiki-mapping
title: Wiki to Docusaurus Mapping
slug: /reference/wiki-mapping
---
## Why this mapping exists
The repository currently stores canonical docs in `.wiki/`. This page defines how those pages are grouped in Docusaurus.
## Audience buckets
- **Newbies**: install/update/troubleshooting, legal basics
- **Intermediates**: hooking, bridge usage, mod config, workflows
- **Pros**: architecture, runtime internals, release system, roadmap
## Suggested migration order
1. Start with onboarding pages (`Home`, End-User, Mod-Developer).
2. Migrate runtime references (`Architecture`, `FFI-Bridge-Reference`, `Web-UI-Bridge`).
3. Migrate governance pages (`Contributors`, Roadmap, Tasklist).
4. Keep bilingual mirrors where needed.
## Sync strategy
Use `npm run wiki:sync` to copy `.wiki/*.md` into a generated docs area for review-based migration.