Turbo Setup: Next.js 16.0.10 + React Compiler & TailwindCSS Boilerplate

Kickstart your next project with a cutting-edge, production-ready Next.js 16.0.10 boilerplate with React Compiler enabled. Enjoy seamless TypeScript integration, rapid UI development with TailwindCSS v4, and a suite of modern tools for code quality, state management, and internationalization. Build faster, scale easier, and deliver with confidence.

✨ Features

  • šŸš€ Next.js 16.0.10 – Latest Next.js for modern web apps.
  • āš›ļø React Compiler – Automatic optimization enabled natively in Next.js 16.
  • šŸ“ TypeScript – Type-safe coding for reliability.
  • šŸŽØ TailwindCSS v4 – Rapid, beautiful UI development.
  • 🌐 i18n Support – Multilanguage support (English & Korean) with next-intl.
  • šŸ” ESLint + Prettier – Consistent code style and quality.
  • šŸŖ Husky Git Hooks – Automated checks before every commit.
  • šŸ·ļø Conventional Commits – Standardized commit messages.
  • šŸ”„ Nuqs – Advanced URL query state management with type safety.
  • ⚔ Custom useFetch Hook – Lightweight data fetching with loading and error states.
  • šŸ“¦ Zustand State Management – Simple and scalable state management.
  • šŸŽÆ Path Aliases – Clean and easy imports.
  • šŸ”’ Type-Safe API Calls – Secure and robust API integration.
  • šŸ” Enhanced Cookie Management – with client/server separation.
  • šŸ›”ļø Middleware-based Authentication – for route protection.
  • šŸ“ Snake-case File Naming – Consistent file organization convention.

šŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • Bun

Installation

  1. Install command:
npx turbo-setup nextjs-tailwind
  1. Install dependencies:
bun install
  1. Set up environment variables:
# Copy the example environment file
cp .env.example .env.local

# Edit the environment variables
# NEXT_PUBLIC_ENV=development
# NEXT_PUBLIC_API_URL=https://your-api-url.com

Development

Start the development server:

# Development (with Webpack)
bun run dev

# The application will be available at http://localhost:8000

Building

# Production build
bun run build

šŸ“ Project Structure

messages/ # Translation message files
ā”œā”€ā”€ [locale].json
src/
ā”œā”€ā”€ app/ # Next.js app directory with route handlers
ā”œā”€ā”€ components/ # Reusable UI components
ā”œā”€ā”€ configs/ # Configuration files (API, env, HTTP)
ā”œā”€ā”€ constants/ # Constants and regex patterns
ā”œā”€ā”€ hooks/ # Custom React hooks
ā”œā”€ā”€ i18n/ # Internationalization configuration
ā”œā”€ā”€ providers/ # React context providers
ā”œā”€ā”€ services/ # API and utility services
ā”œā”€ā”€ styles/ # Global styles and Tailwind config
ā”œā”€ā”€ types/ # TypeScript type definitions
ā”œā”€ā”€ utils/ # Utility functions
└── views/ # Page-specific view components

🌐 Internationalization

The project uses next-intl for internationalization. Currently supported languages:

  • English (en)
  • Korean (ko)

Translation Files

  • Message files are stored in /messages/{lang}.json
  • Each language has its own JSON file with nested translation keys
  • Translation files follow this structure:
{
  "lang": "english",
  "home": {
    "title": "Home",
    "welcome_to_home": "Welcome to the home page",
    // ... other translations
  }
}

Adding a New Language

  1. Create a new JSON file in /messages/{lang}.json
  2. Add the language code to the locales array in src/i18n/config.ts
export const locales = ['en', 'ko', 'your-new-locale'] as const

Using Translations

import {useTranslations} from 'next-intl'

const Component = () => {
  const t = useTranslations()
  return <div>{t('home.welcome_to_home')}</div>
}

Configuration

The internationalization setup is configured in:

  • next.config.ts - Next.js configuration with next-intl plugin
  • src/i18n/config.ts - Locale configuration and defaults
  • src/i18n/request.ts - Server-side locale detection

šŸŖ Git Hooks

This project uses Husky for Git hooks:

  • Pre-commit: Runs TypeScript compilation, lint-staged, and build
  • Commit message: Enforces conventional commit messages

āš™ļø Environment Variables

The project supports multiple environments:

  • Development (.env.dev)
  • Staging (.env.staging)
  • Production (.env.prod)

Required environment variables:

NEXT_PUBLIC_ENV=development
NEXT_PUBLIC_USER_API_URL=https://your-api-url.com
NEXT_PUBLIC_API_URL=https://your-api-url.com

React Compiler

The project uses React Compiler for automatic optimization of React components. The compiler is enabled in next.config.ts with reactCompiler: true.

Benefits include automatic memoization, performance optimization, and zero configuration - Next.js 16 handles it natively.