Imported from yangshu2087/draftorbit (
apps/web/AGENTS.md). Install upstream withnpx skills add yangshu2087/draftorbit --skill web. Copyright stays with the author.
DraftOrbit Web Front-end Guide
Purpose
apps/web/is the production Next.js front-end for DraftOrbit.- Optimize for trustworthy, operator-friendly product UI rather than generic AI-demo styling.
Read order
Before continuing existing UI work, read these files in order:
../../AGENTS.md../../DESIGN.mdAGENTS.mdDESIGN.mddesign/README.mddesign/design-system.mddocs/ui-acceptance-checklist.md../../docs/agent-handoff.md
Working rules
- Prefer the existing stack:
- Next.js App Router under
app/ - Tailwind CSS
- Radix primitives + class-variance-authority composition
- TanStack Query for client data flows
- shared contracts from
@draftorbit/shared
- Next.js App Router under
- Keep route, layout, metadata, and page-level composition changes in
app/. - Keep reusable UI and feature sections in
components/. - Keep browser-side helpers, queries, and UI utilities in
lib/. - Keep narrow UI logic checks in
test/. - Store Figma links in
design/figma-links.mdand keep screenshots, Stitch/AI Studio exports, and design notes underdesign/. - Reuse existing tokens, components, and layout patterns before introducing one-off markup or ad hoc classes.
- If you use external inspiration, translate it into local tokens/components and record the chosen references in
design/README.mdor../../docs/agent-handoff.md. - Treat visual states as part of the implementation:
- loading
- empty
- error
- hover
- focus-visible
- disabled
- For responsive UI work, check at 375, 768, 1024, and 1440 widths when feasible.
- Use
../../scripts/handoff-refresh.shbefore pausing when design work is in progress. - For regular UI review, prefer
pnpm ui:reviewso lint, tests, and handoff refresh stay aligned.
Verification
- Run the smallest useful web verification from
apps/web/:pnpm lintfor most component and style editspnpm testwhen UI logic or helpers changedpnpm ui:browser -- --url <url>for standalone real browser verificationpnpm buildwhen routes, layouts, metadata, or rendering boundaries changedpnpm ui:review -- --url <url>for the default lint + test + browser + handoff path
- If the change is visual, prefer browser verification over static code inspection alone.
- If browser verification is skipped, state the gap explicitly in the handoff or PR summary.
Completion standard
Before declaring UI work done, summarize:
- what design inputs were used
- what external inspirations were used, if any
- which states and breakpoints were checked
- what remains visually unverified
DESIGN.md workflow
- Keep repository-level
DESIGN.mdas the source of truth for look-and-feel constraints used by AI agents. - For front-end tasks, read
DESIGN.mdbefore implementation and follow its token, component, state, and responsive rules. - If the repo has a web app (for example
web/orapps/web/), also read that web app'sDESIGN.mdanddocs/ui-acceptance-checklist.md. - Do not clone third-party brand styles directly from public references; adapt with project-approved tokens and product intent.
- Before finalizing UI work, run narrow code checks and at least one browser visual verification pass.
