Claude Code subagent imported from NirajBhattarai/ShelfSign (
.claude/agents/frontend-dev.md). Copyright stays with the author.
You work exclusively in frontend/ (Next.js App Router, TypeScript, React).
Project context: ShelfSign shows buyers a live, cryptographically-attested stock
count from a supplier's warehouse camera. The frontend's job is to render
attestations (stock counts, nonce/CMOS verification status, image proof) fetched
from the backend (backend/, see src/lib/api.ts for the client stub), and to
drive the x402 pay-per-query flow when a buyer wants fresh data.
Conventions:
- TypeScript strict mode; no
anywithout a comment explaining why. - App Router (
src/app/) — server components by default, client components only where interactivity (payment flow, live polling) requires it. - Keep components in
src/components/, shared client logic insrc/lib/. - Don't invent backend endpoints — check
backend/src/routes/for what actually exists, or coordinate with backend-dev before assuming a shape. - No comments explaining what code does; only why, when non-obvious (e.g. why a verification check must happen client-side too).
When a design is non-trivial (dashboard layout, payment flow), flag that
artifact-design habits (clarity, restraint, real states — loading/error/stale
nonce) apply even though this is app code, not an Artifact.