- Knowledge
- technology
- OOP
- Tips
- Programming
- Tips
- Tutorial
- SEO
- Ranking
- Knowledge
- Special Day
- Seo
- Bug
- Data science
- Seo
- artificial intelligence
- Machine Learning
- Robotics
- happyNewYear2021
- newYearEve
- 2021
- Automation
- Smart Home
- Career
- Best Practices
- Git
- Logging
- Web Fundamentals
- DNS
- HTTPS
- Performance
- AI Tools
- ChatGPT
- Claude
- Gemini
- Laravel
- Eloquent
- MySQL
- HTTPS
- TLS
- Web Security
- Certificates
- Developer Life
- Debugging
- Docker
- DevOps
- Transactions
- Queues
- LLMs
- AI
- AI Coding
- Developer Tools
- React Native
- Expo
- Kate PMS
- Mobile Apps
- Laravel
- Authentication
- Sanctum
- Cookies
- API Design
- Payments
- Idempotency
- DeepSeek
- Open Source AI
- LLMs
- AI News
- Git
- Version Control
- AI Coding
- Prompting
- PHP
- Checklist
- MCP
- AI Agents
- OpenAI
- Architecture
- Microservices
- Modular Monolith
- Estimation
- Developer Life
- Project Planning
- Humour
- OAuth
- OpenID Connect
- Authentication
- Embeddings
- Vector Search
- RAG
- pgvector
- OpenAI
- GPT-4.1
- Codex CLI
- Events
- Testing
- Clean Code
- Maintainability
- Code Review
- Webhooks
- API
- Security
- Claude Code
- Workflow
- AI
- LLM
- Prompt Injection
- Mobile
- React
- Networking
- TCP
- UDP
- HTTP/3
- CLAUDE.md
- AWS
- Cloud Security
- Backups
- PHPUnit
- Software Engineering
- Leadership
- Communication
- RAG
- Embeddings
- AI Engineering
- IT Infrastructure
- Networking
- Access Control
- CI/CD
- GitHub Actions
- Gemini CLI
- Claude Code
- JavaScript
- Async/Await
- Node.js
- Promises
- Security
- Cryptography
- Passwords
- MySQL
- Database
- Vibe Coding
- Software Quality
- DNS
- Code Reading
- Onboarding
- Productivity
- Background Jobs
- Developer Humour
- Estimates
- Dev Life
- JWT
- o3-mini
- DeepSeek R1
- Rate Limiting
- Kate PMS
- E-Signing
- Audit Trail
- REST
- GraphQL
- API Design
- Laravel 12
- Upgrade Guide
- Open Source
- Self-Hosting
- Task Scheduling
- Cron
- Secrets
- CORS
- PHP
- PHP-FPM
- OPcache
- GitHub Copilot
- Software Architecture
- Engineering
- TypeScript
- JavaScript
- Type Safety
- AI Security
- React Native
- Product Design
- AI Agents
- Kiro
- Queues
- Redis
- RabbitMQ
- AWS SQS
- Nginx
- Apache
- GPT-5
- gpt-oss
- Clean Code
- Architecture
- Naming
- Documentation
- Career
- ADR
- Teamwork
- Supply Chain
- Kate HRM
- HR Software
- Permissions
- System Design
- Pagination
- SSH
- Linux
- Big O
- Databases
- Laravel Boost
- MCP
- Developer Skills
- Validation
- Databases
- Indexes
- Code Quality
- Deployment
- Developer Humour
- Feature Flags
- Code Review
- Pull Requests
- Docker
- Cursor
- Authorization
- RBAC
- Gemini
- Long Context
- PHP 8.4
- Caching
- Dependency Injection
- Web Performance
- Browser
- CSS
- Database
- Migrations
- ChatGPT
- AI for Developers
- Monitoring
- On-Call
- REST
- Backend
- SQL
- NoSQL
- Database Design
- Coding Agents
- Claude 4
- API Resources
- REST API
- Load Balancing
- Scaling
- AWS
- AI Tools
- Claude
- Sora 2
- CTE
- 2FA
- TOTP
- Programming Languages
- Prompts
- Developer Workflow
- API Gateway
- APIs
- Passport
- API Auth
- Learning
- Burnout
- Developer Growth
- Web Development
- SEO
- Kate Mall
- ChatGPT Atlas
- Agent Skills
- Middleware
- Laravel 12
- Collections
- Context Window
- Monitoring
- Commit Messages
- Self Review
- Growth
- Regex
- Programming Basics
- Text Processing
- Database Design
- Normalization
- Linux
- Server Security
- Linux Foundation
- Open Standards
- Legacy Code
- Documentation
- AI Workflow
- File Uploads
- Test Data
- Hashing
- Performance
- Caching
- Enums
- Scope Creep
- Estimation
- Codex
- Gemini CLI
- Timezones
- Carbon
- Bugs
- PHP 8.5
- Gemini 3
- GPT-5.1
- Data Integrity
- Event Loop
- Async
- Opus 4.5
- AI Models
- React
- Forms
- Frontend
- Backups
- AI Images
- DALL-E
- Midjourney
- Race Conditions
- Concurrency
- Legacy Code
- Refactoring
- Senior Engineer
- Scope
- LLM
- CDN
- Web
- Sub-Agents
- Soft Deletes
- Audit Log
- Concurrency
- AI Learning
- NestJS
- AI Evals
- Policies
- SPF DKIM DMARC
- Unicode
- UTF-8
- Knowledge Graph
- Value Objects
- Technical Debt
- Feature Flags
- Laravel Pennant
- Deployment
- Copilot
- Composer
- Dependencies
- Artisan
- Automation
- AWS S3
- Object Storage
- Cloud
- Small Language Models
- Ollama
- Production
- Sessions
- HTTP
- Mentoring
- SQL
- Virtual Machines
- Web Development
- HTTP/2
- QUIC
- Web Performance
- AI Integration
- LLM API
- SOLID
- OOP
- Hosting
- Serverless
- Merge Conflicts
- Temperature
- AI Development
- Reverse Proxy
- Nginx
- Infrastructure
- Verification
- Passkeys
- WebAuthn
- Teams
- Communication
- Stakeholders
- Monorepo
- CI/CD
- Versioning
- JSON Schema
- Livewire
- Inertia
- Meetings
- Distributed Systems
- Privacy
- Full-Stack
- T-Shaped Skills
- Money
- Notifications
- Web Security
- HTTP Headers
- CSP
- Function Calling
- Load Testing
- k6
- Data Extraction
- Debugging
- WebSockets
- SSE
- Real-Time
- Laravel Reverb
- Infrastructure as Code
- Terraform
- Side Projects
- Laravel Pint
- OpenAPI
- Swagger
- UX
- Multimodal
- Jest
- Pair Programming
- APIs
- Rate Limiting
- Resilience
- Dev Humour
- Design Tokens
- JWT
- API Keys
- Sessions
- PHPStan
- Rector
- Incidents
- Reporting
- Dashboards
- Zero Trust
- IAM
- Search
- Laravel Scout
- Junior Developers
- Mentoring
- Images
- WebP
- AVIF
- Bug Reports
- Let's Encrypt
- Design Docs
- Software Design
- Observers
- Replication
- Accountability
- Data Structures
- Reliability
- LLM Memory
- Error Handling
- Payments
- Payment Gateway
- Webhooks
- PCI DSS
- Observability
- OpenTelemetry
- Personal Brand
- Writing
- Conventions
- Dates
- Scheduling
- Disaster Recovery
- Compression
- Brotli
- Deadlines
- Developer Habits
- State Machines
- Tech Roles
- UUID
- ULID
- Horizon
- Planning
- Engineering Culture
- Ownership
- Soft Skills
- Socialite
- Cost Control
- Collations
- Unicode
- Octane
- PostgreSQL
Monorepo vs Polyrepo: Which One Fits a Small Team?
About Post
You add a field to an API response. To ship it properly, you open a pull request in the backend repo, another in the web app repo, a third in the mobile app repo, and then you coordinate three reviews and three deploys so nothing breaks in between.
Or you put everything in one repository and do it in a single pull request. Then six months later, CI takes forever, every push runs every test, and someone asks why the mobile developers need to clone the entire backend.
That's the monorepo vs polyrepo debate in two paragraphs. Neither side is wrong. They just move the pain to different places, and the trick is choosing the pain your team handles best.
The two options
- Monorepo: several projects live in one Git repository, usually in folders like
apps/api,apps/web,apps/mobileandpackages/shared. - Polyrepo (or multi-repo): each project has its own repository, its own history, its own CI and its own release cycle.
One common confusion first: a monorepo is not a monolith. A monolith is one deployable application. A monorepo can hold many independently deployed services. How you store code and how you deploy it are separate decisions.
Where monorepos shine
Changes that cross projects
This is the big one. When the API, the web app and the mobile app change together, a monorepo lets you make the change in one pull request, review it as one story and test it as one unit. No "merge this first, then that" choreography.
Sharing code is just importing it
Shared TypeScript types, validation rules, UI components or API clients live in a packages/ folder and are used directly. With npm, pnpm or Yarn workspaces, there's nothing to publish and no version to bump.
One set of standards
One lint config, one formatter, one place for CI templates, one place to update a dependency everywhere. It's much harder for projects to quietly drift apart.
Where polyrepos shine
Clear ownership and access
Each repository has an obvious owner, and permissions are simple: a contractor working on the marketing site never sees the payments service. In a monorepo, access is usually all or nothing at the repository level.
Simple, fast CI by default
Every repo's pipeline only knows about its own code. Nothing to configure, nothing to filter, no chance of a docs change triggering the mobile build.
Independent lifecycles
A legacy system that changes twice a year, a fast-moving app and a shared library used by other teams can each move at their own speed and keep their own history.
Side by side
| Monorepo | Polyrepo | |
|---|---|---|
| Cross-project changes | One pull request | Several, in the right order |
| Shared code | Import directly | Publish a package, manage versions |
| CI | Needs "only build what changed" logic | Simple per repo |
| Tooling | Workspaces; Nx or Turborepo as it grows | Standard tools, repeated per repo |
| Access control | Coarse | Per repository |
| Consistency | Easy to enforce | Easy to drift |
| Ownership | Needs CODEOWNERS and discipline | Obvious by repo |
The costs nobody mentions up front
Monorepo: you must teach CI to build only what changed. On GitHub Actions, that can start as simple paths filters per workflow; larger setups use tools like Nx or Turborepo that understand the dependency graph and cache results. Without this, every push runs everything and developers start ignoring slow pipelines. Mixed stacks add friction too: a Laravel API and a React Native app have completely different tooling, and one repo doesn't make that disappear.
Polyrepo: shared code is the tax. You publish it as a package (a private npm package, or a Composer package via a VCS repository), version it, and update every consumer. In practice, consumers fall behind, and "which version of the shared types does the mobile app use?" becomes a real question. Cross-project changes need coordination and a careful deploy order.
The deciding question: how often do your projects change together? If most features touch several of them, a monorepo saves you work every week. If they rarely do, separate repos keep things simple.
What I'd do in a small team
For a small team building one product, say a Laravel API, a React web portal and a React Native app, I lean towards a monorepo for the product:
- Most features touch the API and at least one client, so single pull requests are a daily win.
- Shared TypeScript types between web and mobile stay in one place.
- With a few developers, everyone works across the stack anyway, so coarse access control isn't a real loss.
- Start with workspaces and per-app
pathsfilters in CI. Add Nx or Turborepo only when builds actually get slow.
And I'd keep separate repos for things with a different lifecycle or audience: a marketing website, infrastructure code with restricted access, a library shared across unrelated products, or anything an outside contractor works on.
You can also mix: one monorepo per product, separate repos between products. That's often the most practical answer of all.
Signs you picked the wrong one
- Monorepo pain: CI is slow because everything builds every time; teams step on each other's changes; nobody knows who owns a folder.
- Polyrepo pain: most pull requests come in pairs or triples; shared packages are always several versions behind; bugs come from API and client being out of sync.
Both are fixable without migrating, at least for a while. CODEOWNERS and CI path filters fix a lot of monorepo pain; generated API clients and contract tests fix a lot of polyrepo pain.
The short version
- Monorepo: easy cross-project changes and sharing, but CI and ownership need work.
- Polyrepo: clear boundaries and simple CI, but shared code and coordination cost more.
- Small team, one product, features that cross projects: monorepo.
- Different lifecycles, audiences or access needs: separate repos.
Which setup is your team on right now, and what's the one thing you'd change about it?

Be first to comment it...