@@ -47,8 +47,19 @@ React/Vite (SPA, German) → FastAPI (Python 3.12) → StackRox Central DB (read
4747| ` deploy/spoke/namespace-resolver-rbac.yaml ` | ClusterRole/Binding for namespace list permission |
4848| ` frontend/Containerfile.spoke ` | Spoke frontend image (nginx with API proxy to hub) |
4949| ` frontend/nginx.conf.spoke ` | Spoke nginx template (envsubst for HUB_API_URL, SPOKE_API_KEY) |
50+ | ` docs/ ` | MkDocs Material documentation site |
51+ | ` docs/stylesheets/extra.css ` | Custom docs theming for homepage/visual polish |
52+ | ` mkdocs.yml ` | Docs site config (Material theme features, markdown extensions, nav) |
5053| ` justfile ` | Dev workflow commands |
5154
55+ ## Documentation Stack
56+
57+ - Documentation is built with ** MkDocs + Material for MkDocs** .
58+ - ` mkdocs.yml ` enables modern Material features (` navigation.instant ` , ` search.share ` , ` content.action.* ` , etc.).
59+ - Custom docs styling is intentionally centralized in ` docs/stylesheets/extra.css ` .
60+ - Homepage layout uses Material card-grid/button patterns (` docs/index.md ` ) for predictable LLM-friendly regeneration.
61+ - Docs validation command: ` just docs-build ` (or ` uv run --with mkdocs-material mkdocs build ` ).
62+
5263## StackRox DB Query Pattern
5364
5465** Always use ` image_cves_v2 ` ** — not the multi-table join via ` image_cve_edges → image_cves → image_component_cve_edges ` . The ` image_cves_v2 ` view already joins CVE data with component and fixability info.
@@ -123,7 +134,7 @@ Dev environment uses local Postgres. Set `APP_DB_URL` and `STACKROX_DB_URL` or r
123134
124135** Header format:** ` X-Forwarded-Namespaces: ns1:cluster1,ns2:cluster2,... `
125136
126- The spoke proxy is responsible for querying K8s RBAC (SubjectAccessReview for ` get pods ` ) and populating this header.
137+ The spoke proxy is responsible for querying namespace annotations and populating this header.
127138
128139** ` CurrentUser ` carries:**
129140- ` id ` , ` username ` , ` email ` , ` role ` (persisted in DB)
@@ -161,7 +172,7 @@ Route → oauth-proxy → namespace-resolver → nginx →→ Route → FastAP
161172
162173** Auth flow (spoke proxy mode):**
1631741 . oauth-proxy handles OpenShift OAuth login, injects ` X-Forwarded-User/Email/Groups ` headers
164- 2 . namespace-resolver sidecar reads ` X-Forwarded-User ` , looks up K8s namespace annotations (` rhacs-manager.io/users ` ), sets ` X-Forwarded-Namespaces ` header
175+ 2 . namespace-resolver sidecar reads ` X-Forwarded-User ` , looks up namespace annotations (` rhacs-manager.io/users ` ), sets ` X-Forwarded-Namespaces ` header
1651763 . Spoke nginx serves SPA, proxies ` /api/* ` to hub route with ` X-Api-Key ` + forwarded headers
1661774 . Hub backend validates API key (` settings.spoke_api_keys ` ), reads identity + namespaces from headers
1671785 . ` sec_team_group ` in groups grants sec_team role
@@ -224,6 +235,9 @@ uv run pytest tests/
224235
225236# Frontend (TypeScript + Vite build must be clean):
226237npm run build
238+
239+ # Docs (MkDocs Material):
240+ just docs-build
227241```
228242
229- Always verify both before marking work done.
243+ Always verify backend, frontend, and docs build before marking work done.
0 commit comments