Skip to main content

apps/web/README.md

Imported Content

Anchor Web

Next.js App Router frontend for MSP operator and client portal experiences.

The dashboard fetches live data from gateway endpoints using:

  • API_BASE_URL / NEXT_PUBLIC_API_BASE_URL
  • URL query workspaceId=<uuid> (preferred; auto-resolved if omitted)
  • optional ANCHOR_WORKSPACE_ID for local dev convenience
  • optional ANCHOR_OPERATOR_JWT
  • optional ANCHOR_REQUIRE_OPERATOR_JWT (defaults to required in production)
  • optional ANCHOR_ALLOW_WILDCARD_WORKSPACE_IDS (defaults to disallowed in production)

The admin control plane UI is available at /admin/settings and proxies to:

  • web proxy routes under /api/admin/*
  • gateway routes GET/PUT /api/v1/platform/settings
  • gateway routes GET/PUT /api/v1/workspace/settings
  • gateway routes GET/POST /api/v1/platform/secrets/*
  • gateway routes GET/POST /api/v1/workspace/secrets/*

Workspace context:

  • Runtime pages auto-resolve workspace from this order:
    1. workspaceId query parameter
    2. first concrete workspace from ANCHOR_OPERATOR_JWT.workspaceIds
  • Header-level workspace switcher updates the URL query across console/ops/portal/admin pages.
  • Operator session sign-in is available at /auth/operator:
    • paste an operator JWT once
    • web stores it in anchor_operator_session (httpOnly cookie)
    • subsequent server-to-server gateway calls use this cookie token first, then env fallback.

Run locally

pnpm --filter @anchor/web dev

Status compatibility endpoint:

  • GET /.well-known/engine-status