prototype
MAmattpocock/skills336k5,004 new stars in the last 7 days
Comprehensive frontend development methodology covering modern SPA architecture, component design, state management, performance optimization, testing, and deployment workflows.
Complete methodology for building production-grade frontend applications.
Requirements → Design → Implement → Test → Optimize → Deploy
Framework: Next.js 15+ (App Router)
UI Library: React 19+
Styling: Tailwind CSS 4+
State: Zustand (client) + React Query (server)
Testing: Vitest + Playwright
Deployment: Vercel / Docker + CDN
src/
├── app/ # Next.js App Router
│ ├── (routes)/ # Route groups
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ ├── loading.tsx # Suspense fallback
│ ├── error.tsx # Error boundary
│ └── not-found.tsx # 404 page
├── components/
│ ├── ui/ # Primitive components (atoms)
│ ├── features/ # Feature components (molecules)
│ ├── layouts/ # Layout components (organisms)
│ └── providers/ # Context providers
├── hooks/ # Custom hooks
├── lib/ # Utilities, API clients, configs
├── stores/ # Zustand stores
├── types/ # TypeScript types
└── styles/ # Global styles, Tailwind config
Follow atomic design:
// Always type props explicitly
interface ButtonProps {
variant?: 'primary' | 'secondary' | 'ghost';
size?: 'sm' | 'md' | 'lg';
children: React.ReactNode;
disabled?: boolean;
onClick?: () => void;
}
// Use discriminated unions for complex state
type FormState =
| { status: 'idle' }
| { status: 'loading' }
| { status: 'success'; data: FormData }
| { status: 'error'; error: string };
// Server Component (default in App Router)
// - Fetches data directly
// - Accesses backend resources
// - Reduces client bundle
async function ProductList() {
const products = await fetchProducts();
return <ProductGrid products={products} />;
}
// Client Component (when interactivity needed)
'use client';
function SearchInput({ onSearch }: { onSearch: (q: string) => void }) {
const [query, setQuery] = useState('');
return <input value={query} onChange={e => { setQuery(e.target.value); onSearch(e.target.value); }} />;
}
Is it server state? → React Query / SWR
Is it form state? → React Hook Form + Zod
Is it URL state? → useSearchParams / nuqs
Is it global client state? → Zustand
Is it local component state? → useState / useReducer
┌─────────┐
│ E2E │ 10% — Playwright
│ (Few) │ Critical user journeys
├─────────┤
│ INT │ 30% — Vitest + MSW
│(Some) │ API integration, data flows
├─────────┤
│ UNIT │ 60% — Vitest + RTL
│ (Many) │ Components, hooks, utils
└─────────┘
| Metric | Target | Measurement |
|---|---|---|
| LCP | < 2.5s | Largest Contentful Paint |
| INP | < 200ms | Interaction to Next Paint |
| CLS | < 0.1 | Cumulative Layout Shift |
| FCP | < 1.8s | First Contentful Paint |
| TTFB | < 800ms | Time to First Byte |
# Type checking
npm run typecheck
# Linting
npm run lint
# Tests
npm run test
npm run test:e2e
# Build
npm run build
# Performance audit
npx lighthouse-ci --config=lighthouse.config.js
# Required
NEXT_PUBLIC_API_URL=
DATABASE_URL=
AUTH_SECRET=
# Optional
NEXT_PUBLIC_ANALYTICS_ID=
SENTRY_DSN=
{
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended"
],
"rules": {
"no-console": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
}
}
feat: New feature
fix: Bug fix
refactor: Code change that neither fixes a bug nor adds a feature
style: Formatting, no code change
test: Adding missing tests
docs: Documentation changes
perf: Performance improvement
ci: CI/CD changes
| Task | Command |
|---|---|
| Dev server | npm run dev |
| Build | npm run build |
| Type check | npm run typecheck |
| Lint | npm run lint |
| Test | npm run test |
| Test E2E | npm run test:e2e |
| Format | npm run format |
MAmattpocock/skills336k5,004 new stars in the last 7 days
AFaffaan-m/ECC314k4,125 new stars in the last 7 days
FIfirecrawl/firecrawl214k5,821 new stars in the last 7 days
ANanthropics/skills203k3,333 new stars in the last 7 days
Set visual direction and typography for UI, avoiding templated defaults.
ANanthropics/skills203k3,333 new stars in the last 7 days
Build complex HTML artifacts with React, Tailwind CSS, state management and routing.
ANanthropics/skills203k3,333 new stars in the last 7 days