# Project Mycelium Docs Documentation site for **Project Mycelium**, built with [Docusaurus 3](https://docusaurus.io/). This site consolidates documentation for: - **Network** – Mycelium Network overlay and connectivity. - **Cloud** – Mycelium Cloud and Kubernetes clusters on decentralized Mycelium infrastructure. - **VDC** – Virtual Data Centers on decentralized infrastructure. - **AI Agent Framework** – Preview docs for the upcoming Mycelium Agent Framework. - **Hosters** – Rebranded farming docs for operating nodes and earning SPORE. The site is designed to match the feel of the main `www.projectmycelium.com` site while: - Defaulting to **light mode**. - Avoiding dark background sections in light mode. - Supporting **dark mode toggle** for users who prefer it. --- ## Tech Stack - **Framework:** Docusaurus 3 (`@docusaurus/preset-classic`). - **Language:** TypeScript/JS config + Markdown docs. - **Styling:** Docusaurus theme + custom CSS in `src/css/custom.css`. - **Diagrams:** [Mermaid](https://mermaid.js.org/) enabled via `@docusaurus/theme-mermaid`. - **Node:** `>=18` (see `package.json` engines field). --- ## Getting Started ### Prerequisites - Node.js **18+** (LTS recommended). - npm (comes with Node). ### Install Dependencies From the project root (`docs_projectmycelium`): ```bash npm install ``` ### Run the Dev Server ```bash npm start ``` Then open: - The main sections are available at: - `/` – Overview - `/network` – Network docs - `/cloud` – Cloud docs - `/vdc` – Virtual Data Centers - `/ai-agent-framework` – Agent Framework - `/hosters` – Hosters (farming) docs ### Build the Site ```bash npm run build ``` This creates a production build in the `build/` directory. ### Serve the Production Build (Local Test) ```bash npm run serve ``` Docusaurus will serve the contents of `build/` so you can verify the production build locally. --- ## npm Scripts Defined in `package.json`: - `npm start` – Start local dev server (hot reload). - `npm run build` – Build static site into `build/`. - `npm run serve` – Serve the built site locally. - `npm run deploy` – Run Docusaurus deploy (GitHub Pages style; see below). - `npm run clear` – Clear Docusaurus caches. --- ## Project Structure ```text . ├─ docs/ │ ├─ overview-index.md # Overview / landing page │ ├─ network/ # Mycelium Network docs │ ├─ cloud/ # Mycelium Cloud docs │ ├─ vdc/ # Virtual Data Centers │ ├─ ai-agent-framework/ # Agent Framework (preview) │ └─ hosters/ # Hosters (farming) docs ├─ src/ │ └─ css/ │ └─ custom.css # Branding & theme overrides ├─ docusaurus.config.js # Main Docusaurus configuration ├─ sidebars.js # Sidebar / IA definition ├─ package.json # Dependencies & npm scripts └─ README.md # This file ``` Docs routing is configured with: - `routeBasePath: '/'` in `docusaurus.config.js`. - Explicit `slug` frontmatter on top‑level section overviews. --- ## Deployment Notes The site is intended to be hosted as a **static site** on your own server (for example a Hetzner VM with a public IPv4 address) behind a standard web server such as Nginx, Caddy, or Apache. The Docusaurus config assumes: - **Site URL:** `https://docs.projectmycelium.com` - **Base URL:** `/` (root of that domain) ### Deployment Workflow (Example with Hetzner + Nginx) 1. **Build the site** on your local machine or CI: ```bash npm run build ``` This produces static assets under `build/`. 2. **Sync the build output** to your server's web root (example path): ```bash rsync -avz build/ user@your-server-ip:/var/www/docs.projectmycelium.com/ ``` 3. **Configure Nginx** on the server, e.g. `/etc/nginx/sites-available/docs.projectmycelium.com`: ```nginx server { listen 80; server_name docs.projectmycelium.com; root /var/www/docs.projectmycelium.com; index index.html; location / { try_files $uri $uri/ /index.html; } } ``` 4. **Enable the site and reload Nginx**, and optionally configure HTTPS using Let's Encrypt (e.g. via `certbot` or your preferred ACME client). 5. **DNS:** Point `docs.projectmycelium.com` to your Hetzner server's public IPv4 address (A record). --- ## Contributing 1. Create a branch from the main docs branch. 2. Add or update Markdown files under `docs/`. 3. Keep slugs and sidebar entries consistent with the existing IA. 4. Run `npm run build` locally before opening a PR to catch broken links. --- ## License This project is licensed under the **Apache License 2.0**. Copyright © 2025 Project Mycelium See the [`LICENSE`](./LICENSE) file for the full license text.