vault backup: 2025-08-04 15:16:29

This commit is contained in:
Andrey Epifancev
2025-08-04 15:16:29 +04:00
parent f2983ded62
commit df6aa56f7e
2 changed files with 137 additions and 98 deletions

View File

@@ -46,12 +46,25 @@
## 3. Поток обработки сообщений MVP ## 3. Поток обработки сообщений MVP
```text ```mermaid
User -> Telegram Bot -> Bot Handler graph TB
-> /new <text> A[User] --> B[Telegram Bot]
-> Note Service -> LLM Service (format) -> File Service -> Git Service B --> C[Bot Handler]
<- "Заметка создана: <filename>" C --> D[/new text]
D --> E[Note Service]
E --> F[LLM Service format]
F --> G[File Service]
G --> H[Git Service]
H --> I["Заметка создана: filename"]
I --> A
subgraph "MVP Flow"
D
E
F
G
H
end
``` ```
--- ---

View File

@@ -55,106 +55,132 @@
### 3.1 Общая диаграмма системы ### 3.1 Общая диаграмма системы
``` ```mermaid
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ graph TB
Telegram │ │ │ │ External │ A[Telegram User] --> B[Monolithic Bot App]
│ User │◄──►│ Monolithic │◄──►│ Services │ B --> A
│ │ Bot App │ │ │ B --> C[External Services]
└─────────────────┘ └─────────────────┘ └─────────────────┘ C --> B
│ │
▼ ├─ OpenAI API subgraph "External Services"
┌─────────────────┐ ├─ Vector DB D[YandexGPT API]
│ File System │ └─ Telegram API E[Vector DB]
│ │ F[Telegram API]
├─ Obsidian Vault │ end
├─ Git Repository │
└─ Vector Index │ B --> G[File System]
subgraph "File System"
┌─────────────────┐ H[Obsidian Vault]
│ Git Hooks │ I[Git Repository]
│ │ J[Vector Index]
└─ Quartz Rebuild │ end
G --> K[Git Hooks]
K --> L[Quartz Rebuild]
C --> D
C --> E
C --> F
``` ```
### 3.2 Компонентная диаграмма ### 3.2 Компонентная диаграмма
``` ```mermaid
┌─────────────────────────────────────────────────────────┐ graph TB
Monolithic Application subgraph "Monolithic Application"
│ │ A[Bot Handler]
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ B[HTTP Server]
│ │ Bot │ │ HTTP │ │ CLI │ │ C[CLI Tools]
Handler │ │ Server │ │ Tools │ │
└─────────────┘ └─────────────┘ └─────────────┘ │ subgraph "Business Logic Layer"
│ │ │ │ │ D[Note Service]
└─────────────────┼─────────────────┘ │ E[Search Service]
│ │ F[Voice Service]
┌─────────────────────────┼─────────────────────────┐ │ G[LLM Service]
│ │ Business Logic Layer │ │ H[File Service]
│ │ │ │ │ I[Git Service]
┌─────────────┐ ┌─────────────┐ ┌───────────┐ │ │ end
│ │ │ Note │ │ Search │ │ Voice │ │ │
Service │ │ Service │ │ Service │ │ │ subgraph "Infrastructure Layer"
└─────────────┘ └─────────────┘ └───────────┘ │ │ J[Config Manager]
│ │ │ │ │ │ │ K[Logger]
┌─────────────┐ ┌─────────────┐ ┌───────────┐ │ │ L[Cache]
│ │ LLM │ │ File │ │ Git │ │ │ end
│ Service │ │ Service │ │ Service │ │ │ end
└─────────────┘ └─────────────┘ └───────────┘ │ │
└─────────────────────┼─────────────────────────────┘ │ A --> D
│ │ │ A --> E
┌─────────────────────┼─────────────────────────────┐ │ A --> F
│ │ Infrastructure Layer │ │ B --> D
│ │ │ │ │ B --> E
┌─────────────┐ ┌─────────────┐ ┌───────────┐ │ │ B --> F
│ │ Config │ │ Logger │ │ Cache │ │ │ C --> D
│ │ │ Manager │ │ │ │ │ │ │ C --> E
└─────────────┘ └─────────────┘ └───────────┘ │ │ C --> F
└─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘ D --> G
D --> H
D --> I
E --> G
E --> H
F --> G
F --> H
G --> J
H --> J
I --> J
G --> K
H --> K
I --> K
``` ```
### 3.3 Диаграмма потоков данных ### 3.3 Диаграмма потоков данных
``` ```mermaid
User Message Flow: graph TB
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ A[Telegram Message] --> B[Bot Handler]
Telegram │───►│ Bot │───►│ Router B --> C[Router]
│ Message │ │ Handler │ │ │
└─────────────┘ └─────────────┘ └─────────────┘ C --> D[Create Note]
C --> E[Search Notes]
┌─────────────────────────┼─────────────────────────┐ C --> F[Append Note]
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ D --> G[Format with YandexGPT]
│ Create │ │ Search │ │ Append │ F --> H[Find & Update]
│ Note │ │ Notes │ │ Note │
└─────────────┘ └─────────────┘ └─────────────┘ G --> I[Save File]
│ │ │ E --> J[Vector Search]
▼ │ ▼ H --> I
┌─────────────┐ │ ┌─────────────┐
│ Format │ │ │ Find & │ I --> K[Git Commit]
│ with YandexGPT │ │ │ Update │ J --> K
└─────────────┘ │ └─────────────┘
│ │ │ K --> L[Quartz Rebuild]
▼ │ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ subgraph "Message Processing"
│ Save │ │ Vector │ │ Save │ A
│ File │ │ Search │ │ File │ B
└─────────────┘ └─────────────┘ └─────────────┘ C
│ │ │ end
└─────────────────────────┼─────────────────────────┘
subgraph "Note Operations"
┌─────────────┐ D
│ Git │ E
│ Commit │ F
└─────────────┘ end
subgraph "Processing"
┌─────────────┐ G
│ Quartz │ H
│ Rebuild │ J
└─────────────┘ end
subgraph "Storage"
I
K
L
end
``` ```
## 4. Детальное описание компонентов ## 4. Детальное описание компонентов