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
- Install command:
npx turbo-setup nextjs-tailwind- Install dependencies:
bun install- 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.comDevelopment
Start the development server:
# Development (with Webpack)
bun run dev
# The application will be available at http://localhost:8000Building
# 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
- Create a new JSON file in
/messages/{lang}.json - Add the language code to the locales array in
src/i18n/config.ts
export const locales = ['en', 'ko', 'your-new-locale'] as constUsing 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 pluginsrc/i18n/config.ts- Locale configuration and defaultssrc/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.comReact 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.