api-route
Use when the user adds or modifies a Next.js API route under ui/src/app/api/.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when the user adds or modifies a Next.js API route under ui/src/app/api/.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when the user works on EHDS articles, DSP protocol, DCP credentials, ODRL policies, or the audit trail.
Use when the user works on the force-directed graph explorer, layer colours, persona views, or node filtering.
Use when the user works on authentication, Keycloak configuration, OIDC, roles, or JWT claims.
Use when the user adds nodes, relationships, constraints, or indexes to the Neo4j knowledge graph, or edits any *.cypher file.
Use when the user adds E2E tests, Playwright specs, or journey coverage.
Use when the user works on demo personas, localStorage persistence, or GitHub Pages static-export behaviour.
| name | api-route |
| description | Use when the user adds or modifies a Next.js API route under ui/src/app/api/. |
Sources: .claude/rules/api-conventions.md, ui/src/lib/api.ts, CLAUDE.md gotcha #3.
GET/POST/
DELETE exports, NextResponse.json, { error: string } error shape).getServerSession(authOptions) + explicit role check
(roles from (session as { roles?: string[] }).roles ?? []).runQuery() from @/lib/neo4j — parameterised Cypher only.ui/public/mock/<name>.json
matching the live response shape exactly, and register it in the
STATIC_MOCK_MAP in ui/src/lib/api.ts.ui/__tests__/unit/api/ — mock @/lib/neo4j (see
admin-participants-route.test.ts for the current pattern); the global setup
already mocks getServerSession as EDC_ADMIN.npx tsc --noEmit -p tsconfig.build.json and the targeted vitest file.Route file + mock fixture + STATIC_MOCK_MAP entry + unit test — all four, always.