-
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
cyclonite69 edited this page Feb 7, 2026
·
1 revision
Complete setup instructions for ShadowCheck development and production environments.
| Software | Version | Purpose |
|---|---|---|
| Node.js | 20+ | Runtime environment |
| PostgreSQL | 18+ | Database with PostGIS extension |
| Docker | 20.10+ | Containerization (optional but recommended) |
| Git | 2.30+ | Version control |
Minimum:
- CPU: 2 cores
- RAM: 4 GB
- Storage: 20 GB SSD
Recommended:
- CPU: 4 cores
- RAM: 8 GB
- Storage: 50 GB SSD
git clone https://github.com/cyclonite69/shadowcheck-static.git
cd shadowcheck-staticnpm install# Start PostgreSQL with PostGIS
docker-compose up -d postgres
# Verify it's running
docker ps | grep shadowcheck_postgres-- Create database users
CREATE ROLE shadowcheck_user WITH LOGIN PASSWORD 'your_password';
CREATE ROLE shadowcheck_admin WITH LOGIN PASSWORD 'admin_password';
-- Create database
CREATE DATABASE shadowcheck_db OWNER shadowcheck_admin;
\c shadowcheck_db
CREATE EXTENSION postgis;# Copy example environment file
cp .env.example .env
# Edit with your settings
nano .envEssential environment variables:
# Database
DB_USER=shadowcheck_user
DB_HOST=localhost
DB_NAME=shadowcheck_db
DB_PORT=5432
# Server
PORT=3001
NODE_ENV=development
# Frontend
MAPBOX_TOKEN=pk.your_mapbox_token_here# Set database password in keyring
node scripts/set-secret.js db_password "your_password"
# Set admin password
node scripts/set-secret.js db_admin_password "admin_password"
# Set Mapbox token
node scripts/set-secret.js mapbox_token "pk.your_token"# Apply security migration
psql -U shadowcheck_admin -d shadowcheck_db -f sql/migrations/20260129_implement_db_security.sql# Terminal 1: Start backend
npm run dev
# Terminal 2: Start frontend
npm run dev:frontendAccess the application:
- Backend API: http://localhost:3001
- Frontend: http://localhost:5173
- Docker Desktop
- VS Code with Dev Containers extension
- Open in DevContainer (VS Code will prompt)
- Wait for container build (includes Node.js 20, PostgreSQL 18, PostGIS)
- Start developing:
npm run dev # Backend npm run dev:frontend # Frontend
# Configure environment
cp .env.example .env
nano .env
# Start infrastructure
docker-compose up -d# Automated setup (detects RAM, configures PostgreSQL)
./deploy/homelab/scripts/setup.sh
# Manual setup
docker-compose -f docker/infrastructure/docker-compose.postgres.yml up -d
docker-compose up -dSee deploy/homelab/README.md for hardware requirements.
# Launch Spot instance with persistent storage
./deploy/aws/scripts/launch-shadowcheck-spot.sh
# Connect via SSM
aws ssm start-session --target i-INSTANCE_ID --region us-east-1See deploy/aws/README.md for AWS infrastructure details.
# Rotate database password (auto-detects environment)
./scripts/rotate-db-password.shRecommended schedule: Every 60-90 days
See deploy/aws/docs/PASSWORD_ROTATION.md for detailed procedures.
# Test API
curl http://localhost:3001/api/dashboard-metrics
# Run tests
npm test