How unnatiag13/faultlens works
FaultLens is a microservice resilience-testing and root-cause-analysis platform. Users connect an application from Compose, inspect its discovered services and dependencies, run fault experiments, and review impact, root-cause evidence, and remediation recommendations. The frontend also exposes monitoring, experiment history, and remediation review. The backend separates API routing, experiment/fault handling, analysis and patch generation, and persisted application state. Several page and service implementations are listed but not excerpted, so their finer call relationships are not asserted here.
Main entry points: App.jsx Routed application · store.py Application and experiment state · main.py API application · remediation.py Remediation endpoints
Components 25
Frontend experience
- Routed application
src/App.jsx - Application pages
src/pages - Experiment pages
src/pages - Monitoring views
src/pages/MonitoringPage.jsx - Analysis views
src/pages/RootCausePage.jsx - Remediation view
src/pages/RemediationPage.jsx - Application context
src/context/AppContext.jsx - Authentication context
src/context/AuthContext.jsx - Application API client
src/services/applicationService.js - Experiment API client
src/services/experimentService.js - Monitoring API client
src/services/monitoringService.js - Analysis API client
src/services/analysisService.js - Remediation API client
src/services/remediationService.js - Dependency graph
src/components/graph/DependencyGraph.jsx
Experiments and telemetry
- Experiment endpoints
backend/app/api/v1/experiments.py - Docker fault handling
backend/app/api/v1/docker_faults.py
Analysis and remediation
- Analysis endpoints
backend/app/api/v1/analysis.py - Remediation endpoints
backend/app/api/v1/remediation.py - Root-cause engine
backend/app/services/rca_engine.py - Patch generator
backend/app/services/patch_generator.py
Backend and state
- API application
backend/app/main.py - Application endpoints
backend/app/api/v1/applications.py - Compose parser
backend/app/services/compose_parser.py - Application and experiment state
backend/app/services/store.py
Other components
- Platform user
Connections 35
- Platform user → Routed application: uses
src/App.jsx - Routed application → Application pages: routes to
src/App.jsx - Routed application → Experiment pages: routes to
src/App.jsx - Routed application → Monitoring views: routes to
src/App.jsx - Routed application → Analysis views: routes to
src/App.jsx - Routed application → Remediation view: routes to
src/App.jsx - Routed application → Authentication context: provides auth
src/App.jsx - Routed application → Application context: provides app state
src/App.jsx - Application context → Application API client: loads applications
src/context/AppContext.jsx - Application API client → Application endpoints: requests application data
src/services/applicationService.js - Application endpoints → Compose parser: parses Compose
- Compose parser → Application and experiment state: supplies parsed topology
backend/app/services/store.py - Application endpoints → Application and experiment state: reads and writes
backend/app/api/v1/applications.py - Experiment pages → Experiment API client: uses experiments
src/pages/RootCausePage.jsx - Experiment API client → Experiment endpoints: requests experiments
- Experiment endpoints → Docker fault handling: dispatches faults
backend/app/api/v1/experiments.py - Experiment endpoints → Application and experiment state: reads and writes
backend/app/api/v1/experiments.py - Analysis views → Analysis API client: requests analysis
src/pages/RootCausePage.jsx - Analysis API client → Analysis endpoints: requests analysis
- Analysis endpoints → Root-cause engine: runs analysis
backend/app/api/v1/analysis.py - Analysis endpoints → Application and experiment state: loads experiment data
backend/app/api/v1/analysis.py - Root-cause engine → Application and experiment state: reads topology
backend/app/services/rca_engine.py - Analysis views → Dependency graph: renders topology
- Remediation view → Remediation API client: requests remediation
- Remediation API client → Remediation endpoints: requests remediation
- Remediation endpoints → Root-cause engine: uses analysis
backend/app/api/v1/remediation.py - Remediation endpoints → Patch generator: generates patches
backend/app/api/v1/remediation.py - Remediation endpoints → Application and experiment state: stores reviews
backend/app/api/v1/remediation.py - Monitoring views → Monitoring API client: requests telemetry
- Monitoring API client → Application and experiment state: uses sample data
- API application → Application endpoints: registers routes
backend/app/main.py - API application → Experiment endpoints: registers routes
backend/app/main.py - API application → Docker fault handling: registers routes
backend/app/main.py - API application → Analysis endpoints: registers routes
backend/app/main.py - API application → Remediation endpoints: registers routes
backend/app/main.py