Local Development
Practices and tools for creating productive development environments on the developer's machine, replicating production as closely as possible.
seed#local-development#dx#docker#environment#productivity
What it is
Local development is the environment where developers write and test code before sending it to CI/CD. A good local setup replicates production enough to catch problems early while maintaining a fast feedback loop.
Components
| Component | What it includes | Typical tool |
|---|---|---|
| Runtime | Correct language and version | nvm, pyenv, asdf |
| Dependencies | Databases, caches, message queues | Docker Compose, devcontainers |
| Tools | Linters, formatters, test runners | ESLint, Prettier, Vitest |
| Configuration | Environment variables, development secrets | .env.local, dotenv |
Strategies
| Strategy | Pros | Cons |
|---|---|---|
| Native installation | Fast | Version conflicts |
| Docker Compose | Isolated, reproducible | Resource overhead |
| Dev Containers | Fully reproducible | Requires Docker |
| Cloud dev environments | No local setup | Latency, cost |
Best practices
- One command to bring everything up (
make dev,pnpm dev) - Data seeds for development
- Hot reload for instant feedback
- Mocks for expensive external services
Why it matters
The quality of the local development environment determines the team's daily productivity. If compilation takes minutes, if dependencies fail, or if setup requires a 20-step document, every developer loses time that multiplies by team size.
References
- Dev Containers — Official specification.
- Docker Desktop Dev Environments — Docker, 2024. Development environments with Docker.
- Dev Containers in VS Code — Microsoft, 2024. Local development with containers in VS Code.