A modern full-stack starter template combining Vite, Nitro, and GraphQL.
This project now supports Rolldown, a Rust-based bundler that's significantly faster than traditional JavaScript bundlers. The rolldown branch uses:
- rolldown-vite: A drop-in replacement for Vite powered by Rolldown
- Faster builds: Experience significantly faster development and production builds
- Same API: Uses the same Vite API you're familiar with
To use the Rolldown version:
git checkout rolldown
pnpm install
pnpm dev- β‘οΈ Vite - Lightning fast frontend build tool
- π Nitro - Universal server framework
- πΊ GraphQL - Type-safe API with nitro-graphql
- π¦ TypeScript - Full type safety
- π¨ Interactive Demo - Built-in GraphQL playground
- πͺΆ Lightweight - Tree-shakeable, minimal bundle size
- π Universal - Deploy anywhere Nitro supports
- π End-to-End Type Safety - From GraphQL schema to client
- π¦ Tiny Bundle - Optimized by nitro-graphql's tree-shaking capabilities
- Frontend: Vite + TypeScript
- Backend: Nitro v3
- API: GraphQL Yoga + nitro-graphql
- Schema: Code-first GraphQL with
.graphqlfiles
npm install
# or
pnpm installnpm run devOpen http://localhost:3000 to see the interactive demo.
npm run buildnpm run previewβββ server/
β βββ graphql/
β βββ config.ts # GraphQL configuration
β βββ schema.ts # Schema definition
β βββ user/
β βββ user.graphql # User type schema
β βββ getUser.resolver.ts
β βββ createUser.resolver.ts
β βββ userStore.ts # Mock data
βββ src/
β βββ main.ts # App entry point
β βββ app.ts # Demo UI
βββ index.html
The demo includes a simple User API with:
query GetUser($id: ID!) {
getUser(id: $id) {
id
email
name
createdAt
}
}mutation CreateUser($input: CreateUserInput!) {
createUser(input: $input) {
id
email
name
createdAt
}
}This starter supports all Nitro deployment presets. Check the Nitro deployment documentation for more details.
# Build for production
npm run build
# Deploy to your favorite platform
# Vercel, Netlify, Cloudflare Workers, AWS, etc.MIT