Skip to content

Development Setup

Before starting, ensure you have:

  • Company laptop set up
  • GitHub account with OpticWorks organization access
  • VPN access configured
  • 1Password installed and configured
Terminal window
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Terminal window
# Install core development tools
brew install git node python3 postgresql redis docker
# Install useful utilities
brew install wget curl jq tree htop
Terminal window
# Update package list
sudo apt update && sudo apt upgrade -y
# Install essential tools
sudo apt install -y git build-essential curl wget
# Install Node.js (via nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
  1. Install Windows Subsystem for Linux (WSL 2)
  2. Install Windows Terminal
  3. Follow Linux setup instructions within WSL
  4. Install Docker Desktop for Windows
Terminal window
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Install Node.js LTS
nvm install --lts
nvm use --lts
# Verify installation
node --version
npm --version
Terminal window
npm install -g \
typescript \
ts-node \
eslint \
prettier \
nodemon \
pm2
Terminal window
# Set your identity
git config --global user.name "Your Name"
git config --global user.email "your.email@opticworks.com"
# Set default branch name
git config --global init.defaultBranch main
# Enable helpful features
git config --global pull.rebase true
git config --global fetch.prune true
git config --global core.editor "code --wait"
# Setup SSH key for GitHub
ssh-keygen -t ed25519 -C "your.email@opticworks.com"

Add your SSH key to GitHub:

  1. Copy your public key: cat ~/.ssh/id_ed25519.pub
  2. Go to GitHub Settings → SSH Keys
  3. Click “New SSH Key” and paste

Download from: code.visualstudio.com

Essential Extensions:

Terminal window
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension eamodio.gitlens
code --install-extension ms-azuretools.vscode-docker
code --install-extension bradlc.vscode-tailwindcss
code --install-extension prisma.prisma
code --install-extension ms-vscode.vscode-typescript-next

Settings (settings.json):

{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.updateImportsOnFileMove.enabled": "always"
}
Terminal window
brew install --cask docker
Terminal window
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add user to docker group
sudo usermod -aG docker $USER
# Install Docker Compose
sudo apt install docker-compose-plugin

Verify installation:

Terminal window
docker --version
docker compose version
Terminal window
# macOS
brew install postgresql@15
brew services start postgresql@15
# Linux
sudo apt install postgresql postgresql-contrib
  • GUI: TablePlus (recommended)
  • CLI: psql (included with PostgreSQL)
  • VS Code Extension: PostgreSQL by Microsoft

Download from: postman.com/downloads

Company Workspace:

  • Join OpticWorks team workspace
  • Import shared collections
  • Set up environment variables
Terminal window
# macOS
brew install httpie
# Linux
sudo apt install httpie
Terminal window
# Create workspace directory
mkdir -p ~/workspace/opticworks
cd ~/workspace/opticworks
# Clone main projects
git clone git@github.com:opticworks/platform.git
git clone git@github.com:opticworks/web-app.git
git clone git@github.com:opticworks/mobile-app.git

Each project requires environment variables:

Terminal window
# Copy example env file
cp .env.example .env
# Edit with your values
code .env
Terminal window
# For Node.js projects
npm install
# Or if using yarn
yarn install
Terminal window
# Create local database
createdb opticworks_dev
# Run migrations
npm run db:migrate
# Seed database with test data
npm run db:seed
Terminal window
# Standard start
npm run dev
# With debugging
npm run dev:debug
# Watch mode with auto-reload
npm run dev:watch

The app should now be running at http://localhost:3000

Terminal window
# macOS
brew install redis
brew services start redis
# Linux
sudo apt install redis-server
sudo systemctl start redis
Terminal window
# Using Docker (recommended)
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
Terminal window
# Database
DATABASE_URL="postgresql://localhost:5432/opticworks_dev"
# Redis
REDIS_URL="redis://localhost:6379"
# API Keys (get from 1Password)
API_SECRET_KEY="<from-1password>"
STRIPE_SECRET_KEY="<from-1password>"
# External Services
AWS_ACCESS_KEY_ID="<from-1password>"
AWS_SECRET_ACCESS_KEY="<from-1password>"
# Feature Flags
ENABLE_NEW_FEATURE=true
DEBUG_MODE=true
Terminal window
# Unit tests
npm test
# Integration tests
npm run test:integration
# E2E tests
npm run test:e2e
# All tests
npm run test:all
Terminal window
# Check code style
npm run lint
# Fix auto-fixable issues
npm run lint:fix
# Format code
npm run format
Terminal window
# Development build
npm run build:dev
# Production build
npm run build
Terminal window
# Find and kill process on port 3000
lsof -ti:3000 | xargs kill -9
Terminal window
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm cache clean --force
npm install
Terminal window
# Reset Docker
docker system prune -a
# Restart Docker service
# macOS: Restart Docker Desktop
# Linux: sudo systemctl restart docker
Terminal window
# Check PostgreSQL is running
# macOS: brew services list
# Linux: sudo systemctl status postgresql
# Test connection
psql -h localhost -U postgres
  1. Start development services

    Terminal window
    docker compose up -d
  2. Pull latest changes

    Terminal window
    git pull origin main
  3. Install any new dependencies

    Terminal window
    npm install
  4. Run migrations if needed

    Terminal window
    npm run db:migrate
  5. Start dev server

    Terminal window
    npm run dev
Terminal window
# Run pre-commit checks
npm run lint
npm run format
npm test
  • Slack: #engineering channel
  • Documentation: Internal wiki
  • Code reviews: Ask senior developers
  • Pair programming: Schedule time with teammates
  1. ✅ Complete this setup guide
  2. Read Code Standards
  3. Review Git Workflow
  4. Pick up your first task from Jira
  5. Submit your first pull request!

Welcome to the OpticWorks development team! 🚀