# fiyo/dbcheck architecture

> Architecture diagram of the GitHub repository fiyo/dbcheck, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fiyo/dbcheck
- Repository: https://github.com/fiyo/dbcheck

## Overview

RaccoonX is a cross-platform database inspection and operations platform. Its central user workflow is to manage a database instance, connect and collect data, run inspection and analysis, produce a report, and retain history for comparisons; the README also documents monitoring, SQL audit, AI/RAG, backup, scheduling, and other operational features. Core inspection relationships are supported by the engine’s source index; several additional feature links reflect README-level documentation, not inspected call sites. Some subsystems have unsampled implementations, so their internal wiring is not expanded.

Main entry points: [`modules/web/app.py`](https://github.com/fiyo/dbcheck/blob/main/modules/web/app.py) (Web Application), [`modules/inspection/engine.py`](https://github.com/fiyo/dbcheck/blob/main/modules/inspection/engine.py) (Inspection Engine), [`modules/pro/instance_manager.py`](https://github.com/fiyo/dbcheck/blob/main/modules/pro/instance_manager.py) (Instance Manager), [`modules/disaster_recovery/engine.py`](https://github.com/fiyo/dbcheck/blob/main/modules/disaster_recovery/engine.py) (Disaster Recovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Instances"]
  node_instance[("Instance Manager")]
  node_auth[("User Management<br/>[auth_service.py]")]
end

subgraph group_inspection["Inspection and Reports"]
  node_inspect["Inspection Engine<br/>[engine.py]"]
  node_analyzer["Findings Analysis<br/>[analyzer.py]"]
  node_baseline["Config Baselines<br/>[config_baseline.py]"]
  node_slow["Slow Query Analysis<br/>[slow_query.py]"]
  node_index["Index Health<br/>[index_health.py]"]
  node_history[("Inspection History<br/>[dal.py]")]
  node_audit["SQL Audit<br/>[service.py]"]
  node_awr["Oracle AWR Analysis<br/>[awr_parser.py]"]
end

subgraph group_operations["Operations"]
  node_monitor["Live Monitoring<br/>[engine.py]"]
  node_serverinspect["Server Inspection<br/>[inspect.py]"]
  node_backup["Disaster Recovery<br/>[engine.py]"]
  node_scheduler["Scheduled Tasks<br/>[scheduler.py]"]
  node_notify["Notifications<br/>[__init__.py]"]
end

subgraph group_intelligence["AI and Knowledge"]
  node_ai["AI Diagnostics<br/>[ai_helper.py]"]
  node_rag[("RAG Knowledge Base<br/>[manager.py]")]
  node_doc[("Document Knowledge<br/>[service.py]")]
  node_skills["AI Skills<br/>[skills.py]"]
end

subgraph group_interfaces["Interfaces and Extensions"]
  node_web["Web Application<br/>[app.py]"]
  node_mcp["MCP Server<br/>[server.py]"]
  node_plugins["Plugin System<br/>[loader.py]"]
end

node_dba(("DBA / Engineer"))
node_db[("Database Systems")]

node_dba -->|"uses"| node_web
node_web -.->|"manages instances"| node_instance
node_instance -.->|"connects to"| node_db
node_web -.->|"starts inspection"| node_inspect
node_inspect -->|"collects data"| node_db
node_inspect -->|"uses analysis"| node_analyzer
node_inspect -->|"checks baselines"| node_baseline
node_inspect -->|"analyzes queries"| node_slow
node_inspect -->|"checks indexes"| node_index
node_inspect -->|"records results"| node_history
node_inspect -->|"generates reports"| node_web
node_web -.->|"opens monitoring"| node_monitor
node_monitor -->|"collects metrics"| node_db
node_web -.->|"starts server checks"| node_serverinspect
node_web -->|"submits SQL audit"| node_audit
node_audit -->|"resolves instance"| node_instance
node_web -.->|"manages backup plans"| node_backup
node_backup -->|"gets credentials"| node_instance
node_scheduler -.->|"runs plans"| node_backup
node_scheduler -.->|"sends alerts"| node_notify
node_inspect -.->|"requests diagnosis"| node_ai
node_ai -.->|"retrieves knowledge"| node_rag
node_doc -->|"supplies documents"| node_rag
node_dba -->|"requests tools"| node_mcp
node_mcp -->|"dispatches skills"| node_skills
node_skills -->|"uses instances"| node_instance
node_web -.->|"loads extensions"| node_plugins
node_dba -->|"uploads AWR report"| node_awr
node_web -.->|"authenticates users"| node_auth

click node_web "https://github.com/fiyo/dbcheck/blob/main/modules/web/app.py"
click node_instance "https://github.com/fiyo/dbcheck/blob/main/modules/pro/instance_manager.py"
click node_inspect "https://github.com/fiyo/dbcheck/blob/main/modules/inspection/engine.py"
click node_analyzer "https://github.com/fiyo/dbcheck/blob/main/modules/inspection/analyzer.py"
click node_baseline "https://github.com/fiyo/dbcheck/blob/main/modules/inspection/config_baseline.py"
click node_slow "https://github.com/fiyo/dbcheck/blob/main/modules/inspection/slow_query.py"
click node_index "https://github.com/fiyo/dbcheck/blob/main/modules/inspection/index_health.py"
click node_history "https://github.com/fiyo/dbcheck/blob/main/modules/inspection/dal.py"
click node_audit "https://github.com/fiyo/dbcheck/blob/main/modules/sqlaudit/service.py"
click node_monitor "https://github.com/fiyo/dbcheck/blob/main/modules/monitor/engine.py"
click node_serverinspect "https://github.com/fiyo/dbcheck/blob/main/modules/server/inspect.py"
click node_backup "https://github.com/fiyo/dbcheck/blob/main/modules/disaster_recovery/engine.py"
click node_scheduler "https://github.com/fiyo/dbcheck/blob/main/modules/web/scheduler.py"
click node_notify "https://github.com/fiyo/dbcheck/blob/main/modules/notify/__init__.py"
click node_ai "https://github.com/fiyo/dbcheck/blob/main/modules/intelligence/ai_helper.py"
click node_rag "https://github.com/fiyo/dbcheck/blob/main/modules/rag/manager.py"
click node_doc "https://github.com/fiyo/dbcheck/blob/main/modules/doc_kb/service.py"
click node_mcp "https://github.com/fiyo/dbcheck/blob/main/modules/mcp_server/server.py"
click node_skills "https://github.com/fiyo/dbcheck/blob/main/modules/intelligence/skills.py"
click node_plugins "https://github.com/fiyo/dbcheck/blob/main/modules/pluginkit/loader.py"
click node_awr "https://github.com/fiyo/dbcheck/blob/main/modules/web/awr_parser.py"
click node_auth "https://github.com/fiyo/dbcheck/blob/main/modules/user_management/services/auth_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_instance,node_auth toneBlue
class node_inspect,node_analyzer,node_baseline,node_slow,node_index,node_history,node_audit,node_awr,node_db toneAmber
class node_monitor,node_serverinspect,node_backup,node_scheduler,node_notify toneMint
class node_ai,node_rag,node_doc,node_skills toneRose
class node_web,node_mcp,node_plugins,node_dba toneIndigo
```

## Components

### Access and Instances

- [Instance Manager](https://github.com/fiyo/dbcheck/blob/main/modules/pro/instance_manager.py): `modules/pro/instance_manager.py`
- [User Management](https://github.com/fiyo/dbcheck/blob/main/modules/user_management/services/auth_service.py): `modules/user_management/services/auth_service.py`

### Inspection and Reports

- [Inspection Engine](https://github.com/fiyo/dbcheck/blob/main/modules/inspection/engine.py): `modules/inspection/engine.py`
- [Findings Analysis](https://github.com/fiyo/dbcheck/blob/main/modules/inspection/analyzer.py): `modules/inspection/analyzer.py`
- [Config Baselines](https://github.com/fiyo/dbcheck/blob/main/modules/inspection/config_baseline.py): `modules/inspection/config_baseline.py`
- [Slow Query Analysis](https://github.com/fiyo/dbcheck/blob/main/modules/inspection/slow_query.py): `modules/inspection/slow_query.py`
- [Index Health](https://github.com/fiyo/dbcheck/blob/main/modules/inspection/index_health.py): `modules/inspection/index_health.py`
- [Inspection History](https://github.com/fiyo/dbcheck/blob/main/modules/inspection/dal.py): `modules/inspection/dal.py`
- [SQL Audit](https://github.com/fiyo/dbcheck/blob/main/modules/sqlaudit/service.py): `modules/sqlaudit/service.py`
- [Oracle AWR Analysis](https://github.com/fiyo/dbcheck/blob/main/modules/web/awr_parser.py): `modules/web/awr_parser.py`

### Operations

- [Live Monitoring](https://github.com/fiyo/dbcheck/blob/main/modules/monitor/engine.py): `modules/monitor/engine.py`
- [Server Inspection](https://github.com/fiyo/dbcheck/blob/main/modules/server/inspect.py): `modules/server/inspect.py`
- [Disaster Recovery](https://github.com/fiyo/dbcheck/blob/main/modules/disaster_recovery/engine.py): `modules/disaster_recovery/engine.py`
- [Scheduled Tasks](https://github.com/fiyo/dbcheck/blob/main/modules/web/scheduler.py): `modules/web/scheduler.py`
- [Notifications](https://github.com/fiyo/dbcheck/blob/main/modules/notify/__init__.py): `modules/notify/__init__.py`

### AI and Knowledge

- [AI Diagnostics](https://github.com/fiyo/dbcheck/blob/main/modules/intelligence/ai_helper.py): `modules/intelligence/ai_helper.py`
- [RAG Knowledge Base](https://github.com/fiyo/dbcheck/blob/main/modules/rag/manager.py): `modules/rag/manager.py`
- [Document Knowledge](https://github.com/fiyo/dbcheck/blob/main/modules/doc_kb/service.py): `modules/doc_kb/service.py`
- [AI Skills](https://github.com/fiyo/dbcheck/blob/main/modules/intelligence/skills.py): `modules/intelligence/skills.py`

### Interfaces and Extensions

- [Web Application](https://github.com/fiyo/dbcheck/blob/main/modules/web/app.py): `modules/web/app.py`
- [MCP Server](https://github.com/fiyo/dbcheck/blob/main/modules/mcp_server/server.py): `modules/mcp_server/server.py`
- [Plugin System](https://github.com/fiyo/dbcheck/blob/main/modules/pluginkit/loader.py): `modules/pluginkit/loader.py`

### Other components

- **DBA / Engineer**
- **Database Systems**

## Connections

- DBA / Engineer → Web Application: uses (evidence: `README.md`)
- Web Application → Instance Manager: manages instances
- Instance Manager → Database Systems: connects to
- Web Application → Inspection Engine: starts inspection
- Inspection Engine → Database Systems: collects data (evidence: `README.md`)
- Inspection Engine → Findings Analysis: uses analysis (evidence: `modules/inspection/engine.py`)
- Inspection Engine → Config Baselines: checks baselines (evidence: `modules/inspection/engine.py`)
- Inspection Engine → Slow Query Analysis: analyzes queries (evidence: `modules/inspection/engine.py`)
- Inspection Engine → Index Health: checks indexes (evidence: `modules/inspection/engine.py`)
- Inspection Engine → Inspection History: records results (evidence: `modules/inspection/engine.py`)
- Inspection Engine → Web Application: generates reports (evidence: `README.md`)
- Web Application → Live Monitoring: opens monitoring
- Live Monitoring → Database Systems: collects metrics (evidence: `README.md`)
- Web Application → Server Inspection: starts server checks
- Web Application → SQL Audit: submits SQL audit
- SQL Audit → Instance Manager: resolves instance (evidence: `modules/sqlaudit/routes.py`)
- Web Application → Disaster Recovery: manages backup plans
- Disaster Recovery → Instance Manager: gets credentials (evidence: `modules/disaster_recovery/engine.py`)
- Scheduled Tasks → Disaster Recovery: runs plans
- Scheduled Tasks → Notifications: sends alerts
- Inspection Engine → AI Diagnostics: requests diagnosis
- AI Diagnostics → RAG Knowledge Base: retrieves knowledge
- Document Knowledge → RAG Knowledge Base: supplies documents (evidence: `modules/doc_kb/service.py`)
- DBA / Engineer → MCP Server: requests tools (evidence: `README.md`)
- MCP Server → AI Skills: dispatches skills (evidence: `modules/mcp_server/server.py`)
- AI Skills → Instance Manager: uses instances (evidence: `modules/intelligence/skills.py`)
- Web Application → Plugin System: loads extensions
- DBA / Engineer → Oracle AWR Analysis: uploads AWR report (evidence: `README.md`)
- Web Application → User Management: authenticates users
