Web Frontend Implementation Guide
Use this skill together with /pma. /pma controls workflow, approval, and task tracking; this guide defines the implementation baseline after work is approved.
Keep this entry file lean. Load only the reference packs needed for the current task.
Scope
For PMA-managed SPA and internal-tool frontend projects using:
- React 19 + TypeScript + Vite 8
- TanStack Router for file-based type-safe routing
- TanStack Query for server state
- Zustand for UI-only client state
- shadcn/ui (base-nova style) with
@base-ui/react primitives and Tailwind CSS v4 — this is the only allowed UI ecosystem; Radix UI and other component libraries are forbidden (see references/baseline.md UI Library Policy)
Single-app layout is the default. Reach for a Bun monorepo only when the repo really hosts multiple apps or shared packages — a single SPA bolted onto a Rust or Go service does not need workspaces.
Not for SSR-first sites, content sites, or non-PMA projects.
Loading Order
- Always load
references/baseline.md first.
- Load
references/routing-and-ui.md when touching route structure, providers, theming, Tailwind, or shadcn/ui.
- Load
references/runtime-and-data.md when touching API integration, query state, i18n, Vite config, or the frontend-side dev script. For the full nsl protocol (registration patterns, --strip, NSL_PORT, fallback) load /pma references/dev-environment.md.
- Load
references/review.md when touching release checks, tests, accessibility, or security-sensitive UI behavior.
Quick Routing
- New app setup or repo restructuring (single-app vs monorepo) →
references/baseline.md
- Router, layouts, providers, entrypoint, shadcn, Tailwind, theme →
references/routing-and-ui.md
- runtime (HTTP client, query client, i18n, Vite config) →
references/runtime-and-data.md
- dev URL routing (nsl) →
references/runtime-and-data.md (full protocol → /pma references/dev-environment.md)
- testing →
references/review.md
- CI and delivery (lint, typecheck, build, accessibility, security review) →
references/review.md
Reference Packs
references/baseline.md
Stack defaults, quality gates, workspace layout, conventions, and baseline scripts.
references/routing-and-ui.md
TanStack Router layout, provider composition, entry point, shadcn/ui, Tailwind v4, and theming.
references/runtime-and-data.md
Query client, HTTP layer, state boundaries, i18n, Vite config, and the frontend-side nsl invocation. Full nsl protocol lives in /pma references/dev-environment.md.
references/review.md
Verification gates and the accessibility and security review checklist for UI changes.
Acceptance Checklist
Before merge:
If the project intentionally diverges from these defaults, keep the divergence explicit in the proposal and match the repository's existing patterns consistently.
1---2name: pma-web3description: Frontend implementation and acceptance baseline for PMA-managed React + Vite SPA and internal-tool frontend projects. Covers required quality gates, file-based type-safe routing with TanStack Router, server state with TanStack Query, the shadcn/ui (base-nova) hard lock, Tailwind theming, testing, i18n, nsl-based dev integration, and delivery rules. Use when implementing, scaffolding, upgrading, or validating acceptance of a React/Vite SPA; use pma-cr for code-review workflow.4---5
6# Web Frontend Implementation Guide
7
8Use this skill together with `/pma`. `/pma` controls workflow, approval, and task tracking; this guide defines the implementation baseline after work is approved.
9
10Keep this entry file lean. Load only the reference packs needed for the current task.
11
12## Scope
13
14For PMA-managed SPA and internal-tool frontend projects using:
15
16- React 19 + TypeScript + Vite 8
17- TanStack Router for file-based type-safe routing
18- TanStack Query for server state
19- Zustand for UI-only client state
20- shadcn/ui (base-nova style) with `@base-ui/react` primitives and Tailwind CSS v4 — this is the **only** allowed UI ecosystem; Radix UI and other component libraries are forbidden (see `references/baseline.md` *UI Library Policy*)
21
22Single-app layout is the default. Reach for a Bun monorepo only when the repo really hosts multiple apps or shared packages — a single SPA bolted onto a Rust or Go service does not need workspaces.
23
24Not for SSR-first sites, content sites, or non-PMA projects.
25
26## Loading Order
27
281. Always load `references/baseline.md` first.
292. Load `references/routing-and-ui.md` when touching route structure, providers, theming, Tailwind, or shadcn/ui.
303. Load `references/runtime-and-data.md` when touching API integration, query state, i18n, Vite config, or the frontend-side dev script. For the full nsl protocol (registration patterns, `--strip`, `NSL_PORT`, fallback) load `/pma references/dev-environment.md`.
314. Load `references/review.md` when touching release checks, tests, accessibility, or security-sensitive UI behavior.
32
33## Quick Routing
34
35- New app setup or repo restructuring (single-app vs monorepo) → `references/baseline.md`
36- Router, layouts, providers, entrypoint, shadcn, Tailwind, theme → `references/routing-and-ui.md`
37- runtime (HTTP client, query client, i18n, Vite config) → `references/runtime-and-data.md`
38- dev URL routing (nsl) → `references/runtime-and-data.md` (full protocol → `/pma references/dev-environment.md`)
39- testing → `references/review.md`
40- CI and delivery (lint, typecheck, build, accessibility, security review) → `references/review.md`
41
42## Reference Packs
43
44- `references/baseline.md`
45 Stack defaults, quality gates, workspace layout, conventions, and baseline scripts.
46- `references/routing-and-ui.md`
47 TanStack Router layout, provider composition, entry point, shadcn/ui, Tailwind v4, and theming.
48- `references/runtime-and-data.md`
49 Query client, HTTP layer, state boundaries, i18n, Vite config, and the frontend-side nsl invocation. Full nsl protocol lives in `/pma references/dev-environment.md`.
50- `references/review.md`
51 Verification gates and the accessibility and security review checklist for UI changes.
52
53## Acceptance Checklist
54
55Before merge:
56
57- [ ] `lint`, `typecheck`, `build` pass
58- [ ] tests pass with coverage; target 80% or higher
59- [ ] UI lock respected: no Radix or other component ecosystems (grep gate in `references/review.md`)
60- [ ] new components followed the sourcing order in `references/baseline.md` *UI Library Policy*
61- [ ] routing stays file-based under `src/app/routes/` with generated `routeTree.gen.ts`
62- [ ] theming stays dual-channel (`:root` / `.dark` variables + `@theme inline` mapping); no hardcoded colors in components
63- [ ] nsl dev routing works (`bun run dev` serves `<name>.localhost`; API reachable at `/api`)
64
65If the project intentionally diverges from these defaults, keep the divergence explicit in the proposal and match the repository's existing patterns consistently.