Local Development Setup¶
Get your development environment running in under 10 minutes.
Time to read: ~5 min Prerequisites: Python 3.14+, Node.js 20.19+ or 22.12+, Docker/Podman
This document provides a streamlined guide for setting up local development. For comprehensive setup details, see Development Setup.
Quick Setup¶
# Clone repository
git clone https://github.com/your-org/home-security-intelligence.git
cd home-security-intelligence
# Run automated setup
python setup.py
The setup script:
- Creates Python virtual environment (
.venv) - Installs backend dependencies
- Installs frontend dependencies
- Configures pre-commit hooks
Manual Setup¶
1. Backend¶
# Install dependencies using uv (recommended - 10-100x faster than pip)
# Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --extra dev
# This creates .venv and installs all dependencies from pyproject.toml
# Activate the environment for manual commands
source .venv/bin/activate
2. Frontend¶
3. Pre-commit Hooks¶
# Install hooks (CRITICAL - never bypass)
pre-commit install
pre-commit install --hook-type pre-push
4. Infrastructure¶
# Start PostgreSQL and Redis
podman-compose -f docker-compose.prod.yml up -d postgres redis
# Verify
podman ps
5. Environment¶
# Run the setup script to generate .env with secure credentials (recommended)
python setup.py
# Or manually copy and edit:
cp .env.example .env
# Generate a secure password: openssl rand -base64 32
# Then edit .env:
# DATABASE_URL=postgresql+asyncpg://security:<your-password>@localhost:5432/security
# REDIS_URL=redis://localhost:6379/0
Running the Stack¶
Backend:
Frontend:
Full stack with AI (optional):
Verification¶
# Run validation suite
./scripts/validate.sh
# Backend tests
pytest backend/tests/ -v
# Frontend tests
cd frontend && npm test
Next Steps¶
- Codebase Tour - Understand the directory structure
- Hooks - Pre-commit configuration
- Pipeline Overview - AI processing flow
See Also¶
- GPU Setup - GPU driver configuration for AI
- Database Management - PostgreSQL setup
- Environment Variable Reference - Configuration options