Installation Guide¶
Complete installation guide for setting up FireBreak on your local machine.
System Requirements¶
Hardware Requirements¶
- CPU: 2+ cores recommended
- RAM: 4GB minimum, 8GB recommended
- Storage: 2GB free space
Software Requirements¶
| Software | Version | Purpose |
|---|---|---|
| Node.js | 20+ | JavaScript runtime for frontend and Wrangler |
| npm | 10+ | Package manager |
| Python | 3.11+ | Backend runtime |
| pip | Latest | Python package manager |
| Git | Latest | Version control |
Optional Tools¶
- Wrangler CLI: For Cloudflare Workers (installed via npm)
- Playwright: For E2E testing (installed via npm)
- pytest: For backend testing (installed via pip)
Installation Steps¶
1. Install Node.js and npm¶
2. Install Python¶
- Download Python installer from python.org
- Run installer, check "Add Python to PATH"
- Verify in PowerShell:
3. Clone the Repository¶
# Clone the repository
git clone https://github.com/firebreakrisk/firestorm.git
cd firestorm
# Verify structure
ls -la
You should see:
4. Install Backend Dependencies¶
cd backend
# Install Wrangler CLI and Node dependencies
npm install
# Install Python dependencies
pip install -r requirements.txt
# Install development/testing dependencies
pip install -r requirements-dev.txt
# Verify Wrangler installation
npx wrangler --version
# Verify Python packages
pip list | grep pytest
pip list | grep cloudflare
cd ..
5. Install Frontend Dependencies¶
cd frontend/core
# Install npm dependencies
npm install
# Verify installation
npm list --depth=0
cd ../..
6. Install QA Dependencies¶
cd qa
# Install Python testing dependencies
pip install -r requirements.txt
# Install Playwright browsers
npx playwright install --with-deps
# Verify Playwright installation
npx playwright --version
cd ..
Verify Installation¶
Backend Verification¶
cd backend
# Check Python syntax
python -c "import sys; print(f'Python {sys.version}')"
# Run a simple smoke test
pytest tests/test_smoke.py -v
# Start development server (Ctrl+C to stop)
npx wrangler dev --env local
Frontend Verification¶
cd frontend/core
# Check TypeScript compilation
npm run type-check
# Run tests
npm test
# Start development server (Ctrl+C to stop)
npm run dev
QA Verification¶
cd qa
# Run smoke tests
pytest -v -m smoke
# Run Playwright smoke tests
npx playwright test --grep smoke
Environment Setup¶
Create Environment Files¶
Edit .env with your local settings:
ENVIRONMENT=local
API_VERSION=v1
DEBUG=true
# Optional: API keys for testing (can use mock data without these)
# OPENAI_API_KEY=sk-...
# ANTHROPIC_API_KEY=sk-ant-...
# GOOGLE_API_KEY=...
Configure Wrangler¶
The backend includes a wrangler.jsonc configuration file. Review it:
For local development, you don't need to modify this file.
Common Installation Issues¶
Issue: Node.js Version Too Old¶
Error: error: The engine "node" is incompatible with this module
Solution:
# Check current version
node --version
# Update to Node 20+
brew upgrade node # macOS
# OR download from nodejs.org
Issue: Python Module Not Found¶
Error: ModuleNotFoundError: No module named 'pytest'
Solution:
cd backend
pip install -r requirements.txt -r requirements-dev.txt
# If using virtual environment:
python -m venv venv
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windows
pip install -r requirements.txt -r requirements-dev.txt
Issue: Playwright Browsers Not Installed¶
Error: browserType.launch: Executable doesn't exist
Solution:
Issue: Port Already in Use¶
Error: Error: listen EADDRINUSE: address already in use :::8787
Solution:
# Find and kill process using port 8787
lsof -ti:8787 | xargs kill -9 # macOS/Linux
# OR use a different port
npx wrangler dev --env local --port 8788
Virtual Environment (Recommended)¶
Using Python virtual environments is recommended to isolate dependencies:
# Create virtual environment
python -m venv venv
# Activate virtual environment
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windows
# Install dependencies
cd backend
pip install -r requirements.txt -r requirements-dev.txt
cd ../qa
pip install -r requirements.txt
# Deactivate when done
deactivate
Next Steps¶
Now that installation is complete:
- Configuration Guide - Configure your environment
- Quick Start - Start the development servers
- Local Development - Set up your development workflow
- First Deployment - Deploy to staging