Frontend Development Guide¶
Purpose
This guide defines how frontend work should be built, checked, and prepared for review to deliver a consistent user experience and professional UI code.
Technology Stack¶
| Library | Role |
|---|---|
| App Router, SSR, and Routing | |
| Base UI components & consistency | |
| Utility-first styling & layout | |
| E2E flow verification |
Workflow¶
- Branch: Start from
dev. - Scope: Confirm UI expectations and states (Loading, Success, Error).
- Build: Implement using
shadcn/uiandTailwind. - Connect: Bind to backend APIs or mock data.
- Check: Run local linting and accessibility checks.
- PR: Open a PR with screenshots or recordings.
Definition of Done¶
Frontend Checklist
- [ ] UI matches the feature design exactly.
- [ ] Responsive behaviour verified (Mobile/Desktop).
- [ ] Loading, Success, and Error states are handled.
- [ ] Components are modular and reusable.
- [ ] Manually verified in at least two browsers.
- [ ] PR includes visual evidence (Screenshots/Video).
UI Best Practices¶
Prefer extending shadcn/ui patterns over inventing one-off components. Keep components small and focused.
import { Button } from "@/components/ui/button"
export function ActionButton() {
return <Button variant="outline">Action</Button>
}
Use Tailwind class usage intentionally. Avoid "magic numbers" in layouts; use the spacing scale.
Make state handling explicit. Use server components where possible for data fetching to reduce client-side complexity.