From 13a693f9e63a8f80eae8a095e237872681dd085c Mon Sep 17 00:00:00 2001 From: adnan 275 Date: Tue, 14 Apr 2026 11:36:16 +0530 Subject: [PATCH] docs: add full project UML class diagram --- design-assets/uml-class-diagram.md | 75 ++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 design-assets/uml-class-diagram.md diff --git a/design-assets/uml-class-diagram.md b/design-assets/uml-class-diagram.md new file mode 100644 index 0000000..446af4b --- /dev/null +++ b/design-assets/uml-class-diagram.md @@ -0,0 +1,75 @@ +# Sentinel — UML Architecture Diagram + +This diagram outlines the complete system architecture and core class interactions of the Sentinel project. + +## 🔗 Architecture Overview + +```mermaid +classDiagram + class SentinelAPI { + +start_scan(path: str) + +execute_plan(plan_id: str) + +undo_task(task_id: str) + +get_task_status() + } + + class Scanner { + +scan_directory(path: str) List~FileMetadata~ + +calculate_hashes() + -ignore_blacklisted() + } + + class FileClassifier { + +classify(file: FileMetadata) Category + +detect_duplicates(files) + } + + class RulesEngine { + +apply_rules(files) + +load_user_preferences() + } + + class AIPlanner { + +generate_plan(files, category) JSON + -communicate_with_ollama() + } + + class SafetyValidator { + +validate_plan(plan: JSON) bool + -check_system_paths() + } + + class Executor { + +execute(plan: JSON) Result + +undo(task_id: str) + -move_to_trash() + } + + class DatabaseManager { + +save_task() + +save_execution_log() + +record_user_decision() + } + + class WebUI { + +render_dashboard() + +show_diff_viewer() + +handle_websocket_events() + } + + class CLI { + +parse_arguments() + +display_rich_table() + } + + SentinelAPI --> Scanner : invokes + Scanner --> FileClassifier : uses + FileClassifier --> RulesEngine : forwards to + RulesEngine --> AIPlanner : requests plan + AIPlanner --> SafetyValidator : validates + SafetyValidator --> SentinelAPI : returns safe plan + SentinelAPI --> Executor : triggers + Executor --> DatabaseManager : logs actions + WebUI --> SentinelAPI : REST / WebSocket Calls + CLI --> SentinelAPI : Local Commands +```