Documentation
Self-Hosting, Bring Your Own Keys (AI), and Architecture
The hosted service and the open-source self-hosted edition share the exact same codebase. No feature is crippled for self-hosters.
1. Quickstart (Docker Compose)
git clone https://github.com/MENGUEDAVIS/silentdiff.git cd silentdiff cp .env.example .env docker compose up -d pnpm install && pnpm db:migrate && pnpm dev
2. Bring Your Own Keys (AI) & AWS Bedrock
Deterministic diffing is always the source of truth. The AI explanation layer is optional: disable it or supply your own key. On AWS production, SilentDiff uses AWS Bedrock with a fast, cost-efficient model (Amazon Nova Lite or Claude Haiku) to explain verified diffs.
# Choose one provider: disabled | anthropic | openai | gemini | grok | bedrock AI_PROVIDER=bedrock AI_MODEL=amazon.nova-lite-v1:0 # or anthropic.claude-haiku-4-5-20251001-v1:0 AWS_REGION=us-east-1 # Self-hosted BYOK examples: # AI_PROVIDER=anthropic -> ANTHROPIC_API_KEY=sk-ant-... # AI_PROVIDER=openai -> OPENAI_API_KEY=sk-... # AI_PROVIDER=gemini -> GEMINI_API_KEY=AIza... # AI_PROVIDER=grok -> XAI_API_KEY=xai-...
3. Context.dev & Email Delivery (Resend or SMTP)
Configure CONTEXT_DEV_API_KEY (or connect your Context.dev account from workspace settings). For notifications, configure Resend (RESEND_API_KEY) or any SMTP server (SMTP_URL). In demo mode (SILENTDIFF_DEMO_MODE=true), zero paid credentials are required.
4. Security (OWASP Top 10)
- Strict server-side access control (A01): every /app/* and /api/app/* route enforces signed session and userId ownership.
- SSRF protection (A10): blocks private IPs, loopback, cloud metadata (169.254.169.254), and hex-encoded IPv4-mapped IPv6.
- Signed webhooks: raw-body HMAC-SHA256 before JSON parsing, constant-time compare, and 300s replay window.
- Prompt-injection defense (LLM01): every AI-cited passage is verified against immutable snapshots before display.