Quick reference for starting the SHATTERED development environment.
- PostgreSQL 15+ with pgvector extension - All data storage (documents, vectors, job queue)
- Python 3.10+
- Node.js 18+
- npm
The easiest way to run SHATTERED is with Docker Compose:
# Start all services (PostgreSQL + App)
docker compose up -d
# View logs
docker compose logs -f app
# Stop services
docker compose down
# Stop and delete all data
docker compose down -vAccess Points:
- UI: http://localhost:8100
- API Docs: http://localhost:8100/docs
- Health: http://localhost:8100/health
Start PostgreSQL with the pgvector extension:
# Using Docker for PostgreSQL only
docker compose up -d postgresOr use a local PostgreSQL instance with pgvector installed:
export DATABASE_URL=postgresql://arkham:arkhampass@localhost:5432/arkhamdbThe migration script (migrations/001_consolidation.sql) creates required extensions and schemas automatically.
# Install the Frame (required)
cd packages/arkham-frame && pip install -e .
# Install all shards
for dir in packages/arkham-shard-*/; do pip install -e "$dir"; done
# Or install specific shards
pip install -e packages/arkham-shard-dashboard
pip install -e packages/arkham-shard-ach
pip install -e packages/arkham-shard-ingest
# ... etcpython -m spacy download en_core_web_smcd packages/arkham-shard-shell && npm installpython -m uvicorn arkham_frame.main:app --host 127.0.0.1 --port 8100With auto-reload for development:
python -m uvicorn arkham_frame.main:app --host 127.0.0.1 --port 8100 --reloadIn a new terminal:
cd packages/arkham-shard-shell
npm run dev| Service | URL | Description |
|---|---|---|
| UI Shell | http://localhost:5173 | Development UI (Vite) |
| Backend API | http://localhost:8100 | FastAPI backend |
| Health Check | http://localhost:8100/health | Service status |
| API Docs | http://localhost:8100/docs | Swagger UI |
| OpenAPI Spec | http://localhost:8100/openapi.json | API specification |
When using Docker Compose, both UI and API are served from port 8100.
SHATTERED uses a PostgreSQL-only architecture:
| Component | Technology | Purpose |
|---|---|---|
| Database | PostgreSQL 15+ | Relational data, schema per shard |
| Vectors | pgvector extension | Semantic search, embeddings |
| Job Queue | PostgreSQL (SKIP LOCKED) | Background task processing |
| Events | PostgreSQL LISTEN/NOTIFY | Real-time event distribution |
This consolidation (replacing Redis + Qdrant) provides:
- Single dependency for deployment
- Air-gap compatible operation
- ACID transactions across vectors and data
- Simplified operations
All shards auto-register when installed:
| Category | Shards |
|---|---|
| System | dashboard, projects, settings |
| Data | ingest, documents, parse, embed, ocr, entities |
| Search | search |
| Analysis | ach, claims, credibility, contradictions, anomalies, patterns, provenance, summary |
| Visualize | graph, timeline |
| Export | export, reports, letters, packets, templates |
Copy .env.example to .env and customize:
cp .env.example .env| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgresql://arkham:arkhampass@localhost:5432/arkhamdb |
PostgreSQL connection |
AUTH_SECRET_KEY |
(generate for prod) | JWT signing key - use openssl rand -hex 32 |
| Variable | Default | Description |
|---|---|---|
LLM_ENDPOINT |
http://localhost:1234/v1 |
LLM API endpoint (LM Studio, OpenAI, etc.) |
LM_STUDIO_URL |
- | Convenience variable for LM Studio |
VLM_ENDPOINT |
- | Vision model for OCR (Qwen-VL, GPT-4o) |
EMBED_MODEL |
all-MiniLM-L6-v2 |
Embedding model name |
LLM_API_KEY- Generic LLM API keyOPENAI_API_KEY- OpenAIOPENROUTER_API_KEY- OpenRouterANTHROPIC_API_KEY- AnthropicTOGETHER_API_KEY- Together AIGROQ_API_KEY- Groq
| Variable | Default | Description |
|---|---|---|
CORS_ORIGINS |
localhost:5173,localhost:8100 |
Allowed CORS origins |
ARKHAM_OFFLINE_MODE |
false |
Air-gap mode (no model downloads) |
ARKHAM_SERVE_SHELL |
false |
Serve static UI from backend |
Workers auto-spawn when jobs are submitted. Available pools:
| Pool | Type | Workers | Purpose |
|---|---|---|---|
io-file |
IO | 20 | File operations |
io-db |
IO | 10 | Database operations |
cpu-light |
CPU | 50 | Light processing |
cpu-heavy |
CPU | 6 | Heavy computations |
cpu-ner |
CPU | 8 | Named Entity Recognition |
cpu-extract |
CPU | 4 | Data extraction |
cpu-image |
CPU | 4 | Image processing |
cpu-archive |
CPU | 2 | Archive processing |
gpu-paddle |
GPU | 1 | OCR (2GB VRAM) |
gpu-qwen |
GPU | 1 | Vision tasks (8GB VRAM) |
gpu-whisper |
GPU | 1 | Audio transcription (4GB VRAM) |
gpu-embed |
GPU | 1 | Embedding generation (2GB VRAM) |
llm-enrich |
LLM | 4 | Data enrichment |
llm-analysis |
LLM | 2 | Analysis tasks |
Workers are managed via the Dashboard shard's Workers tab.
- Check Python version:
python --version(need 3.10+) - Verify packages installed:
pip list | grep arkham - Check port availability:
netstat -an | grep 8100 - Verify PostgreSQL is running and accessible
- Check Node version:
node --version(need 18+) - Delete node_modules and reinstall:
rm -rf node_modules && npm install - Check for port conflicts on 5173
- Verify PostgreSQL is running
- Check DATABASE_URL in .env
- Ensure database exists with pgvector extension
- Check pgvector extension is installed:
SELECT * FROM pg_extension WHERE extname = 'vector'; - Verify embedding model is downloaded (check logs for download progress)
- For air-gap mode, ensure models are pre-cached in
ARKHAM_MODEL_CACHE
- Verify shard package installed:
pip show arkham-shard-ach - Check entry_points in shard's pyproject.toml
- Look for import errors in backend logs
- Restart the backend after installing new shards
- LLM is optional - app works without it
- Check LLM_ENDPOINT in .env
- Verify LLM service is running (LM Studio, Ollama, etc.)
- Check API key is set in environment (not config file)
- Create package in
packages/arkham-shard-{name}/ - Use
arkham-shard-achas reference implementation - Add
pyproject.tomlwith entry_points - Create
shard.yamlmanifest (v5 format) - Install with
pip install -e . - Restart backend to discover
- Backend: Use
--reloadflag with uvicorn - Frontend: Vite HMR is automatic
curl http://localhost:8100/api/shards | jqcurl http://localhost:8100/health | jq# Docker
docker compose down
# Manual
# Ctrl+C in each terminal, or:
# Windows
netstat -ano | findstr :8100
taskkill /PID <pid> /F
# Linux/Mac
lsof -i :8100
kill -9 <pid>