diff --git a/.github/nanoforge.json b/.github/nanoforge.json index d17f5a5..450e0c2 100644 --- a/.github/nanoforge.json +++ b/.github/nanoforge.json @@ -13,5 +13,5 @@ "commitFormat": "chore: release @nanoforge-dev/loader@{version}" } ], - "docs": { "category": "cli" } + "docs": { "category": "loader" } } diff --git a/docs/docs/loader/2-client.mdx b/docs/docs/client.mdx similarity index 98% rename from docs/docs/loader/2-client.mdx rename to docs/docs/client.mdx index 5443bdb..1dca4f6 100644 --- a/docs/docs/loader/2-client.mdx +++ b/docs/docs/client.mdx @@ -3,8 +3,6 @@ title: Client description: Bun HTTP server that serves the browser-side of a NanoForge project --- -import { Tooltip } from "mintlify/components"; - ## Overview `loader-client` is a Bun HTTP server that bridges the browser and the compiled game client. It serves the `loader-website` frontend, exposes the game file manifest, delivers the compiled game assets, and forwards environment variables to the browser. It is the single entry point for everything the player's browser contacts. diff --git a/docs/docs/navigation.json b/docs/docs/navigation.json new file mode 100644 index 0000000..35916b4 --- /dev/null +++ b/docs/docs/navigation.json @@ -0,0 +1 @@ +["overview", "client", "website", "server"] diff --git a/docs/docs/loader/1-overview.mdx b/docs/docs/overview.mdx similarity index 91% rename from docs/docs/loader/1-overview.mdx rename to docs/docs/overview.mdx index 0c03bab..bbe2794 100644 --- a/docs/docs/loader/1-overview.mdx +++ b/docs/docs/overview.mdx @@ -3,8 +3,6 @@ title: Loader description: Overview of the @nanoforge-dev/loader packages --- -import { Card, CardGroup } from "mintlify/components"; - ## What is the Loader? The NanoForge Loader is the runtime layer that starts a NanoForge project. It is invoked by the [NanoForge CLI](https://github.com/NanoForge-dev/CLI) when you run `nf start`, and handles both sides of a game simultaneously: the **client side** delivered to the browser and the **server side** running in Bun. @@ -40,15 +38,15 @@ npx loader-server --dir .nanoforge/server ## Packages - + Bun HTTP server that serves the loader website and the compiled client game files. Exposes the manifest, environment variables, and game assets. Supports HTTPS and hot-reload. - + Browser application bundled as static assets. Displays the loading screen, downloads and caches game files via the browser Origin Private File System, then bootstraps the game. - + Bun process that runs the server-side game code in an isolated worker process. Supports live-reload by restarting the worker on file changes. diff --git a/docs/docs/loader/4-server.mdx b/docs/docs/server.mdx similarity index 98% rename from docs/docs/loader/4-server.mdx rename to docs/docs/server.mdx index a9af398..55320f1 100644 --- a/docs/docs/loader/4-server.mdx +++ b/docs/docs/server.mdx @@ -3,8 +3,6 @@ title: Server description: Bun process that runs the server-side game code of a NanoForge project --- -import { Tooltip } from "mintlify/components"; - ## Overview `loader-server` is a Bun process that runs the compiled server-side game code. It scans a built game directory, locates `/main.js`, then forks an isolated child process — the worker — that loads the game and calls its exported `main()` function. The parent process manages the worker lifecycle and restarts it when files change in watch mode. diff --git a/docs/docs/loader/3-website.mdx b/docs/docs/website.mdx similarity index 98% rename from docs/docs/loader/3-website.mdx rename to docs/docs/website.mdx index 43a4d3b..8c66062 100644 --- a/docs/docs/loader/3-website.mdx +++ b/docs/docs/website.mdx @@ -3,8 +3,6 @@ title: Website description: Browser application that loads and bootstraps a NanoForge game --- -import { Tooltip } from "mintlify/components"; - ## Overview `loader-website` is a browser application (HTML + TypeScript) bundled as static assets and served by `loader-client`. It is the loading screen the player sees before the game starts. It fetches the game's file list from the server, downloads and caches each file locally in the browser, then dynamically imports the game entry point and starts it.