From e774ef0794bbace84472518171d6355ebebd5e59 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Sat, 11 Apr 2026 13:47:59 +0800 Subject: [PATCH] docs: clarify web console billing boundaries --- docs/architecture/web-console/overview.md | 9 ++++++++- next-env.d.ts | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/architecture/web-console/overview.md b/docs/architecture/web-console/overview.md index d726fd4..3e21f42 100644 --- a/docs/architecture/web-console/overview.md +++ b/docs/architecture/web-console/overview.md @@ -2,7 +2,7 @@ ## Scope -`console.svc.plus` is the browser-facing control plane. It is a Next.js App Router application that combines public pages, docs browsing, account/admin panels, and a BFF layer that forwards requests to downstream services. +`console.svc.plus` is the browser-facing control plane. It is a Next.js App Router application that combines public pages, docs browsing, account/admin panels, and a BFF layer that forwards requests to downstream services. It never reads PostgreSQL or Prometheus directly for billing or usage. ## Architecture @@ -30,7 +30,9 @@ flowchart TB Accounts["accounts.svc.plus"] Rag["rag-server.svc.plus"] DocsSvc["docs.svc.plus"] + Grafana["observability.svc.plus / Grafana"] External["Other upstream services"] + Subscription["/panel/subscription\nUsage / billing panel"] AuthAPI --> Accounts AdminAPI --> Accounts @@ -39,6 +41,8 @@ flowchart TB UtilAPI --> DocsSvc UtilAPI --> External SandboxAPI --> Accounts + Subscription --> Accounts + Subscription -.-> Grafana ``` ## Frontend Routes @@ -79,11 +83,14 @@ flowchart TB ## Dependencies - `accounts.svc.plus` for identity, profile, sandbox, billing, and admin actions. +- `accounts.svc.plus` for authoritative usage and billing summaries sourced from PostgreSQL. - `rag-server.svc.plus` for RAG query and AskAI. - `docs.svc.plus` for docs content and navigation data. +- `observability.svc.plus` for Grafana dashboards and operational views only. - CDN / external providers for content, analytics, and integration checks. ## Notes - Route groups in parentheses, such as `(auth)`, are Next.js organizational folders and do not appear in the public URL. - The BFF layer is the main place where console-specific auth shaping, cookie management, and upstream proxying happen. +- The subscription panel displays usage and billing data from accounts only and treats Grafana as an embedded observability surface, not a billing source. diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.