Initial Turborepo Setup - Creating the TurboRepo
What We Did
Section titled “What We Did”Initialized a new TurboRepo monorepo called “ember” using Bun as the package manager.
Why These Choices
Section titled “Why These Choices”TurboRepo: Provides efficient monorepo management with:
- Smart caching of build outputs
- Parallel task execution
- Clear dependency graphs between packages
Bun: Critical choice for this project because:
- Significantly faster than npm/yarn/pnpm
- Native TypeScript support
- Drop-in replacement for Node.js
- Built-in package manager, test runner, and bundler
Project Name “ember”: The chosen name for this application.
Commands Used
Section titled “Commands Used”bunx create-turbo@latestSelections made:
- Where would you like to create your Turborepo?
./ember - Which package manager do you want to use?
bun
Initial Structure Created
Section titled “Initial Structure Created”The create-turbo command generated:
ember/├── apps/│ ├── docs/ # Next.js docs app (later replaced)│ └── web/ # Next.js web application├── packages/│ ├── eslint-config/ # Shared ESLint configurations│ ├── typescript-config/ # Shared TypeScript configurations│ └── ui/ # Shared React component library├── package.json├── turbo.json└── README.mdApplication Packages
Section titled “Application Packages”apps/docs: Initially a Next.js application for documentationapps/web: Next.js 16.1.0 application with React 19
Library Packages
Section titled “Library Packages”@repo/ui: Shared React component library with Button, Card, and Code components@repo/eslint-config: ESLint configurations for base, Next.js, and React@repo/typescript-config: Shared TypeScript compiler configurations
Key Configuration Files
Section titled “Key Configuration Files”package.json (root)
Section titled “package.json (root)”- Uses Bun workspaces:
apps/*andpackages/* - Main scripts:
build,dev,lint,format,check-types - All use
turbo runfor orchestration
turbo.json
Section titled “turbo.json”- Defines task pipelines with dependency graphs
- Build outputs cached in
.next/(excluding cache directory) - Dev tasks run persistently without caching
Context for AI
Section titled “Context for AI”When working in this codebase:
- Always use
buncommands, nevernpmoryarn - Use
turbo --filter=<package>to target specific packages - The monorepo pattern means changes in
packages/*affectapps/* - All packages share TypeScript and ESLint configurations for consistency
Next Steps
Section titled “Next Steps”After initialization, we:
- Navigated to the project:
cd ember - Verified the structure:
ls - Prepared to replace the docs app with Astro (see next guide)