
App Builder
- 16 installs
- 8.1k repo stars
- Updated August 4, 2026
- vudovn/ag-kit
Helps with ai & agent building tasks.
About
app-builder is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- app-builder
- AI & Agent Building
- AI-coding skill
App Builder by the numbers
- 16 all-time installs (skills.sh)
- +1 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #11,040 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/vudovn/ag-kit --skill app-builderAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 16 |
|---|---|
| repo stars | ★ 8.1k |
| Last updated | August 4, 2026 |
| Repository | vudovn/ag-kit ↗ |
What it does
Helps with ai & agent building tasks.
Files
App Builder - Application Building Orchestrator
Analyzes user's requests, determines tech stack, plans structure, and coordinates agents.
🎯 Selective Reading Rule
Read ONLY files relevant to the request! Check the content map, find what you need.
| File | Description | When to Read |
|---|---|---|
project-detection.md | Keyword matrix, project type detection | Starting new project |
tech-stack.md | 2026 default stack, alternatives | Choosing technologies |
agent-coordination.md | Agent pipeline, execution order | Coordinating multi-agent work |
scaffolding.md | Directory structure, core files | Creating project structure |
feature-building.md | Feature analysis, error handling | Adding features to existing project |
templates/SKILL.md | Project templates | Scaffolding new project |
---
📦 Templates (13)
Quick-start scaffolding for new projects. Read the matching template only!
| Template | Tech Stack | When to Use |
|---|---|---|
| nextjs-fullstack | Next.js + Prisma | Full-stack web app |
| nextjs-saas | Next.js + Stripe | SaaS product |
| nextjs-static | Next.js + Framer | Landing page |
| nuxt-app | Nuxt 4 + Pinia | Vue full-stack app |
| express-api | Express + JWT | REST API |
| python-fastapi | FastAPI | Python API |
| react-native-app | Expo + Zustand | Mobile app |
| flutter-app | Flutter + Riverpod | Cross-platform mobile |
| electron-desktop | Electron + React | Desktop app |
| chrome-extension | Chrome MV3 | Browser extension |
| cli-tool | Node.js + Commander | CLI app |
| monorepo-turborepo | Turborepo + pnpm | Monorepo |
| astro-static | Astro + MDX | Blog / Documentation |
---
🔗 Related Agents
| Agent | Role |
|---|---|
project-planner | Task breakdown, dependency graph |
frontend-specialist | UI components, pages |
backend-specialist | API, business logic |
database-architect | Schema, migrations |
devops-engineer | Deployment, preview |
---
Usage Example
User: "Make an Instagram clone with photo sharing and likes"
App Builder Process:
1. Project type: Social Media App
2. Tech stack: Next.js + Prisma + Cloudinary + Clerk
3. Create plan:
├─ Database schema (users, posts, likes, follows)
├─ API routes (auth, posts, likes, follows)
├─ Pages (feed, profile, upload)
└─ Components (PostCard, Feed, LikeButton)
4. Coordinate agents
5. Report progress
6. Start previewAgent Coordination
How App Builder orchestrates specialist agents.
Agent Pipeline
┌─────────────────────────────────────────────────────────────┐
│ APP BUILDER (Orchestrator) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PROJECT PLANNER │
│ • Task breakdown │
│ • Dependency graph │
│ • File structure planning │
│ • Create {task-slug}.md in project root (MANDATORY) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ CHECKPOINT: PLAN VERIFICATION │
│ 🔴 VERIFY: Does {task-slug}.md exist in project root? │
│ 🔴 If NO → STOP → Create plan file first │
│ 🔴 If YES → Proceed to specialist agents │
└─────────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ DATABASE │ │ BACKEND │ │ FRONTEND │
│ ARCHITECT │ │ SPECIALIST │ │ SPECIALIST │
│ │ │ │ │ │
│ • Schema design │ │ • API routes │ │ • Components │
│ • Migrations │ │ • Controllers │ │ • Pages │
│ • Seed data │ │ • Middleware │ │ • Styling │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────┼───────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ PARALLEL PHASE (Optional) │
│ • Security Auditor → Vulnerability check │
│ • Test Engineer → Unit tests │
│ • Performance Optimizer → Bundle analysis │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ DEVOPS ENGINEER │
│ • Environment setup │
│ • Preview deployment │
│ • Health check │
└─────────────────────────────────────────────────────────────┘Execution Order
| Phase | Agent(s) | Parallel? | Prerequisite | CHECKPOINT |
|---|---|---|---|---|
| 0 | Socratic Gate | ❌ | - | ✅ Ask 3 questions |
| 1 | Project Planner | ❌ | Questions answered | ✅ {task-slug}.md created |
| 1.5 | PLAN VERIFICATION | ❌ | {task-slug}.md exists | ✅ File exists in root |
| 2 | Database Architect | ❌ | Plan ready | Schema defined |
| 3 | Backend Specialist | ❌ | Schema ready | API routes created |
| 4 | Frontend Specialist | ✅ | API ready (partial) | UI components ready |
| 5 | Security Auditor, Test Engineer | ✅ | Code ready | Tests & audit pass |
| 6 | DevOps Engineer | ❌ | All code ready | Deployment ready |
🔴 CRITICAL: Phase 1.5 is MANDATORY. No specialist agents proceed without {task-slug}.md verification.
Feature Building
How to analyze and implement new features.
Feature Analysis
Request: "add payment system"
Analysis:
├── Required Changes:
│ ├── Database: orders, payments tables
│ ├── Backend: /api/checkout, /api/webhooks/stripe
│ ├── Frontend: CheckoutForm, PaymentSuccess
│ └── Config: Stripe API keys
│
├── Dependencies:
│ ├── stripe package
│ └── Existing user authentication
│
└── Scope: DB + 2 API routes + 2 components + configIterative Enhancement Process
1. Analyze existing project
2. Create change plan
3. Present plan to user
4. Get approval
5. Apply changes
6. Test
7. Show previewError Handling
| Error Type | Solution Strategy |
|---|---|
| TypeScript Error | Fix type, add missing import |
| Missing Dependency | Run npm install |
| Port Conflict | Suggest alternative port |
| Database Error | Check migration, validate connection |
Recovery Strategy
1. Detect error
2. Try automatic fix
3. If failed, report to user
4. Suggest alternative
5. Rollback if necessaryProject Type Detection
Analyze user requests to determine project type and template.
Keyword Matrix
| Keywords | Project Type | Template |
|---|---|---|
| blog, post, article | Blog | astro-static |
| e-commerce, product, cart, payment | E-commerce | nextjs-saas |
| dashboard, panel, management | Admin Dashboard | nextjs-fullstack |
| api, backend, service, rest | API Service | express-api |
| python, fastapi, django | Python API | python-fastapi |
| mobile, android, ios, react native | Mobile App (RN) | react-native-app |
| flutter, dart | Mobile App (Flutter) | flutter-app |
| portfolio, personal, cv | Portfolio | nextjs-static |
| crm, customer, sales | CRM | nextjs-fullstack |
| saas, subscription, stripe | SaaS | nextjs-saas |
| landing, promotional, marketing | Landing Page | nextjs-static |
| docs, documentation | Documentation | astro-static |
| extension, plugin, chrome | Browser Extension | chrome-extension |
| desktop, electron | Desktop App | electron-desktop |
| cli, command line, terminal | CLI Tool | cli-tool |
| monorepo, workspace | Monorepo | monorepo-turborepo |
Detection Process
1. Tokenize user request
2. Extract keywords
3. Determine project type
4. Detect missing information → forward to project-planner / orchestrator
5. Suggest tech stackConflict Resolution
When a request matches multiple keywords (e.g. "a CLI to manage my e-commerce products" matches both cli and e-commerce), resolve in this order:
| Priority | Rule | Example |
|---|---|---|
| 1 | Platform wins over domain. A concrete platform (mobile / desktop / cli / extension) outranks a web/business domain (e-commerce, crm, blog). | "CLI to manage e-commerce" → cli-tool (e-commerce is the data domain, not the deliverable) |
| 2 | Head noun wins. The keyword describing what is being built (grammatical subject) outranks modifiers. | "a dashboard for my Shopify store" → nextjs-fullstack (dashboard is the thing; Shopify is context) |
| 3 | Still ambiguous → ask. If no rule breaks the tie, do NOT guess. Surface the options through the Socratic Gate (Phase 0) and let the user choose. | "an app for my shop" → ask: web, mobile, or desktop? |
Project Scaffolding
Directory structure and core files for new projects.
---
Next.js Full-Stack Structure (Next.js 16 Optimized)
project-name/
├── src/
│ ├── app/ # Routes only (thin layer)
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── globals.css # Tailwind v4 config (@theme) lives here
│ │ ├── (auth)/ # Route group - auth pages
│ │ │ ├── login/page.tsx
│ │ │ └── register/page.tsx
│ │ ├── (dashboard)/ # Route group - dashboard layout
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ │ └── api/ # Route Handlers (webhooks/external only)
│ │ └── [resource]/route.ts
│ │
│ ├── components/ # UI components
│ │ ├── ui/ # Reusable primitives (Button, Input)
│ │ └── forms/ # Client forms (useActionState)
│ │
│ ├── lib/ # Shared utilities & server-only logic
│ │ ├── db.ts # Prisma singleton client
│ │ ├── dal.ts # Data Access Layer (server-only, DTOs)
│ │ └── utils.ts # Helper functions
│ │
│ ├── actions/ # Server Actions (mutations)
│ │
│ └── types/ # Global TypeScript types
│
├── prisma/
│ ├── schema.prisma
│ ├── migrations/
│ └── seed.ts
│
├── public/
├── proxy.ts # Network boundary (auth, redirects)
├── .env.example
├── .env.local
├── package.json
├── next.config.ts
├── tsconfig.json
└── README.md---
Structure Principles
| Principle | Implementation |
|---|---|
| Thin routes | app/ only for routing + layouts, logic lives in actions/ and lib/ |
| Server/Client separation | Server-only logic in lib/dal.ts, prevents accidental client imports |
| Data Access Layer | lib/dal.ts centralizes DB access and returns DTOs for safe reuse |
| Mutations via Server Actions | actions/ holds Server Actions, called from forms with useActionState |
| Route groups | (groupName)/ for layout sharing without URL impact |
| Reusable UI | components/ui/ for primitives, components/forms/ for client forms |
---
| File | Purpose |
|---|---|
proxy.ts | Next.js 16 network boundary logic (auth, redirects). Renamed from middleware.ts, runs on Node.js runtime |
package.json | Dependencies |
next.config.ts | Next.js config (TypeScript) |
tsconfig.json | TypeScript + path aliases (@/*) |
.env.example | Environment template |
README.md | Project documentation |
.gitignore | Git ignore rules |
prisma/schema.prisma | Database schema |
src/app/globals.css | Tailwind v4 config via @theme (no tailwind.config.js) |
---
Path Aliases (tsconfig.json)
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"],
"@/components/*": ["./src/components/*"],
"@/lib/*": ["./src/lib/*"],
"@/actions/*": ["./src/actions/*"]
}
}
}---
When to Use What
| Need | Location |
|---|---|
| New page/route | app/(group)/page.tsx |
| Reusable button/input | components/ui/ |
| Client form | components/forms/ |
| Server action (mutation) | actions/ |
| Data fetching / DB query | lib/dal.ts |
| Prisma client | lib/db.ts |
| Helper function | lib/utils.ts |
| Auth / redirect logic | proxy.ts |
Tech Stack Selection (2026)
Default and alternative technology choices for web applications.
Default Stack (Web App - 2026)
Frontend:
framework: Next.js 16 (Stable)
language: TypeScript 5.7+
styling: Tailwind CSS v4
state: React 19 Actions / Server Components
caching: Next.js 16 Cache Components (Stable)
bundler: Turbopack (Stable for Dev & Build)
Backend:
runtime: Node.js 24 (Krypton LTS)
framework: Next.js API Routes / Hono (for Edge)
validation: Zod / TypeBox
Database:
primary: PostgreSQL
orm: Prisma / Drizzle
hosting: Supabase / Neon
Auth:
provider: Auth.js (v5) / Clerk
Monorepo:
tool: Turborepo 2.0Alternative Options
| Need | Default | Alternative |
|---|---|---|
| Real-time | Supabase Realtime | Socket.io, Ably |
| File storage | Supabase Storage | Cloudinary, AWS S3 |
| Payment | Stripe | LemonSqueezy, Paddle |
| Resend | SendGrid, Postmark | |
| Search | Algolia | Typesense, Orama |
Astro Static Site Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Framework | Astro 6.x |
| Content | MDX + Content Collections (Content Layer API) |
| Styling | Tailwind CSS v4 (@tailwindcss/vite) |
| Integrations | Sitemap, RSS, SEO |
| Output | Static/SSG |
---
Directory Structure
project-name/
├── src/
│ ├── components/ # .astro components
│ ├── content/ # Collection entries (blog/, docs/ .md/.mdx)
│ ├── layouts/ # Page layouts
│ ├── pages/ # File-based routing (only reserved dir)
│ ├── styles/
│ │ └── global.css # @import "tailwindcss";
│ └── content.config.ts # Collection definitions (Content Layer, in src/ root)
├── public/ # Static assets
├── astro.config.mjs
└── package.json---
Key Concepts
| Concept | Description |
|---|---|
| Content Layer API | Collections defined in src/content.config.ts with loaders (glob/file) + Zod schemas |
| Islands Architecture | Partial hydration for interactivity |
| Zero JS by default | Static HTML unless needed |
| MDX Support | Markdown with components |
---
Setup Steps
1. npm create astro@latest {{name}} 2. Add integrations: npx astro add mdx sitemap 3. Add Tailwind v4: npx astro add tailwind (installs @tailwindcss/vite, not the legacy @astrojs/tailwind) 4. Define collections in src/content.config.ts using loaders + Zod schemas 5. npm run dev
---
Deployment
| Platform | Method |
|---|---|
| Vercel | Auto-detected |
| Netlify | Auto-detected |
| Cloudflare Pages | Auto-detected |
| GitHub Pages | Build + deploy action |
---
Best Practices
- Use Content Collections for type safety
- Leverage static generation
- Add islands only where needed
- Optimize images with Astro Image
Chrome Extension Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Manifest | V3 |
| UI | React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS v4 |
| Bundler | Vite + CRXJS (@crxjs/vite-plugin v2) |
| Storage | Chrome Storage API |
---
Directory Structure
CRXJS + Vite: manifest.config.ts is the source of truth, Vite resolves entries.project-name/
├── src/
│ ├── popup/ # { index.html, main.tsx, Popup.tsx }
│ ├── options/ # { index.html, main.tsx, Options.tsx }
│ ├── background/ # service-worker.ts (MV3 service worker)
│ ├── content/ # { content-script.ts, content.css }
│ ├── components/ # Shared React
│ └── lib/
│ ├── storage.ts # Chrome storage helpers
│ └── messaging.ts # Message passing
├── public/ # Static assets (icons)
├── manifest.config.ts # defineManifest() — typed manifest
├── vite.config.ts # crx({ manifest }) + react + tailwind
└── package.json---
Manifest V3 Concepts
| Component | Purpose |
|---|---|
| Service Worker | Background processing |
| Content Scripts | Page injection |
| Popup | User interface |
| Options Page | Settings |
---
Permissions
| Permission | Use |
|---|---|
| storage | Save user data |
| activeTab | Current tab access |
| scripting | Inject scripts |
| host_permissions | Site access |
---
Setup Steps
1. npm create vite@latest {{name}} -- --template react-ts 2. Install CRXJS: npm install -D @crxjs/vite-plugin@latest 3. Add Chrome types: npm install -D @types/chrome 4. Create manifest.config.ts with defineManifest, wire crx({ manifest }) in vite.config.ts 5. npm run dev (HMR for popup/options/content) 6. Load in Chrome: chrome://extensions → Load unpacked → select dist/
---
Development Tips
| Task | Method |
|---|---|
| Debug Popup | Right-click icon → Inspect |
| Debug Background | Extensions page → Service worker |
| Debug Content | DevTools console on page |
| Hot Reload | npm run dev (CRXJS HMR) |
---
Best Practices
- Use type-safe messaging
- Wrap Chrome APIs in promises
- MV3 background is an ephemeral service worker — persist state in
chrome.storage, not module globals; use event listeners + alarms, not long-lived timers - Minimize permissions
- Scope content-script styles to avoid host-page bleed
CLI Tool Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Node.js 24 (Krypton LTS) |
| Language | TypeScript (ESM) |
| CLI Framework | Commander.js (v15, needs Node ≥22.12) |
| Prompts | @inquirer/prompts (modular) |
| Output | chalk + ora |
| Config | cosmiconfig |
---
Directory Structure
project-name/
├── src/
│ ├── index.ts # Entry: #!/usr/bin/env node shebang, wires Commander
│ ├── commands/ # One file per command (factory functions)
│ ├── lib/ # Core logic (framework-agnostic, testable)
│ ├── utils/ # logger (chalk/ora), prompt wrappers
│ └── config.ts # cosmiconfig loader
├── dist/ # Build output (tsup/tsc)
└── package.json # "type":"module", "bin":{...}---
CLI Design Principles
| Principle | Description |
|---|---|
| Subcommands | Group related actions |
| Options | Flags with defaults |
| Interactive | Prompts when needed |
| Non-interactive | Support --yes flags |
---
Key Components
| Component | Purpose |
|---|---|
| Commander | Command parsing (use a local new Command() for testability) |
| @inquirer/prompts | Modular interactive prompts (input, select, confirm) |
| Chalk | Colored output |
| Ora | Spinners/loading |
| Cosmiconfig | Config file discovery |
---
Setup Steps
1. Create project directory 2. npm init -y then set "type": "module" 3. Install deps: npm install commander @inquirer/prompts chalk ora cosmiconfig 4. Point bin at compiled ./dist/index.js, keep #!/usr/bin/env node shebang 5. npm link for local testing
---
Publishing
npm login
npm publish---
Best Practices
- Keep
src/index.tsthin; attach commands via.addCommand()factories insrc/commands/ - Put business logic in
lib//utils/so commands stay testable wrappers - ESM by default; build with tsup/esbuild
- Support both interactive and non-interactive (
--yes) modes - Validate inputs with Zod; exit with proper codes (0 success, 1 error)
- Alternatives worth knowing: @clack/prompts (polished prompts), citty (lightweight ESM command framework)
Electron Desktop App Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Framework | Electron 42+ |
| UI | React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS v4 |
| Bundler | electron-vite + electron-builder |
| IPC | Type-safe communication (contextBridge) |
---
Directory Structure
electron-vite layout: main / preload / renderer separation is the 2026 standard.
project-name/
├── src/
│ ├── main/ # Main process (lifecycle, windows, IPC handlers)
│ │ └── index.ts
│ ├── preload/ # contextBridge — type-safe IPC surface
│ │ ├── index.ts
│ │ └── index.d.ts # Ambient types shared with renderer
│ └── renderer/ # React app
│ ├── index.html
│ └── src/
│ ├── main.tsx
│ ├── App.tsx
│ └── components/
├── resources/ # App icons / static (build-time)
├── build/ # Builder assets (entitlements, icons)
├── electron.vite.config.ts
├── electron-builder.yml
└── package.json # scripts: electron-vite dev | build | preview---
Process Model
| Process | Role |
|---|---|
| Main | Node.js, system access |
| Renderer | Chromium, React UI |
| Preload | Bridge, context isolation |
---
Key Concepts
| Concept | Purpose |
|---|---|
| contextBridge | Safe API exposure |
| ipcMain/ipcRenderer | Process communication |
| nodeIntegration: false | Security |
| contextIsolation: true | Security |
---
Setup Steps
1. npm create @quick-start/electron@latest {{name}} -- --template react-ts 2. cd {{name}} && npm install 3. Add Tailwind v4: npm install tailwindcss @tailwindcss/vite 4. Define IPC types in src/preload/index.d.ts 5. npm run dev
---
Build Targets
| Platform | Output |
|---|---|
| Windows | NSIS, Portable |
| macOS | DMG, ZIP |
| Linux | AppImage, DEB |
---
Best Practices
contextIsolation: true(default v12+),sandbox: true(default v20+),nodeIntegration: false(default v5+) — never enable Node for remote content- Expose a narrow API via
contextBridge.exposeInMainWorld, never rawipcRenderer - Validate IPC
senderagainst an allowlist; set a restrictive CSP (script-src 'self') - Type-safe IPC: share types from
preload/index.d.tsinto the renderer - Auto-updates with electron-updater
Express.js API Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Node.js 24 (Krypton LTS) |
| Framework | Express 5 (stable, default on npm) |
| Language | TypeScript |
| Database | PostgreSQL + Prisma |
| Validation | Zod |
| Auth | JWT + bcrypt |
---
Directory Structure
project-name/
├── prisma/
│ └── schema.prisma
├── src/
│ ├── app.ts # Express app + middleware wiring (no listen)
│ ├── server.ts # Bootstrap: listen() — split for testability
│ ├── config/ # Environment
│ ├── routes/ # Route definitions only
│ ├── controllers/ # HTTP layer (req/res, calls services)
│ ├── services/ # Business logic
│ ├── middlewares/
│ │ ├── auth.ts # JWT verify
│ │ ├── error.ts # Error handler
│ │ └── validate.ts # Zod validation
│ ├── schemas/ # Zod schemas
│ └── utils/
├── tests/
└── package.json---
Middleware Stack
| Order | Middleware |
|---|---|
| 1 | helmet (security) |
| 2 | cors |
| 3 | compression |
| 4 | body parsing |
| 5 | morgan (logging) |
| 6 | routes |
| 7 | error handler (last, 4-arg signature) |
---
API Response Format
| Type | Structure |
|---|---|
| Success | { success: true, data: {...} } |
| Error | { error: "message", details: [...] } |
---
Setup Steps
1. Create project directory 2. npm init -y 3. Install deps: npm install express prisma zod bcrypt jsonwebtoken 4. Configure Prisma 5. npm run db:push 6. npm run dev
---
Best Practices
- Split
app.ts(wiring) fromserver.ts(listen) so the app imports cleanly into tests - Layer architecture (routes → controllers → services)
- Validate all inputs with Zod at the route boundary
- Centralized error handler last (Express 5 auto-forwards rejected promises — no manual catch wrapper needed)
- Environment-based config
- Use Prisma for type-safe DB access
Flutter App Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Framework | Flutter 3.x |
| Language | Dart 3.x |
| State | Riverpod 3 (codegen) |
| Navigation | Go Router |
| HTTP | Dio |
| Storage | Hive |
---
Directory Structure
project_name/
├── lib/
│ ├── main.dart
│ ├── app.dart
│ ├── core/
│ │ ├── constants/
│ │ ├── theme/
│ │ ├── router/
│ │ └── utils/
│ ├── features/
│ │ ├── auth/
│ │ │ ├── data/
│ │ │ ├── domain/
│ │ │ └── presentation/
│ │ └── home/
│ ├── shared/
│ │ ├── widgets/
│ │ └── providers/
│ └── services/
│ ├── api/
│ └── storage/
├── test/
└── pubspec.yaml---
Architecture Layers
| Layer | Contents |
|---|---|
| Presentation | Screens, Widgets, Providers |
| Domain | Entities, Use Cases |
| Data | Repositories, Models |
---
Key Packages
| Package | Purpose |
|---|---|
| flutter_riverpod | State management |
| riverpod_annotation | Code generation |
| go_router | Navigation |
| dio | HTTP client |
| freezed | Immutable models |
| hive | Local storage |
---
Setup Steps
1. flutter create {{name}} --org com.{{bundle}} 2. Update pubspec.yaml 3. flutter pub get 4. Run code generation: dart run build_runner build 5. flutter run
---
Best Practices
- Feature-first folder structure (data / domain / presentation per feature)
- Riverpod 3 with
riverpod_annotationcodegen (generated ref is justRef; plainNotifier, noAutoDisposeNotifier) - Legacy
StateProvider/StateNotifierProvidermoved topackage:riverpod/legacy.dart - Freezed for immutable data classes
- Go Router for declarative navigation
- Material 3 theming
Turborepo Monorepo Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Build System | Turborepo 2.x |
| Package Manager | pnpm |
| Apps | Next.js, Express |
| Packages | Shared UI, Config, Types, Utils |
| Language | TypeScript |
---
Directory Structure
project-name/
├── apps/
│ ├── web/ # Next.js app
│ ├── api/ # Express API
│ └── docs/ # Documentation
├── packages/
│ ├── ui/ # Shared components (@repo/ui)
│ ├── config/ # ESLint, TS, Tailwind presets (@repo/config)
│ ├── types/ # Shared types (@repo/types)
│ └── utils/ # Shared utilities (@repo/utils)
├── turbo.json # "tasks" key (renamed from "pipeline" in v2)
├── pnpm-workspace.yaml
└── package.json # requires "packageManager" field---
Key Concepts
| Concept | Description |
|---|---|
| Workspaces | Globs declared in pnpm-workspace.yaml |
| Pipeline | turbo.json tasks graph (NOT pipeline — renamed in v2) |
| Caching | Remote/local task caching |
| Dependencies | workspace:* protocol, @repo/* namespace |
| Env mode | v2 is strict — declare task env/globalEnv or caching breaks |
---
Turbo Tasks (turbo.json)
tasksis the v2 key. Thepipelinekey was renamed — migrate withnpx @turbo/codemod rename-pipeline.
| Task | Depends On |
|---|---|
| build | ^build (dependencies first) |
| dev | cache: false, persistent |
| lint | ^build |
| test | ^build |
---
Setup Steps
1. Create root directory 2. pnpm init 3. Create pnpm-workspace.yaml 4. Create turbo.json 5. Add apps and packages 6. pnpm install 7. pnpm dev
---
Common Commands
| Command | Description |
|---|---|
pnpm dev | Run all apps |
pnpm build | Build all |
pnpm --filter @name/web dev | Run specific app |
pnpm --filter @name/web add axios | Add dep to app |
---
Best Practices
- Split
apps/(deployable) frompackages/(libraries, shared config) - Namespace internal packages with
@repo/*; reference viaworkspace:* - Define entrypoints with the
exportsfield (better tree-shaking than barrel files) - Share tsconfig/eslint from
packages/config - Declare task
env/globalEnvexplicitly (v2 strict env mode) - Use Turbo remote caching for CI
Next.js Full-Stack Template (2026 Edition)
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Framework | Next.js | v16+ (App Router, Turbopack) |
| Runtime | Node.js | v24 (Krypton LTS) |
| Language | TypeScript | v5+ (Strict Mode) |
| Database | PostgreSQL | Prisma ORM (Serverless friendly) |
| Styling | Tailwind CSS | v4.0 (Zero-config, CSS-first) |
| Auth | Auth.js v5 (next-auth@beta) / Clerk | Protected routes via proxy.ts |
| UI Logic | React 19 | Server Actions, useActionState |
| Validation | Zod | Schema validation (API & Forms) |
---
Directory Structure
project-name/
├── prisma/
│ └── schema.prisma # Database schema
├── src/
│ ├── app/
│ │ ├── (auth)/ # Route groups for Login/Register
│ │ ├── (dashboard)/ # Protected routes
│ │ ├── api/ # Route Handlers (only for Webhooks/External integration)
│ │ ├── layout.tsx # Root Layout (Metadata, Providers)
│ │ ├── page.tsx # Landing Page
│ │ └── globals.css # Tailwind v4 config (@theme) lives here
│ ├── components/
│ │ ├── ui/ # Reusable UI (Button, Input)
│ │ └── forms/ # Client forms using useActionState
│ ├── lib/
│ │ ├── db.ts # Prisma singleton client
│ │ ├── utils.ts # Helper functions
│ │ └── dal.ts # Data Access Layer (Server-only)
│ ├── actions/ # Server Actions (Mutations)
│ └── types/ # Global TS Types
├── public/
├── next.config.ts # TypeScript Config
└── package.json---
Key Concepts (Updated)
| Concept | Description |
|---|---|
| Server Components | Render on server (default). Direct DB access (Prisma) without APIs. |
| Server Actions | Handle Form mutations. Replaces traditional API Routes. Use in action={}. |
| React 19 Hooks | Form state management: useActionState, useFormStatus, useOptimistic. |
| Data Access Layer | Data security. Separation of DB logic (DTOs) for safe reuse. |
| Tailwind v4 | Styling engine. No tailwind.config.js. Config directly in CSS. |
---
Environment Variables
| Variable | Purpose |
|---|---|
| DATABASE_URL | PostgreSQL connection string (Prisma) |
| NEXT_PUBLIC_APP_URL | Public application URL |
| AUTH_SECRET | Auth.js v5 session secret (default auth) |
| NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Auth (if using Clerk instead) |
| CLERK_SECRET_KEY | Clerk secret (server only, if using Clerk) |
---
Setup Steps
1. Initialize Project:
npx create-next-app@latest my-app --typescript --tailwind --eslint
# Select Yes for App Router
# Select No for src directory (optional, this template uses src)2. Install DB & Validation:
npm install prisma @prisma/client zod
npm install -D ts-node # For running seed scripts3. Configure Tailwind v4 (If missing): Ensure src/app/globals.css uses the new import syntax instead of a config file:
@import "tailwindcss";
@theme {
--color-primary: oklch(0.5 0.2 240);
--font-sans: "Inter", sans-serif;
}4. Initialize Database:
npx prisma init
# Update schema.prisma
npm run db:push5. Run Developer Server:
npm run dev --turbo
# --turbo to enable faster Turbopack---
Best Practices (2026 Standards)
- Fetch Data: Call Prisma directly in Server Components (async/await). Do not use useEffect for initial data fetching.
- Mutations: Use Server Actions combined with React 19's
useActionStateto handle loading and error states instead of manual useState. - Type Safety: Share Zod schemas between Server Actions (input validation) and Client Forms.
- Security: Always validate input data with Zod before passing it to Prisma.
- Styling: Use native CSS variables in Tailwind v4 for easier dynamic theming.
Next.js SaaS Template (Updated 2026)
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Framework | Next.js | v16+ (App Router, React Compiler) |
| Runtime | Node.js | v24 (Krypton LTS) |
| Auth | Auth.js | v5 (next-auth@beta, formerly NextAuth). Alternative: Clerk |
| Payments | Stripe API | Latest |
| Database | PostgreSQL | Prisma v7+ (Serverless Driver) |
| Resend | React Email | |
| UI | Tailwind CSS | v4 (Oxide Engine, no config file) |
---
Directory Structure
project-name/
├── prisma/
│ └── schema.prisma # Database Schema
├── src/
│ ├── actions/ # NEW: Server Actions (Replaces API Routes for data mutation)
│ │ ├── auth-actions.ts
│ │ ├── billing-actions.ts
│ │ └── user-actions.ts
│ ├── app/
│ │ ├── (auth)/ # Route Group: Login, register
│ │ ├── (dashboard)/ # Route Group: Protected routes (App Layout)
│ │ ├── (marketing)/ # Route Group: Landing, pricing (Marketing Layout)
│ │ └── api/ # Only used for Webhooks or Edge cases
│ │ └── webhooks/stripe/
│ ├── components/
│ │ ├── emails/ # React Email templates
│ │ ├── forms/ # Client components using useActionState (React 19)
│ │ └── ui/ # Shadcn UI
│ ├── lib/
│ │ ├── auth.ts # Auth.js v5 config
│ │ ├── db.ts # Prisma Singleton
│ │ ├── data/ # Data Access Layer (server-only reads)
│ │ └── stripe.ts # Stripe Singleton
│ └── styles/
│ └── globals.css # Tailwind v4 imports (CSS only)
└── package.json---
SaaS Features
| Feature | Implementation |
|---|---|
| Auth | Auth.js v5 + Passkeys + OAuth |
| Data Mutation | Server Actions (No API routes) |
| Subscriptions | Stripe Checkout & Customer Portal |
| Webhooks | Asynchronous Stripe event handling |
| Transactional via Resend | |
| Validation | Zod (Server-side validation) |
---
Database Schema
| Model | Fields (Key fields) |
|---|---|
| User | id, email, stripeCustomerId, subscriptionId, plan |
| Account | OAuth provider data (Google, GitHub...) |
| Session | User sessions (Database strategy) |
---
Environment Variables
| Variable | Purpose |
|---|---|
| DATABASE_URL | Prisma connection string (Postgres) |
| AUTH_SECRET | Replaces NEXTAUTH_SECRET (Auth.js v5) |
| STRIPE_SECRET_KEY | Payments (Server-side) |
| STRIPE_WEBHOOK_SECRET | Webhook verification |
| RESEND_API_KEY | Email sending |
| NEXT_PUBLIC_APP_URL | Application Canonical URL |
---
Setup Steps
1. Initialize project (Node 24):
npx create-next-app@latest {{name}} --typescript --eslint2. Install core libraries:
npm install next-auth@beta stripe resend @prisma/client3. Install Tailwind v4 (Add to globals.css):
@import "tailwindcss";4. Configure environment (.env.local)
5. Sync Database:
npx prisma db push6. Run local Webhook:
npm run stripe:listen7. Run project:
npm run devNext.js Static Site Template (Modern Edition)
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology | Notes |
|---|---|---|
| Framework | Next.js 16+ | App Router, Turbopack, Static Exports |
| Core | React 19 | Server Components, New Hooks, Compiler |
| Language | TypeScript | Strict Mode |
| Styling | Tailwind CSS v4 | CSS-first configuration (No js config), Oxide Engine |
| Animations | Framer Motion | Layout animations & gestures |
| Icons | Lucide React | Lightweight SVG icons |
| SEO | Metadata API | Native Next.js API (Replaces next-seo) |
---
Directory Structure
Streamlined structure thanks to Tailwind v4 (theme configuration lives inside CSS).
project-name/
├── src/
│ ├── app/
│ │ ├── layout.tsx # Contains root SEO Metadata
│ │ ├── page.tsx # Landing Page
│ │ ├── globals.css # Import Tailwind v4 & @theme config
│ │ ├── not-found.tsx # Custom 404 page
│ │ ├── sitemap.ts # Generated sitemap (Metadata convention)
│ │ ├── robots.ts # Generated robots.txt (Metadata convention)
│ │ ├── opengraph-image.tsx # Dynamic OG image
│ │ └── (routes)/ # Route groups (about, contact...)
│ ├── components/
│ │ ├── layout/ # Header, Footer
│ │ ├── sections/ # Hero, Features, Pricing, CTA
│ │ └── ui/ # Atomic components (Button, Card)
│ └── lib/
│ └── utils.ts # Helper functions (cn, formatters)
├── content/ # Markdown/MDX content
├── public/ # Static assets (images, fonts)
├── next.config.ts # Next.js Config (TypeScript)
└── package.json---
Static Export Config
Using next.config.ts instead of .js for better type safety.
// next.config.ts
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: 'export', // Required for Static Hosting (S3, GitHub Pages)
images: {
unoptimized: true // Required if not using Node.js server image optimization
},
trailingSlash: true, // Recommended for SEO and fixing 404s on some hosts
reactStrictMode: true,
};
export default nextConfig;---
SEO Implementation (Metadata API)
Deprecated next-seo. Configure directly in layout.tsx or page.tsx.
// src/app/layout.tsx
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: {
template: '%s | Product Name',
default: 'Home - Product Name',
},
description: 'SEO optimized description for the landing page.',
openGraph: {
type: 'website',
locale: 'en_US',
url: 'https://mysite.com',
siteName: 'My Brand',
},
};---
Landing Page Sections
| Section | Purpose | Suggested Component |
|---|---|---|
| Hero | First impression, H1 & Main CTA | <HeroSection /> |
| Features | Product benefits (Grid/Bento layout) | <FeaturesGrid /> |
| Social Proof | Partner logos, User numbers | <LogoCloud /> |
| Testimonials | Customer reviews | <TestimonialCarousel /> |
| Pricing | Service plans | <PricingCards /> |
| FAQ | Questions & Answers (Good for SEO) | <Accordion /> |
| CTA | Final conversion | <CallToAction /> |
---
Animation Patterns (Framer Motion)
| Pattern | Usage | Implementation |
|---|---|---|
| Fade Up | Headlines, paragraphs | initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} |
| Stagger | Lists of Features/Cards | Use variants with staggerChildren |
| Parallax | Background images or floating elements | useScroll & useTransform |
| Micro-interactions | Hover buttons, click effects | whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} |
---
Setup Steps
1. Initialize Project:
npx create-next-app@latest my-site --typescript --tailwind --eslint
# Select 'Yes' for App Router
# Select 'No' for 'Would you like to customize the default import alias?'2. Install Auxiliary Libraries:
npm install framer-motion lucide-react clsx tailwind-merge
# clsx and tailwind-merge help handle dynamic classes better3. Configure Tailwind v4 (in src/app/globals.css):
@import "tailwindcss";
@theme {
--color-primary: #3b82f6;
--font-sans: 'Inter', sans-serif;
}4. Development:
npm run dev --turbopack---
Deployment
| Platform | Method | Important Notes |
|---|---|---|
| Vercel | Git Push | Auto-detects Next.js. Best for performance. |
| GitHub Pages | GitHub Actions | Need to set basePath in next.config.ts if not using a custom domain. |
| AWS S3 / CloudFront | Upload out folder | Ensure Error Document is configured to 404.html. |
| Netlify | Git Push | Set build command to npm run build. |
---
Best Practices (Modern)
- React Server Components (RSC): Default all components to Server Components. Only add
'use client'when you need state (useState) or event listeners (onClick). - Image Optimization: Use the
<Image />component but rememberunoptimized: truefor static export or use an external image CDN (Cloudinary/Imgix). - Font Optimization: Use
next/font(Google Fonts) to automatically host fonts and prevent layout shift. - Responsive: Mobile-first design using Tailwind prefixes like
sm:,md:,lg:.
Nuxt 4 Full-Stack Template (2026 Edition)
Modern full-stack template for Nuxt 4. Versions reflect the latest stable line verified 2026-05; pin to current stable when scaffolding.
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Framework | Nuxt | v4+ (app/ srcDir structure) |
| UI Engine | Vue | v3 (stable) |
| Language | TypeScript | v5+ (Strict Mode) |
| State | Pinia | v3+ (setup store syntax) |
| Database | PostgreSQL | Prisma ORM |
| Styling | Tailwind CSS | v4 (@tailwindcss/vite plugin) |
| UI Lib | Nuxt UI | v3 (Tailwind v4 native) |
| Validation | Zod | Schema validation |
---
Directory Structure (Nuxt 4 Standard)
Nuxt 4 defaults srcDir to app/, keeping client code separate from server/ and root config.
project-name/
├── app/ # Application source (Nuxt 4 srcDir)
│ ├── assets/css/
│ │ └── main.css # Tailwind v4 import
│ ├── components/ # Auto-imported components
│ ├── composables/ # Auto-imported logic
│ ├── layouts/
│ ├── middleware/
│ ├── pages/ # File-based routing
│ ├── plugins/
│ ├── stores/ # Pinia stores
│ ├── app.vue # Root component
│ └── app.config.ts # Reactive runtime config
├── server/ # Nitro server engine
│ ├── api/ # API routes (e.g. /api/users)
│ ├── routes/ # Server routes
│ └── utils/ # Server-only helpers (Prisma client)
├── shared/ # Isomorphic code (types, Zod schemas)
├── prisma/
│ └── schema.prisma
├── public/
├── nuxt.config.ts
└── package.json---
Key Concepts (2026)
| Concept | Description |
|---|---|
| app/ srcDir | Client code lives under app/, cleanly separated from server/ and config |
| shared/ | Isomorphic code (types, Zod validators) usable in both Vue app and Nitro server |
| Server Engine | Nitro-based; API routes in server/api/, Prisma client in server/utils/ |
| Tailwind v4 | CSS-first config; theme lives in CSS via @theme, no tailwind.config.js |
| Vapor Mode | Experimental no-VDOM renderer (not GA in 2026). Opt-in per component via <script setup vapor> when shipped |
---
Environment Variables
| Variable | Purpose |
|---|---|
| DATABASE_URL | Prisma connection string (PostgreSQL) |
| NUXT_PUBLIC_APP_URL | Canonical URL |
| NUXT_SESSION_PASSWORD | Session encryption key |
---
Setup Steps
1. Initialize project:
npx nuxi@latest init my-app2. Install core deps:
npm install @pinia/nuxt @prisma/client zod
npm install -D prisma3. Setup Tailwind v4 (first-party Vite plugin, NOT @nuxtjs/tailwindcss):
npm install tailwindcss @tailwindcss/viteAdd to nuxt.config.ts:
import tailwindcss from '@tailwindcss/vite'
export default defineNuxtConfig({
vite: { plugins: [tailwindcss()] },
css: ['~/assets/css/main.css']
})4. Configure CSS in app/assets/css/main.css:
@import "tailwindcss";
@theme {
--color-primary: oklch(0.6 0.15 150);
}5. Run development:
npm run dev---
Best Practices
- Data Fetching: Use
useFetch/useAsyncDatafor SSR-friendly data; reserveserver: falsefor client-only work. - State: Use Pinia (
defineStore) for global state, Nuxt'suseStatefor simple shared SSR state. - Validation: Define Zod schemas in
shared/and reuse on client forms and Nitro API routes. - Type Safety: API route types are inferred automatically with
$fetch. - Server-only: Instantiate the Prisma client in
server/utils/so it never leaks to the client bundle.
FastAPI API Template
Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
Tech Stack
| Component | Technology |
|---|---|
| Framework | FastAPI |
| Language | Python 3.12+ (current stable 3.14) |
| ORM | SQLAlchemy 2.0 (async) |
| Validation | Pydantic v2 |
| Migrations | Alembic |
| Auth | JWT + passlib |
---
Directory Structure
Domain/module layout (scales better than file-type for non-trivial apps). Each domain owns its router, schemas, models, service.
project-name/
├── alembic/ # Migrations
├── src/
│ ├── auth/
│ │ ├── router.py # APIRouter
│ │ ├── schemas.py # Pydantic models
│ │ ├── models.py # SQLAlchemy models
│ │ ├── service.py # Business logic
│ │ ├── dependencies.py
│ │ └── exceptions.py
│ ├── posts/ # Same shape per domain
│ ├── config.py # Global settings (BaseSettings)
│ ├── database.py # Async engine / session
│ ├── models.py # Shared base models
│ ├── exceptions.py # Global exceptions
│ └── main.py # FastAPI() + include_router
├── tests/
├── requirements/ # base.txt / dev.txt / prod.txt
├── alembic.ini
└── .env---
Key Concepts
| Concept | Description |
|---|---|
| Domain modules | Each feature folder owns router + schemas + models + service |
| Async | async/await throughout (AsyncSession, async_sessionmaker) |
| Dependency Injection | FastAPI Depends (validation, auth, DB session) |
| Pydantic v2 | Validation + serialization |
| SQLAlchemy 2.0 | Async sessions |
---
API Structure
| Layer | Responsibility |
|---|---|
| Routers | HTTP handling |
| Dependencies | Auth, validation |
| Services | Business logic |
| Models | Database entities |
| Schemas | Request/response |
---
Setup Steps
1. python -m venv venv 2. source venv/bin/activate 3. pip install fastapi uvicorn "sqlalchemy[asyncio]" alembic pydantic pydantic-settings 4. Create .env 5. alembic upgrade head 6. uvicorn src.main:app --reload
---
Best Practices
- Use async everywhere (AsyncSession, async dependencies; wrap sync SDKs in
run_in_threadpool) - Per-module
BaseSettingsover one global config - Pydantic v2 for validation
- SQLAlchemy 2.0 async sessions
- Alembic migrations: static, reversible, descriptive slugs
- pytest-asyncio for tests; use
dependency_overridesto mock
React Native App Template (2026 Edition)
Modern mobile app, optimized for New Architecture and React 19. Versions reflect the latest stable line verified 2026-05; NativeWind v5 is pre-release — pin deliberately when scaffolding.
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Core | React Native + Expo | SDK 56+ (New Architecture Enabled) |
| Language | TypeScript | v5+ (Strict Mode) |
| UI Logic | React | v19 (React Compiler, auto-memoization) |
| Navigation | Expo Router | File-based, Universal Links |
| Styling | NativeWind | v5 (pre-release, Tailwind v4 CSS-first) |
| State | Zustand + React Query | v5+ (Async State Management) |
| Storage | Expo SecureStore | Encrypted local storage |
---
Directory Structure
Expo Router keeps app/ for routes only; everything else lives under src/ with the @/* alias.
project-name/
├── src/
│ ├── app/ # Expo Router (file-based routing ONLY)
│ │ ├── _layout.tsx # Root Layout (Stack/Tabs config)
│ │ ├── index.tsx # Main Screen
│ │ ├── (tabs)/ # Route Group for Tab Bar
│ │ │ ├── _layout.tsx
│ │ │ ├── home.tsx
│ │ │ └── profile.tsx
│ │ ├── +not-found.tsx
│ │ └── [id].tsx # Dynamic Route (Typed)
│ ├── components/
│ │ ├── ui/ # Primitive Components (Button, Text)
│ │ └── features/ # Complex Components
│ ├── hooks/ # Custom Hooks
│ ├── lib/
│ │ ├── api.ts # Axios/Fetch client
│ │ └── storage.ts # SecureStore wrapper
│ ├── store/ # Zustand stores
│ └── constants/ # Colors, Theme config
├── assets/ # Fonts, Images
├── global.css # NativeWind v5 entry: @import "tailwindcss"
├── babel.config.js # NativeWind Babel preset
├── metro.config.js # withNativeWind wrapper
└── app.json # Expo Config---
Navigation Patterns (Expo Router)
| Pattern | Description | Implement |
|---|---|---|
| Stack | Hierarchical navigation (Push/Pop) | <Stack /> in _layout.tsx |
| Tabs | Bottom navigation bar | <Tabs /> in (tabs)/_layout.tsx |
| Drawer | Side slide-out menu | expo-router/drawer |
| Modals | Overlay screens | presentation: 'modal' in Stack screen |
---
Key Packages & Purpose
| Package | Purpose |
|---|---|
| expo-router | File-based routing (Next.js like) |
| nativewind | Use Tailwind CSS classes in React Native |
| react-native-reanimated | Smooth animations (runs on UI thread) |
| @tanstack/react-query | Server state management, caching, pre-fetching |
| zustand | Global state management (lighter than Redux) |
| expo-image | Optimized image rendering for performance |
---
Setup Steps (2026 Standard)
1. Initialize Project:
npx create-expo-app@latest my-app --template default
cd my-app2. Install Core Dependencies:
npx expo install expo-router react-native-safe-area-context react-native-screens expo-link expo-constants expo-status-bar3. Install NativeWind v5 (pre-release, Tailwind v4 CSS-first):
npm install nativewind@next tailwindcss react-native-reanimated4. Configure NativeWind (Babel, Metro & CSS):
- Add the preset to
babel.config.js:presets: [["babel-preset-expo", { jsxImportSource: "nativewind" }], "nativewind/babel"]. - Wrap Metro:
withNativeWind(config, { input: './global.css' })inmetro.config.js. - Create
global.csswith@import "tailwindcss";(theme via@theme, notailwind.config.js). - Import
global.cssinsrc/app/_layout.tsx.
5. Run Project:
npx expo start -c
# Press 'i' for iOS simulator or 'a' for Android emulator---
Best Practices (Updated)
- New Architecture: Ensure
newArchEnabled: trueinapp.jsonto leverage TurboModules and Fabric Renderer. - Typed Routes: Use Expo Router's "Typed Routes" feature for type-safe routing (e.g.,
router.push('/path')). - React 19: Reduce usage of
useMemooruseCallbackthanks to React Compiler (if enabled). - Components: Build UI primitives (Box, Text) with NativeWind className for reusability.
- Assets: Use
expo-imageinstead of default<Image />for better caching and performance. - API: Always wrap API calls with TanStack Query, avoid direct calls in
useEffect.