Back to blog
The Power of Monorepo Architecture
9/26/2026Why Monorepo?
A monorepo keeps your entire application — backend, frontend, shared types, and tooling — in a single repository. This has several advantages:
- Shared types — Define your API types once, use them everywhere
- Atomic changes — Update backend and frontend in one commit
- Simplified CI/CD — One pipeline to build and deploy everything
- Better developer experience — No context switching between repos
Turborepo Integration
Grit uses Turborepo for task orchestration. When you run turbo dev, it starts all your apps in parallel with intelligent caching:
turbo dev
# Starts:
# → apps/api (Go API on :8080)
# → apps/web (Next.js on :3000)
# → apps/admin (Admin panel on :3001)Shared Package
The packages/shared directory contains Zod schemas, TypeScript types, and API route constants that are shared between the web app and admin panel. When the API changes, update the shared types and both frontends stay in sync.