A modern monorepo template powered by Turborepo, pnpm, and TypeScript.
This repository provides a production-ready monorepo structure with pre-configured tooling for building full-stack applications. It includes shared ESLint configurations for various frameworks and environments, enabling consistent code quality across all packages.
turborepo/
├── packages/ # Shared packages and configurations
│ └── eslint-config/ # ESLint configurations for different frameworks
└── apps/ # Application packages (to be added)
- Build System: Turborepo v2.7.2 - High-performance build system for JavaScript/TypeScript monorepos
- Package Manager: pnpm v10.26.2 - Fast, disk space efficient package manager
- Language: TypeScript v5.9.2 - Typed JavaScript
- Code Quality:
- ESLint v9.39.2 - Linting with flat config support
- Prettier v3.7.4 - Code formatting with import organization and Tailwind CSS support
- Node.js >= 20
- pnpm 10.26.2 (automatically enforced via
packageManagerfield)
To create a new project based on this template:
pnpm dlx create-turbo@latest --example https://github.com/nucleus48/turborepo# Install dependencies
pnpm install# Development
pnpm dev # Run all apps in development mode
# Building
pnpm build # Build all packages and apps
# Code Quality
pnpm lint # Lint all packages
pnpm check-types # Type-check all TypeScript code
pnpm format # Format code with Prettier
# Maintenance
pnpm clean # Remove node_modules and build artifactsThe monorepo is configured with the following task pipeline (turbo.json):
- Depends on: Builds of workspace dependencies (
^build) - Inputs: Default Turbo inputs +
.env*files - Outputs:
.next/**,dist/**,.expo/**(cache excluded for.next/cache)
- Caching: Disabled (always runs fresh)
- Persistent: Keeps running in watch mode
- Depends on: Respective tasks in workspace dependencies
- Caching: Enabled for faster subsequent runs
- Caching: Disabled (always executes)
The base TypeScript configuration (tsconfig.base.json) includes:
- Target: ESNext with modern module resolution
- Strict Mode: Enabled for maximum type safety
- Module Resolution: Bundler-compatible
- Compiler Options:
- JSON module support
- Isolated modules for better build performance
- No emit (handled by build tools)
- Incremental compilation
Code formatting is handled by Prettier with the following plugins:
- prettier-plugin-organize-imports: Automatically organizes imports
- prettier-plugin-tailwindcss: Sorts Tailwind CSS classes
The monorepo uses pnpm workspaces with the following structure:
apps/*- Application packagespackages/*- Shared libraries and configurations
Comprehensive ESLint configurations for multiple frameworks and environments:
- Base configuration with TypeScript support
- Next.js with React Compiler support
- Expo/React Native
- NestJS
- Convex
- React (internal/library development)
See the eslint-config README for detailed usage.
- Add a new app: Create a new directory in
apps/with its ownpackage.json - Add a new package: Create a new directory in
packages/with its ownpackage.json - Install dependencies: Run
pnpm installat the root - Development: Use
pnpm devto start all apps in watch mode - Build: Use
pnpm buildto build all packages and apps
✅ Fast builds with Turborepo's caching and parallel execution
✅ Shared configurations for ESLint across different frameworks
✅ Type-safe with strict TypeScript configuration
✅ Modern tooling with flat ESLint configs and latest standards
✅ Consistent formatting with Prettier and auto-import organization
✅ Workspace protocol for efficient local package linking
Global environment variables can be configured in turbo.json under globalEnv. Currently configured:
NODE_ENV- Automatically available to all tasks
UNLICENSED - Private repository
Built with ❤️ using Turborepo