This guide covers how to set up your local development environment for contributing to Coffee Code Philly projects.
- General Prerequisites
- Git Configuration
- Python Projects
- Node.js Projects
- Docker Projects
- IDE Configuration
- Troubleshooting
-
Git (version control)
# macOS (using Homebrew) brew install git # Ubuntu/Debian sudo apt-get install git # Windows # Download from https://git-scm.com/download/win
-
GitHub Account
- Create account at github.com
- Set up SSH keys (recommended)
- Enable two-factor authentication
-
Code Editor
- VS Code (recommended)
- Sublime Text
- Vim / Neovim
- Or your preferred editor
# Set your name and email
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# Set default branch name
git config --global init.defaultBranch main
# Enable color output
git config --global color.ui auto
# Set default editor (optional)
git config --global core.editor "code --wait" # VS Code
# or
git config --global core.editor "vim" # Vim# Useful shortcuts
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"# Generate SSH key
ssh-keygen -t ed25519 -C "your.email@example.com"
# Start ssh-agent
eval "$(ssh-agent -s)"
# Add your key
ssh-add ~/.ssh/id_ed25519
# Copy public key to clipboard (macOS)
pbcopy < ~/.ssh/id_ed25519.pub
# Then add to GitHub: Settings → SSH and GPG keys → New SSH keymacOS:
# Using Homebrew
brew install python@3.11
# Verify installation
python3 --versionUbuntu/Debian:
sudo apt-get update
sudo apt-get install python3.11 python3.11-venv python3-pipWindows:
- Download from python.org
- Make sure to check "Add Python to PATH" during installation
-
Clone the repository:
git clone https://github.com/YOUR-USERNAME/REPO-NAME.git cd REPO-NAME -
Create virtual environment:
python3 -m venv venv
-
Activate virtual environment:
# macOS/Linux source venv/bin/activate # Windows venv\Scripts\activate # You should see (venv) in your prompt
-
Install dependencies:
# Development dependencies (includes testing tools, linters, etc.) pip install -r requirements-dev.txt # Or just production dependencies pip install -r requirements.txt # Or if using setup.py pip install -e ".[dev]"
-
Verify installation:
# Run tests pytest # Check linting ruff check . # Check formatting black --check . # Type checking mypy .
Install recommended development tools:
pip install black ruff mypy pytest pytest-cov- black: Code formatter
- ruff: Fast linter (replaces flake8, isort, etc.)
- mypy: Static type checker
- pytest: Testing framework
- pytest-cov: Coverage reporting
macOS:
# Using Homebrew
brew install node
# Or using nvm (recommended for managing multiple versions)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20
nvm use 20Ubuntu/Debian:
# Using NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejsWindows:
- Download from nodejs.org
- Or use nvm-windows
-
Clone the repository:
git clone https://github.com/YOUR-USERNAME/REPO-NAME.git cd REPO-NAME -
Install dependencies:
npm install # or npm ci # For clean install from package-lock.json
-
Verify installation:
# Run tests npm test # Run linter npm run lint # Check formatting npm run format:check # Type check (if TypeScript) npm run type-check # Start development server npm run dev
Recommended global tools:
npm install -g typescript eslint prettiermacOS/Windows:
- Download Docker Desktop
Ubuntu/Debian:
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add your user to docker group
sudo usermod -aG docker $USER
# Log out and back in for changes to take effect-
Build images:
docker-compose build
-
Start services:
docker-compose up # or in detached mode docker-compose up -d -
Run commands in container:
docker-compose exec web python manage.py migrate docker-compose exec web pytest
-
View logs:
docker-compose logs -f
-
Stop services:
docker-compose down
Recommended Extensions:
{
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"ms-azuretools.vscode-docker"
]
}Settings (.vscode/settings.json):
{
"editor.formatOnSave": true,
"editor.rulers": [88, 120],
"python.linting.enabled": true,
"python.linting.ruffEnabled": true,
"python.formatting.provider": "black",
"python.testing.pytestEnabled": true,
"eslint.validate": ["javascript", "typescript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}- Set Python interpreter: File → Settings → Project → Python Interpreter
- Enable black: Settings → Tools → Black
- Configure pytest: Settings → Tools → Python Integrated Tools → Testing → pytest
- Enable mypy: Install Mypy plugin
Problem: Authentication failed
# Solution: Use SSH instead of HTTPS
git remote set-url origin git@github.com:USERNAME/REPO-NAME.gitProblem: Permission denied (publickey)
# Solution: Check SSH key
ssh -T git@github.com
# If fails, follow SSH setup instructions aboveProblem: command not found: python
# Use python3 explicitly or create alias
echo "alias python=python3" >> ~/.bashrc
source ~/.bashrcProblem: pip install fails with permissions error
# Don't use sudo! Use virtual environment instead
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtProblem: Import errors
# Make sure you're in virtual environment
which python # Should point to venv/bin/python
# Reinstall dependencies
pip install -r requirements.txtProblem: npm install fails
# Clear cache and try again
npm cache clean --force
rm -rf node_modules package-lock.json
npm installProblem: EACCES permission errors
# Don't use sudo! Fix npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcProblem: Permission denied
# Add user to docker group (Linux)
sudo usermod -aG docker $USER
# Log out and back inProblem: Port already in use
# Find and kill process using port
lsof -ti:8000 | xargs kill -9
# Or change port in docker-compose.ymlIf you're stuck:
- Check repository README: Project-specific instructions
- Search existing issues: Someone may have had the same problem
- Ask in community chat: Discord/Slack (see SUPPORT.md)
- Create a discussion: GitHub Discussions
- Email us: coffeecodephl@gmail.com
Once your environment is set up:
- Read Getting Started
- Find an issue to work on
- Review Contributing Guidelines
- Make your first contribution!
Happy coding! ☕️