
Templates
- 28 installs
- 8.1k repo stars
- Updated August 4, 2026
- vudovn/antigravity-kit
Helps with ai & agent building tasks.
About
templates is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- templates
- AI & Agent Building
- AI-coding skill
Templates by the numbers
- 28 all-time installs (skills.sh)
- Ranked #9,505 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/antigravity-kit --skill templatesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 28 |
|---|---|
| repo stars | ★ 8.1k |
| Last updated | August 4, 2026 |
| Repository | vudovn/antigravity-kit ↗ |
What it does
Helps with ai & agent building tasks.
Files
Project Templates
Quick-start templates for scaffolding new projects.
---
🎯 Selective Reading Rule
Read ONLY the template matching user's project type!
| 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 |
| express-api | Express + JWT | REST API |
| python-fastapi | FastAPI | Python API |
| react-native-app | Expo + Zustand | Mobile app |
| flutter-app | Flutter + Riverpod | Cross-platform |
| 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 / Docs |
---
Usage
1. User says "create [type] app" 2. Match to appropriate template 3. Read ONLY that template's TEMPLATE.md 4. Follow its tech stack and structure
Astro Static Site Template
Tech Stack
| Component | Technology |
|---|---|
| Framework | Astro 4.x |
| Content | MDX + Content Collections |
| Styling | Tailwind CSS |
| Integrations | Sitemap, RSS, SEO |
| Output | Static/SSG |
---
Directory Structure
project-name/
├── src/
│ ├── components/ # .astro components
│ ├── content/ # MDX content
│ │ ├── blog/
│ │ └── config.ts # Collection schemas
│ ├── layouts/ # Page layouts
│ ├── pages/ # File-based routing
│ └── styles/
├── public/ # Static assets
├── astro.config.mjs
└── package.json---
Key Concepts
| Concept | Description |
|---|---|
| Content Collections | Type-safe content with 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 tailwind sitemap 3. Configure astro.config.mjs 4. Create content collections 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
Tech Stack
| Component | Technology |
|---|---|
| Manifest | V3 |
| UI | React 18 |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Bundler | Vite |
| Storage | Chrome Storage API |
---
Directory Structure
project-name/
├── src/
│ ├── popup/ # Extension popup
│ ├── options/ # Options page
│ ├── background/ # Service worker
│ ├── content/ # Content scripts
│ ├── components/
│ ├── hooks/
│ └── lib/
│ ├── storage.ts # Chrome storage helpers
│ └── messaging.ts # Message passing
├── public/
│ ├── icons/
│ └── manifest.json
└── 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 {{name}} -- --template react-ts 2. Add Chrome types: npm install -D @types/chrome 3. Configure Vite for multi-entry 4. Create manifest.json 5. npm run dev (watch mode) 6. Load in Chrome: chrome://extensions → Load unpacked
---
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 with watch |
---
Best Practices
- Use type-safe messaging
- Wrap Chrome APIs in promises
- Minimize permissions
- Handle offline gracefully
CLI Tool Template
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Node.js 20+ |
| Language | TypeScript |
| CLI Framework | Commander.js |
| Prompts | Inquirer.js |
| Output | chalk + ora |
| Config | cosmiconfig |
---
Directory Structure
project-name/
├── src/
│ ├── index.ts # Entry point
│ ├── cli.ts # CLI setup
│ ├── commands/ # Command handlers
│ ├── lib/
│ │ ├── config.ts # Config loader
│ │ └── logger.ts # Styled output
│ └── types/
├── bin/
│ └── cli.js # Executable
└── package.json---
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 |
| Inquirer | Interactive prompts |
| Chalk | Colored output |
| Ora | Spinners/loading |
| Cosmiconfig | Config file discovery |
---
Setup Steps
1. Create project directory 2. npm init -y 3. Install deps: npm install commander @inquirer/prompts chalk ora cosmiconfig 4. Configure bin in package.json 5. npm link for local testing
---
Publishing
npm login
npm publish---
Best Practices
- Provide helpful error messages
- Support both interactive and non-interactive modes
- Use consistent output styling
- Validate inputs with Zod
- Exit with proper codes (0 success, 1 error)
Electron Desktop App Template
Tech Stack
| Component | Technology |
|---|---|
| Framework | Electron 28+ |
| UI | React 18 |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Bundler | Vite + electron-builder |
| IPC | Type-safe communication |
---
Directory Structure
project-name/
├── electron/
│ ├── main.ts # Main process
│ ├── preload.ts # Preload script
│ └── ipc/ # IPC handlers
├── src/
│ ├── App.tsx
│ ├── components/
│ │ ├── TitleBar.tsx # Custom title bar
│ │ └── ...
│ └── hooks/
├── public/
└── package.json---
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 vite {{name}} -- --template react-ts 2. Install: npm install -D electron electron-builder vite-plugin-electron 3. Create electron/ directory 4. Configure main process 5. npm run electron:dev
---
Build Targets
| Platform | Output |
|---|---|
| Windows | NSIS, Portable |
| macOS | DMG, ZIP |
| Linux | AppImage, DEB |
---
Best Practices
- Use preload script for main/renderer bridge
- Type-safe IPC with typed handlers
- Custom title bar for native feel
- Handle window state (maximize, minimize)
- Auto-updates with electron-updater
Express.js API Template
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Node.js 20+ |
| Framework | Express.js |
| Language | TypeScript |
| Database | PostgreSQL + Prisma |
| Validation | Zod |
| Auth | JWT + bcrypt |
---
Directory Structure
project-name/
├── prisma/
│ └── schema.prisma
├── src/
│ ├── app.ts # Express setup
│ ├── config/ # Environment
│ ├── routes/ # Route handlers
│ ├── controllers/ # Business logic
│ ├── services/ # Data access
│ ├── middleware/
│ │ ├── auth.ts # JWT verify
│ │ ├── error.ts # Error handler
│ │ └── validate.ts # Zod validation
│ ├── schemas/ # Zod schemas
│ └── utils/
└── package.json---
Middleware Stack
| Order | Middleware |
|---|---|
| 1 | helmet (security) |
| 2 | cors |
| 3 | morgan (logging) |
| 4 | body parsing |
| 5 | routes |
| 6 | error handler |
---
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
- Layer architecture (routes → controllers → services)
- Validate all inputs with Zod
- Centralized error handling
- Environment-based config
- Use Prisma for type-safe DB access
Flutter App Template
Tech Stack
| Component | Technology |
|---|---|
| Framework | Flutter 3.x |
| Language | Dart 3.x |
| State | Riverpod 2.0 |
| 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
- Riverpod for state, React Query pattern for server state
- Freezed for immutable data classes
- Go Router for declarative navigation
- Material 3 theming
Turborepo Monorepo Template
Tech Stack
| Component | Technology |
|---|---|
| Build System | Turborepo |
| Package Manager | pnpm |
| Apps | Next.js, Express |
| Packages | Shared UI, Config, Types |
| Language | TypeScript |
---
Directory Structure
project-name/
├── apps/
│ ├── web/ # Next.js app
│ ├── api/ # Express API
│ └── docs/ # Documentation
├── packages/
│ ├── ui/ # Shared components
│ ├── config/ # ESLint, TS, Tailwind
│ ├── types/ # Shared types
│ └── utils/ # Shared utilities
├── turbo.json
├── pnpm-workspace.yaml
└── package.json---
Key Concepts
| Concept | Description |
|---|---|
| Workspaces | pnpm-workspace.yaml |
| Pipeline | turbo.json task graph |
| Caching | Remote/local task caching |
| Dependencies | workspace:* protocol |
---
Turbo 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
- Shared configs in packages/config
- Shared types in packages/types
- Internal packages with
workspace:* - Use Turbo remote caching for CI
Next.js Full-Stack Template (2026 Edition)
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Framework | Next.js | v16+ (App Router, Turbopack) |
| Language | TypeScript | v5+ (Strict Mode) |
| Database | PostgreSQL | Prisma ORM (Serverless friendly) |
| Styling | Tailwind CSS | v4.0 (Zero-config, CSS-first) |
| Auth | Clerk / Better Auth | Middleware Protected Routes |
| 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 |
| NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Auth (if using Clerk) |
| CLERK_SECRET_KEY | Auth Secret (Server only) |
---
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)
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Framework | Next.js | v16+ (App Router, React Compiler) |
| Runtime | Node.js | v24 (Krypton LTS) |
| Auth | Auth.js | v6 (formerly NextAuth) |
| Payments | Stripe API | Latest |
| Database | PostgreSQL | Prisma v6 (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 v6 config
│ │ ├── db.ts # Prisma Singleton
│ │ └── stripe.ts # Stripe Singleton
│ └── styles/
│ └── globals.css # Tailwind v4 imports (CSS only)
└── package.json---
SaaS Features
| Feature | Implementation |
|---|---|
| Auth | Auth.js v6 + 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 v6) |
| 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)
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
│ │ └── (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)
Mẫu template Full-Stack hiện đại cho Nuxt 4, tối ưu hóa hiệu suất với Vue Vapor Mode và Tailwind v4.
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Framework | Nuxt | v4.0+ (App Directory structure) |
| UI Engine | Vue | v3.6+ (Vapor Mode enabled) |
| Language | TypeScript | v5+ (Strict Mode) |
| State | Pinia | v3+ (Store syntax) |
| Database | PostgreSQL | Prisma ORM |
| Styling | Tailwind CSS | v4.0 (Vite Plugin, Zero-config) |
| UI Lib | Nuxt UI | v3 (Tailwind v4 native) |
| Validation | Zod | Schema validation |
---
Directory Structure (Nuxt 4 Standard)
Sử dụng cấu trúc app/ để giữ thư mục gốc gọn gàng.
project-name/
├── app/ # Application Source
│ ├── assets/
│ │ └── css/
│ │ └── main.css # Tailwind v4 imports
│ ├── components/ # Auto-imported components
│ ├── composables/ # Auto-imported logic
│ ├── layouts/
│ ├── pages/ # File-based routing
│ ├── app.vue # Root component
│ └── router.options.ts
├── server/ # Nitro Server Engine
│ ├── api/ # API Routes (e.g. /api/users)
│ ├── routes/ # Server Routes
│ └── utils/ # Server-only helpers (Prisma)
├── prisma/
│ └── schema.prisma
├── public/
├── nuxt.config.ts # Main Config
└── package.json---
Key Concepts (2026)
| Concept | Description | Future Update |
|---|---|---|
| App Directory | app/ | Tách biệt mã nguồn ứng dụng và file cấu hình root. |
| Vapor Mode | Opt-in performance | Render không cần Virtual DOM (như SolidJS). Bật trong nuxt.config. |
| Server Functions | RPC-style calls | Gọi hàm server trực tiếp từ client (thay thế dần API routes thủ công). |
| Tailwind v4 | CSS-first | Cấu hình theme trực tiếp trong CSS, không cần tailwind.config.js. |
| Nuxt Islands | Server Components | Render component cô lập trên server (<NuxtIsland name="..." />). |
---
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-app
# Select "Nuxt 4 structure" if prompted2. Install Core Deps:
npm install @pinia/nuxt @prisma/client zod
npm install -D prisma3. Setup Tailwind v4: Install the Vite plugin (new standard):
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
# Runs with Turbo/Vite---
Best Practices
- Vapor Mode: Kích hoạt cho các component nặng về render:
<script setup lang="ts" vapor>
// Component này sẽ compile sang chế độ Vapor (No VDOM)
</script>- Data Fetching: Sử dụng
useFetchvớiserver: falsecho các tác vụ client-only, hoặc dùng Server Functions để type-safety tốt hơn. - State: Dùng
defineStore(Pinia) cho global state,useStatecủa Nuxt cho state đơn giản chia sẻ giữa Server/Client. - Type Safety: Tự động tạo type cho API routes (
$fetchtyped automatically).
FastAPI API Template
Tech Stack
| Component | Technology |
|---|---|
| Framework | FastAPI |
| Language | Python 3.11+ |
| ORM | SQLAlchemy 2.0 |
| Validation | Pydantic v2 |
| Migrations | Alembic |
| Auth | JWT + passlib |
---
Directory Structure
project-name/
├── alembic/ # Migrations
├── app/
│ ├── main.py # FastAPI app
│ ├── config.py # Settings
│ ├── database.py # DB connection
│ ├── models/ # SQLAlchemy models
│ ├── schemas/ # Pydantic schemas
│ ├── routers/ # API routes
│ ├── services/ # Business logic
│ ├── dependencies/ # DI
│ └── utils/
├── tests/
├── .env.example
└── requirements.txt---
Key Concepts
| Concept | Description |
|---|---|
| Async | async/await throughout |
| Dependency Injection | FastAPI Depends |
| 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 alembic pydantic 4. Create .env 5. alembic upgrade head 6. uvicorn app.main:app --reload
---
Best Practices
- Use async everywhere
- Pydantic v2 for validation
- SQLAlchemy 2.0 async sessions
- Alembic for migrations
- pytest-asyncio for tests
React Native App Template (2026 Edition)
Modern mobile app template, optimized for New Architecture and React 19.
Tech Stack
| Component | Technology | Version / Notes |
|---|---|---|
| Core | React Native + Expo | SDK 52+ (New Architecture Enabled) |
| Language | TypeScript | v5+ (Strict Mode) |
| UI Logic | React | v19 (React Compiler, auto-memoization) |
| Navigation | Expo Router | v4+ (File-based, Universal Links) |
| Styling | NativeWind | v4.0 (Tailwind v4, CSS-first config) |
| State | Zustand + React Query | v5+ (Async State Management) |
| Storage | Expo SecureStore | Encrypted local storage |
---
Directory Structure
Standardized structure for Expo Router and NativeWind v4.
project-name/
├── app/ # Expo Router (File-based routing)
│ ├── _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 # 404 Page
│ └── [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 # Entry point for NativeWind v4
├── tailwind.config.ts # Tailwind Config (if custom theme needed)
├── babel.config.js # NativeWind Babel Plugin
└── 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 v4:
npm install nativewind tailwindcss react-native-reanimated4. Configure NativeWind (Babel & CSS):
- Add plugin to
babel.config.js:plugins: ["nativewind/babel"]. - Create
global.csswith:@import "tailwindcss";. - Import
global.cssinapp/_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.