Skip to content

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

Required Tools

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
1
2
3
4
5
6
# macOS
brew install --cask docker

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install docker-ce docker-compose

4. Code Quality Tools

Bash
1
2
3
4
5
# 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:

  1. Download and install VS Code
  2. Install required extensions:
    Text Only
    1
    2
    3
    4
    5
    - ESLint
    - Prettier
    - GitLens
    - Docker
    - Remote - Containers
    

6. Database Tools

Bash
1
2
3
4
5
6
# PostgreSQL CLI tools
# macOS
brew install postgresql

# Ubuntu/Debian
sudo apt-get install postgresql-client

7. Cloud CLI Tools

Bash
1
2
3
4
5
6
# 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
1
2
3
4
5
# 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:

Bash
cp .env.example .env

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:

  1. Check SSH agent:

    Bash
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_ed25519
    

  2. Test GitHub connection:

    Bash
    ssh -T git@github.com
    

Node.js Version Issues

If nvm isn't working:

  1. Check your shell configuration:
    Bash
    1
    2
    3
    # 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
1
2
3
# Add your user to the docker group
sudo usermod -aG docker $USER
newgrp docker

Next Steps

  1. Review our Git Standards
  2. Set up your first project using our Templates
  3. Read our Contributing Guide

Support

If you encounter any issues:

  1. Check our Common Issues section
  2. Review project-specific documentation
  3. Ask in the #engineering-help channel