//better-nuxt-graphql-starter-kitbyproductdevbook

better-nuxt-graphql-starter-kit

6
1
6
1
TypeScript

Better Nuxt GraphQL Starter Kit

⚠️ Work in Progress - This project is currently under active development and not yet ready for production use.

A modern, production-ready starter template built with Nuxt 4, featuring GraphQL API, authentication, database management, file uploads, and state management.

πŸš€ Features

  • undefinedNuxt 4 - The latest version of the Vue.js meta-framework
  • undefinedNitro GraphQL - Native GraphQL support for Nitro server
  • undefinedBetter Auth - Modern authentication system with social providers
  • undefinedDrizzle ORM - TypeScript ORM with SQL-like syntax
  • undefinedPinia Colada - Smart data fetching and caching for Pinia
  • undefinedFile Upload - Built-in image/file upload handling with optimization
  • undefinedTypeScript - Full type safety across the stack
  • undefinedAuto-imports - Components, composables, and utilities auto-imported
  • undefinedSSR/SSG Ready - Server-side rendering and static generation support

πŸ“‹ Prerequisites

  • Node.js 22+
  • pnpm +10.13 (recommended) or npm/yarn
  • PostgreSQL database (for Drizzle ORM)

πŸ› οΈ Installation

  1. undefinedClone the repositoryundefined
git clone https://github.com/productdevbook/better-nuxt-graphql-starter-kit.git
cd better-nuxt-graphql-starter-kit
  1. undefinedInstall dependenciesundefined
pnpm install
  1. undefinedEnvironment Setupundefined

Create a .env file in the root directory:

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"

# Better Auth
AUTH_SECRET="your-auth-secret-here"
AUTH_URL="http://localhost:3000"

# OAuth Providers (optional)
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""

# File Upload
UPLOAD_DIR="./uploads"
MAX_FILE_SIZE="10485760"  # 10MB in bytes
  1. undefinedDatabase Setupundefined

Initialize the database with Drizzle:

pnpm db:generate   # Generate migrations
pnpm db:migrate    # Run migrations
pnpm db:studio     # Open Drizzle Studio (optional)

πŸš€ Development

Start the development server:

pnpm dev

The application will be available at http://localhost:3000

Available Scripts

pnpm dev          # Start development server
pnpm build        # Build for production
pnpm preview      # Preview production build
pnpm generate     # Generate static site
pnpm typecheck    # Run TypeScript type checking
pnpm lint         # Run ESLint
pnpm lint:fix     # Fix ESLint issues

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support


Built with ❀️ by productdevbook

[beta]v0.14.0