Development Environment Setup
This guide will help you set up your development environment with all the necessary tools and configurations.
Prerequisites
System Requirements
- macOS, Linux, or Windows with WSL2
- At least 8GB RAM
- 20GB free disk space
1. Git Setup
| Bash |
|---|
| # Install Git
# macOS
brew install git
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install git
# Configure Git
git config --global user.name "Your Name"
git config --global user.email "your.email@company.com"
# Set up SSH key for GitHub/GitLab
ssh-keygen -t ed25519 -C "your.email@company.com"
|
Add your SSH key to GitHub/GitLab following their respective guides.
2. Node.js Environment
We use nvm to manage Node.js versions:
| Bash |
|---|
| # Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Install and use Node.js LTS
nvm install --lts
nvm use --lts
# Install global packages
npm install -g @nestjs/cli
npm install -g yarn
|
3. Docker Setup
| Bash |
|---|
| # macOS
brew install --cask docker
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install docker-ce docker-compose
|
| Bash |
|---|
| # Install ESLint and Prettier globally
npm install -g eslint prettier
# Install commitlint
npm install -g @commitlint/cli @commitlint/config-conventional
|
5. IDE Setup
We recommend using Visual Studio Code:
- Download and install VS Code
- Install required extensions:
| Text Only |
|---|
| - ESLint
- Prettier
- GitLens
- Docker
- Remote - Containers
|
| Bash |
|---|
| # PostgreSQL CLI tools
# macOS
brew install postgresql
# Ubuntu/Debian
sudo apt-get install postgresql-client
|
| Bash |
|---|
| # AWS CLI
# macOS
brew install awscli
# Ubuntu/Debian
sudo apt-get install awscli
|
Project Setup
1. Clone Standards Repository
| Bash |
|---|
| git clone git@github.com:your-org/engineering-standards.git
cd engineering-standards
|
2. Install Dependencies
| Bash |
|---|
| # Install project dependencies
npm install
# Set up git hooks
npx husky install
|
Configuration Files
1. Environment Variables
Create a .env file in your project root:
2. Git Hooks
Our pre-commit hooks will automatically:
- Lint staged files
- Run tests
- Check commit message format
Verification
Run these commands to verify your setup:
| Bash |
|---|
| # Check Git configuration
git config --list
# Verify Node.js installation
node --version
npm --version
# Check Docker installation
docker --version
docker-compose --version
# Test database connection
psql --version
# Verify cloud CLI
aws --version
|
Common Issues
Git SSH Issues
If you're having trouble with SSH:
-
Check SSH agent:
| Bash |
|---|
| eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
|
-
Test GitHub connection:
Node.js Version Issues
If nvm isn't working:
- Check your shell configuration:
| Bash |
|---|
| # Add to ~/.zshrc or ~/.bashrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
Docker Permission Issues
On Linux:
| Bash |
|---|
| # Add your user to the docker group
sudo usermod -aG docker $USER
newgrp docker
|
Next Steps
- Review our Git Standards
- Set up your first project using our Templates
- Read our Contributing Guide
Support
If you encounter any issues:
- Check our Common Issues section
- Review project-specific documentation
- Ask in the #engineering-help channel