Enterprise-grade Windows crash dump analyzer powered by Google's Gemini AI and real WinDBG debugging. Instantly diagnose Blue/Black Screen of Death errors with professional-grade analysis. Supports both classic blue screens and Windows 11's modern black screens.
Live: bsod.windowsforum.com
- Real WinDBG Analysis: Server-side WinDBG debugging with
!analyze -von actual crash dumps - AI-Powered Reports: Gemini AI interprets WinDBG output into user-friendly diagnostics
- Content-Addressed Caching: XXHash-based deduplication with Upstash Redis — identical dumps return instant results
- Dual Analysis Paths: WinDBG server (primary) with client-side binary parsing fallback
- Multiple Formats: Supports
.dmp,.mdmp,.hdmp,.kdmpfiles and.ziparchives - External API: REST endpoint for programmatic access with API key authentication
- 6-Layer Security: CSP, SRI, prompt validation, session management, rate limiting, Cloudflare Turnstile
- Google Search Grounding: AI analysis cross-references up-to-date driver and error information
- Node.js 22+
- Gemini API key from Google AI Studio
git clone https://github.com/faratech/bsod-analyzer.git
cd bsod-analyzer
npm install
# Create .env.local with your Gemini key
echo "GEMINI_API_KEY=your-gemini-api-key" > .env.local
# Start backend (8080) + frontend concurrently
npm run dev| Command | Description |
|---|---|
npm run dev |
Start backend + frontend concurrently |
npm run dev:backend |
Start Express server only |
npm run dev:frontend |
Start Vite dev server only |
npm run build |
Build production frontend + generate SRI hashes |
npm run build:no-sri |
Build without SRI generation |
npm start |
Run production server (NODE_ENV=production) |
npm run analyze-css |
Analyze unused CSS |
npm run optimize-css |
Apply CSS purging |
┌─────────────┐ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ Browser │────▶│ Express │────▶│ Gemini API │ │ Upstash Redis│
│ (React) │◀────│ Server │◀────│ (Google) │ │ (Cache) │
└─────────────┘ └──────┬──────┘ └──────────────┘ └──────────────┘
Frontend │ AI Service Cache Layer
│
▼
┌──────────────┐
│ WinDBG Server│
│ (External) │
└──────────────┘
Debug Service
| File | Purpose |
|---|---|
server.js |
Express backend — security middleware, session management, rate limiting, Gemini API proxy, WinDBG proxy, external API, caching |
services/cache.js |
Upstash Redis cache layer for WinDBG analysis and AI reports |
services/geminiProxy.ts |
Client-side service routing API calls through backend with session cookies |
services/windbgService.ts |
Client-side WinDBG integration (upload, poll, download via backend proxy) |
utils/sessionManager.ts |
Client-side session initialization and error handling |
serverConfig.js |
Security configuration constants |
The primary analysis path uses a remote WinDBG server to perform real debugging on crash dumps. This produces professional-grade output identical to running WinDBG locally.
User uploads .dmp/.zip
│
▼
┌─────────────┐ ┌──────────────┐
│ Compute file│────▶│ Check Redis │──── Cache HIT ──▶ Return cached result
│ XXHash64 │ │ cache by hash│
└─────────────┘ └──────┬───────┘
│ Cache MISS
▼
┌──────────────────┐
│ Upload to WinDBG │
│ server (base64) │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Poll status every│
│ 10s (max 5 min) │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Download WinDBG │
│ analysis output │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Cache WinDBG │
│ output in Redis │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Gemini AI │
│ interprets output│
│ into user report │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Cache AI report │
│ Return to user │
└──────────────────┘
Key details:
- Files are identified by XXHash64 content hash — uploading the same dump twice hits cache instantly
- WinDBG server upload uses base64-encoded multipart form data proxied through the backend
- Polling uses cache-busting timestamps to prevent browser/CDN caching of status responses
- 5-minute hard timeout wraps the entire pipeline with
Promise.race - If WinDBG is unavailable or fails, the client falls back to local binary string extraction + direct Gemini analysis
When the WinDBG server is not configured (WINDBG_API_KEY not set) or fails:
- Client extracts ASCII/UTF-16LE strings and hex dumps from the crash dump locally
- Extracted data is sent to the backend proxy endpoint
- Backend validates session, rate limits, and prompt content
- Backend forwards to Gemini API with server-side API key
- AI analyzes raw binary data (less accurate than WinDBG output)
A separate POST /api/analyze endpoint provides programmatic access:
- Accepts multipart file uploads (
.dmp,.zip) - Authenticated via
BSOD_API_KEYheader - Runs the full server-side pipeline: upload → WinDBG → AI report
- Handles ZIP extraction automatically (analyzes first dump found)
- Returns structured JSON with report data, analysis method, and metadata
All caching uses Upstash Redis with content-addressed keys:
| Cache Layer | Key | Value | Purpose |
|---|---|---|---|
| WinDBG output | File XXHash64 | Raw WinDBG text + metadata | Skip re-uploading identical dumps |
| AI report | Hash of WinDBG output | Structured report JSON | Skip re-running Gemini for same WinDBG output |
| Combined | File hash | WinDBG + AI report | Client-side cache check before upload |
- Content Security Policy — Script validation via hashes, strict
form-action, nounsafe-eval - Subresource Integrity — SHA-384 hashes for all production assets via
generate-sri.js - Prompt Validation — BSOD keyword requirements, abuse pattern blocking
- Session Management — XXHash session IDs, HttpOnly/Secure/SameSite cookies, 1-hour expiry
- Rate Limiting — 50 requests/hour, 500K tokens/hour per session
- Cloudflare Turnstile — Bot protection on session creation with token replay prevention
| Variable | Purpose | Required |
|---|---|---|
GEMINI_API_KEY |
Gemini AI API access | Yes |
WINDBG_API_KEY |
WinDBG server API access | No (falls back to local parsing) |
TURNSTILE_SECRET_KEY |
Cloudflare Turnstile verification | Production |
SESSION_SECRET |
Session cookie signing | Production |
BSOD_API_KEY |
External REST API authentication | No (disables /api/analyze if unset) |
Upstash Redis credentials are also required for caching (configured via Upstash environment variables).
For local development, set in .env.local or export directly.
Pushes to main automatically deploy to Cloud Run. Secrets are managed via Google Secret Manager.
export PROJECT_ID="your-gcp-project-id"
# Create secrets
echo -n "your-gemini-api-key" | gcloud secrets create gemini-api-key --data-file=-
# Deploy
./deploy-with-secret.sh# Build and push
docker build -t us-east1-docker.pkg.dev/$PROJECT_ID/bsod-analyzer/app:latest .
docker push us-east1-docker.pkg.dev/$PROJECT_ID/bsod-analyzer/app:latest
# Deploy to Cloud Run
gcloud run deploy bsod-analyzer \
--image us-east1-docker.pkg.dev/$PROJECT_ID/bsod-analyzer/app:latest \
--region us-east1 \
--allow-unauthenticated \
--update-secrets GEMINI_API_KEY=gemini-api-key:latest# Submit a build
gcloud builds submit --config cloudbuild.yaml
# Set up automatic deployments on push
gcloud builds triggers create github \
--repo-name=bsod-analyzer \
--repo-owner=faratech \
--branch-pattern="^main$" \
--build-config=cloudbuild.yamlsetup-all-secrets.sh— Initial setup of all secrets in Google Secret Managerupdate-turnstile-secret.sh— Update Turnstile secret when regenerating keysdeploy-with-secret.sh— Deploy to Cloud Run with secrets from Secret Manager
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript, Vite |
| Backend | Express.js (ES modules), Node.js 22+ |
| AI | Google Gemini with Search Grounding via @google/generative-ai SDK |
| Cache | Upstash Redis (@upstash/redis) |
| Hashing | XXHash64 via xxhash-wasm (file dedup + sessions) |
| File Processing | FileReader API, JSZip, Multer |
| Markdown | react-markdown with remark-gfm |
| Deployment | Docker, Google Cloud Run, Secret Manager |
| Security | Cloudflare Turnstile, CSP, SRI |
Proxies requests to Google's Gemini API (used by the web UI).
Requires: Valid session cookie
Server-side crash dump analysis (external API).
Requires: x-api-key header with BSOD_API_KEY
Request: Multipart form with file field (.dmp or .zip, max 500MB)
Response:
{
"success": true,
"data": {
"summary": "...",
"probableCause": "...",
"culprit": "driver.sys",
"recommendations": ["..."]
},
"analysisMethod": "windbg",
"cached": false,
"processingTime": 45.2,
"metadata": {
"fileName": "MEMORY.DMP",
"fileSize": 1048576,
"dumpType": "kernel",
"uid": "abc123"
}
}These are used internally by the web UI:
| Endpoint | Method | Purpose |
|---|---|---|
/api/windbg/upload |
POST | Upload dump file to WinDBG server |
/api/windbg/status |
GET | Poll analysis status |
/api/windbg/download |
GET | Download completed analysis |
/api/cache/check |
POST | Check cache status for file hashes |
/api/cache/get |
GET | Retrieve cached analysis |
/api/cache/set |
POST | Store analysis in cache |
- API Key Errors — Ensure
GEMINI_API_KEYis set. For production:gcloud secrets list - WinDBG Fallback — If
WINDBG_API_KEYis not set, analysis uses client-side binary parsing (less accurate) - Container Failures — Check logs:
gcloud logging read --limit 50. Verify PORT=8080 - Build Failures — Ensure Node.js 22+:
node --version - Session Errors — Check cookie attributes are consistent; Turnstile must be configured for production
gcloud logging read "resource.type=cloud_run_revision AND resource.labels.service_name=bsod-analyzer" --limit 50- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -am 'Add your feature' - Push to branch:
git push origin feature/your-feature - Submit a pull request
Contributions are welcome! By contributing, you agree to license your contributions under the same CC BY 4.0 license.
For issues and feature requests, please use the GitHub issue tracker.
This project is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made
How to Attribute:
BSOD Analyzer by the BSOD Analyzer Contributors, licensed under CC BY 4.0
Source: https://github.com/faratech/bsod-analyzer
See the LICENSE file for full details.
- Powered by Google Gemini AI for intelligent crash analysis
- WinDBG analysis provided by stack-tech.net
- Built with React, TypeScript, and Vite
- Deployed on Google Cloud Run