A modern monorepo starter template powered by Turborepo and Bun, featuring Next.js applications with shared components and configurations.
- Monorepo Architecture: Powered by Turborepo for efficient task orchestration
- Bun Package Manager: Fast, modern JavaScript runtime and package manager
- Next.js 15: Latest version with App Router and Turbopack
- Shared Components: Reusable UI component library
- TypeScript: Full type safety across all packages
- Code Quality: Biome for fast linting and formatting, Prettier for other files
- Git Hooks: Automated code quality checks with Lefthook
- CI/CD: GitHub Actions workflows for quality checks and reviews
This monorepo includes the following packages and apps:
web
: Main web application (Next.js) - http://localhost:3000docs
: Documentation site (Next.js) - http://localhost:3001
@repo/ui
: Shared React component library@repo/typescript-config
: Shared TypeScript configurations
- Bun >= 1.2.18
- Node.js >= 18
- Clone the repository:
git clone <repository-url>
cd my-turbo-stater-use-bun
- Install dependencies:
bun install
- Start development:
bun dev
Run these commands from the root directory:
# Start all apps in development mode
bun dev
# Start a specific app
bun dev --filter=web
bun dev --filter=docs
# Build all apps and packages
bun run build
# Build a specific app
bun run build --filter=web
bun run build --filter=docs
# Run type checking
bun check-types
# Format all code
bun format
# Run linting
bun lint
# Run complete check (format + lint)
bun check
# Format from root directory (affects all files)
bun format:root
my-turbo-stater-use-bun/
├── apps/
│ ├── web/ # Main web application
│ └── docs/ # Documentation site
├── packages/
│ ├── ui/ # Shared component library
│ └── typescript-config/ # Shared TypeScript configurations
├── biome.jsonc # Biome configuration
├── lefthook.yml # Git hooks configuration
├── turbo.json # Turborepo configuration
└── package.json # Root package configuration
This project uses Biome for JavaScript/TypeScript linting and formatting. Configuration is in biome.jsonc
.
Prettier is used for formatting non-JS/TS files (JSON, YAML, Markdown, etc.).
Each package has its own tsconfig.json
extending from shared configurations in @repo/typescript-config
.
Pre-commit hooks are configured with Lefthook to ensure code quality:
- Biome formatting and linting for JS/TS files
- Prettier formatting for other files
- Create a feature branch
- Make your changes
- Ensure all checks pass:
bun check
- Commit with conventional commit messages
- Create a pull request
type: subject
body (optional)
Types:
feat
: New featurefix
: Bug fixdocs
: Documentation changesstyle
: Code style changes (formatting, etc)refactor
: Code refactoringtest
: Test changeschore
: Maintenance tasksci
: CI/CD changes
This project is open source and available under the MIT License.
Built with: