bun run <script> from the project root.
Development
bun dev
Start all development servers in parallel using Turborepo’s TUI (Terminal UI).
- Hono API on
http://localhost:8787(hot reload enabled) - Next.js app on
http://localhost:3000(fast refresh enabled)
The TUI shows real-time logs for each workspace and allows you to filter by service.
Workspace-Specific Dev Scripts
Run dev mode for individual workspaces:Building
bun run build
Build all packages for production.
- Builds packages in dependency order
- Caches builds using Turborepo
- Shows a summary of build results
api/hono/dist/- Compiled Hono APIweb/next/.next/- Next.js production buildpackages/*/dist/- Compiled package bundles
bun run check-types
Run TypeScript type checking across all workspaces without emitting files.
- CI/CD pipelines
- Pre-commit hooks
- Quick validation before building
Database
bun run db:generate
Generate database migrations from Drizzle schema.
bun run db:migrate
Apply pending migrations to the database.
bun run db:studio
Open Drizzle Studio - a visual database browser.
https://local.drizzle.studio
Features:
- Browse tables and data
- Run queries
- Edit records
- View relationships
Production
bun run start
Start all production servers.
bun dist/index.mjsfor Hono APInext startfor Next.js
Must run
bun run build first to create production bundles.Code Quality
bun run format
Format all code with Oxfmt.
- TypeScript/JavaScript files
- JSON files
- MDX/Markdown (in content directories)
bun run format:check
Check formatting without making changes.
bun run lint
Lint all workspaces using Oxlint.
- Code quality issues
- Potential bugs
- Best practice violations
Maintenance
bun run clean
Remove all build artifacts and dependencies.
.next/directories.turbo/cachedist/build outputsnode_modules/across all workspaces- Empty directories
bun run shadcn:update
Update all Shadcn UI components to their latest versions.
- Fetches latest component versions
- Updates components in
web/next/src/components/ui - Preserves your customizations when possible
Git Hooks
bun run prepare
Install Lefthook git hooks.
bun install.
Configured hooks:
- Pre-commit: Runs
lint-stagedfor formatting and linting - Commit-msg: Validates commit messages with
commitlint
See
.lefthook.yml for hook configuration.DevTools
bun run devtools
Open Turborepo DevTools for monitoring builds and cache.
- Build visualization
- Cache hit rates
- Dependency graph
- Performance metrics
Workspace Scripts
Run scripts in specific workspaces using Turbo’s--filter flag:
Custom Script Examples
Add these to your rootpackage.json for common workflows:
package.json
CI/CD Scripts
Recommended script order for continuous integration:Script Options
Common Turborepo options that work with any script:Environment Variables
Some scripts require environment variables. Ensure your.env file is configured:
.env
Troubleshooting
Next Steps
Project Structure
Understand the monorepo organization
Environment Variables
Configure your environment
Deployment
Deploy to production
Turborepo Docs
Learn more about Turborepo