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