Skip to content

WattDee Platform Admin & Central Operations Manual ​

Internal bilingual VitePress documentation, LLM endpoints (/llms.txt, /llms-full.txt), and platform-scoped MCP service for WattDee Platform Administrators (SUPER_ADMIN) and Central Operations (Platform SERVICE).

  • Production URL: https://admin-docs.wattdee.com
  • Cloudflare Pages Project: amr-admin-manual ([email protected]'s Account, account ID 01dc260d162e584b4ed7a7128dcbbdc2)
  • GitHub Repository: https://github.com/unwraps/wattdee-admin-docs
  • Search Indexing: Disabled via meta[name="robots"] and X-Robots-Tag: noindex, nofollow in public/_headers.

Local Development ​

sh
bun install --frozen-lockfile
bun run dev           # VitePress dev server on http://localhost:4174
bun run build         # Outputs .vitepress/dist + llms*.txt + mcp-bundle.json
bun test tests        # Runs admin manual, policy parity, screenshot, and MCP tests
bun run mcp           # Starts stdio admin MCP server

Cloudflare Pages Configuration & Deployment ​

  • Production branch: main
  • Build command: bun run build
  • Build output directory: .vitepress/dist
  • Pages Function: functions/api/mcp.ts serves POST /api/mcp with full platform (ADMIN 33 capabilities, SERVICE 9 capabilities) as well as developer and customer policy visibility.
  • Custom domain: admin-docs.wattdee.com (bound under Workers & Pages -> amr-admin-manual -> Custom domains with DNS CNAME pointing to amr-admin-manual.pages.dev).

Direct Upload (Wrangler) ​

sh
bun run deploy

Automated Git Deployment ​

  1. GitHub Actions (.github/workflows/deploy.yml): Automatically runs bun install --frozen-lockfile, bun run build, bun test tests, and publishes to amr-admin-manual on every push to main once the repository secret CLOUDFLARE_API_TOKEN is configured with Cloudflare Pages: Edit permission for account 01dc260d162e584b4ed7a7128dcbbdc2.
  2. Cloudflare Pages Native Git Integration: Connect unwraps/wattdee-admin-docs in Workers & Pages -> Create application -> Connect to Git (or replace the Direct Upload project with a Git-connected Pages project of the same build settings: production branch main, build command bun run build, output .vitepress/dist), and add a Cloudflare Access policy for internal operator emails if restricting access.

Authorization Policy Snapshot ​

policy/policy.ts is a snapshot of backend-api/src/auth/policy.ts from unwraps/AMR-weblayer (commit 8fedbdc). Verify alignment against an AMR checkout with:

sh
bun run check:policy /path/to/AMR/backend-api/src/auth/policy.ts

Copy the updated file into policy/policy.ts, update the guides if needed, rebuild, test, and push to main.

WattDee Platform Admin & Central Operations Manual