Production-ready repository health monitoring and auto-healing platform
Brain-Doctor Hospital V4 is an advanced GitOps health monitoring system that continuously scans repositories, tracks developer identities, computes health scores, and automatically remediates issues through intelligent auto-healing strategies.
- π Self-Healing: Autonomous error detection and recovery via Healdec engine
- β‘ 12 Parallel Workers: Specialized workers for indexing, scoring, ingestion, and more
- ποΈ One-File Orchestrator: Centralized job scheduling and worker supervision
- π Real-Time Scoring: Repository health scores (0-100) with detailed breakdowns
- π Identity Resolution: Developer identity tracking and claim management
- π¨ Aura FX UI: Neo-glow cyber-medical theme with GitHub Dark base
- π Production-Ready: Full-stack React/TypeScript application
- PRD.md - Complete product requirements document
- Essential features and user flows
- Design direction and aesthetic principles
- Component selection and UI/UX specifications
-
ARCHITECTURE.md - Complete production architecture specification
- One-file orchestrator design
- Healdec auto-healing engine
- 12 parallel workers
- Database schema
- UI/UX design system (Aura FX Neo-Glow + GitHub Dark)
- Production deployment topology
-
MERMEDA.md - Comprehensive Mermaid diagram suite
- System architecture diagrams
- Worker pipeline flows
- Healdec recovery flows
- Data flow diagrams
- UI component hierarchy
- Database schema ERD
- Deployment topology
-
docs/OPERATOR_HANDBOOK.md - Production operations guide
- Deployment runbook
- Monitoring & observability
- Healing & recovery
- Scaling strategies
- Troubleshooting
- Maintenance tasks
-
docs/REPOSITORY_STRUCTURE.md - Complete folder layout
-
docs/DOCS_SITE_STRUCTURE.md - MkDocs/Docusaurus configuration
- Node.js 20+
- npm or pnpm
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AlgoBrainDoctor Dashboard β
β Repository Health β’ Identity Claims β’ Analytics β
ββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β
βββββββββββ΄ββββββββββ
β 12 Workers Pool β ββββ Healdec Auto-Healing
βββββββββββ¬ββββββββββ
β
βββββββββββ΄ββββββββββ
β Data Persistence β (useKV + spark.kv)
βββββββββββββββββββββ
- Fleet Navigator: Repository browser with search and health indicators
- VitalsModal: Real-time repository health dashboard with trends
- HealthTimeline: Detailed event timeline showing all scans and governance events
- HealthTrendCharts: Visualizations of health trends over time
- FleetHealthCharts: Fleet-wide analytics and statistics
- SmartBrainTerminal: Live system log viewer
- ClaimModal: Identity claim submission interface
- HealdecModal: Auto-healing activity log
Color Palette:
- Violet Aura (
#A78BFA/oklch(0.72 0.15 290)) - Primary actions and glow effects - Aqua Pulse (
#4FD1C5/oklch(0.75 0.12 195)) - Health indicators and success states - Coral Heat (
#F87171/oklch(0.7 0.18 25)) - Alerts and warnings - Cyber Yellow (
#FACC15/oklch(0.85 0.15 95)) - Caution states and highlights
Typography:
- Headings: Space Grotesk (Bold/SemiBold/Medium)
- Body: Inter (Regular)
- Code/Data: JetBrains Mono (Regular)
Design Principles:
- Surgical Precision β Deterministic interactions
- Neo-Medical Cyber β Dark laboratory aesthetic with soft neon diffusion
- Operator-Grade Control β Zero visual noise, mission-critical data surfaced instantly
- IndexWorker - Discover repositories
- IdentityWorker - Extract developer identities
- ScoreWorker - Compute health scores
- IngestWorker - Process GitHub webhooks
- SyncWorker - Sync repo metadata
- GCWorker - Garbage collection
- AlertWorker - Monitor and notify
- ExportWorker - Generate reports
- AuditWorker - Compliance logging
- RepairWorker - Fix data inconsistencies
- BackfillWorker - Historical data population
- MaintenanceWorker - Database optimization
Autonomous recovery system with 5 strategies:
- Retry - Exponential backoff for transient failures
- Restart - Worker process restart for crashes
- Quarantine - Isolate problematic jobs for review
- Rollback - Undo partial changes with compensating transactions
- Escalate - Alert on-call for critical failures
- Detailed event timeline showing all scans and governance events
- Filter by event type (scan/governance/healing) and severity
- Expandable event details with metadata
- Real-time updates with color-coded severity indicators
- Export functionality for timeline data
- Score history visualization (30-day trends)
- Activity timeline (daily event counts by type)
- Event severity distribution (pie chart)
- 7-day rolling averages with trend indicators
- Fleet-wide statistics and health distribution
- Repository health distribution across score ranges
- Top performers and repos needing attention
- Worker pool status monitoring
- Real-time metrics with animated updates
The dashboard adapts to five distinct roles:
- User: Portfolio, activity, rewards, quick actions
- Admin: Worker health, Healdec logs, system vitals, governance queue
- Developer: API keys, webhooks, error traces, sandbox console
- Validator: Node uptime, slashing risk, performance metrics
- Analyst: Query builder, table explorer, graph surfaces, export tools
Real-time repository health dashboard with three tabs:
- Overview: Health metrics, repository details, detected frameworks
- Trends: Charts showing score history, activity, and severity distribution
- Timeline: Detailed event timeline with filtering and export
Comprehensive event timeline featuring:
- Filter by event type and severity
- Expandable event details with metadata
- Color-coded severity indicators with glow effects
- Relative timestamps with full datetime on expand
- Export to JSON functionality
Visualization suite including:
- Area chart: 30-day score history
- Bar chart: Daily activity by type
- Pie chart: Event severity distribution
- Stats cards: 7-day averages and trends
- Collapsible fleet navigator
- Stacked modals optimized for touch
- Bottom navigation for primary actions
- Scrollable tables with sticky headers
- Touch-optimized neon buttons with proper hit areas
- Frontend: React 19 + TypeScript
- Styling: Tailwind CSS 4 + Custom Aura FX theme
- UI Components: shadcn/ui v4
- Charts: Recharts
- Icons: Phosphor Icons
- State: React hooks + Spark KV persistence
- Build: Vite 7
- Fonts: Space Grotesk, Inter, JetBrains Mono
- Sub-100ms dashboard updates
- <200ms vitals load time
- <50ms log append latency
- Real-time worker status updates every 2 seconds
- Optimized chart rendering with memoization
This is a Spark application designed for production use. To contribute:
- Review the PRD.md for design specifications
- Follow the AuraFX design system guidelines
- Maintain the cyber-medical aesthetic
- Ensure all interactions are deterministic and observable
MIT License - see LICENSE for details.
Version: 4.0.0
Last Updated: 2024-01-28
Maintained By: AlgoBrainDoctor Core Team
Made with π§ β‘ by the AlgoBrainDoctor team