Архитектура
flowchart TB
subgraph SCOUT["SCOUT - Разведка | cron 6ч"]
direction LR
S1["Google News EN/RU
9 запросов"] --> S4["Фильтр 24ч
+ дедупликация"]
S2["HackerNews
Top AI stories"] --> S4
S3["GitHub Trending
AI repos за 7 дней"] --> S4
S4 --> DB_NEWS[("news_feed")]
end
subgraph WRITER["WRITER - Автор | cron 03:00"]
direction LR
W1["TOP-5 новостей
по score"] --> W2["MiniMax M2.5
700-1200 символов
x5 постов"]
W2 --> W3["Quality Gate
12 проверок"]
W3 --> DB_POST[("posts
3-5 постов/день")]
end
subgraph ILLUSTRATOR["ILLUSTRATOR - Художник | cron 03:30"]
direction LR
I1["Посты без картинок"] --> I2["Gemini 2.5 Flash
pop-art стиль"]
I2 --> DB_IMG[("posts +
image_url")]
end
subgraph ADAPTER["ADAPTER - Адаптер | cron 04:00"]
direction LR
A1["Неадаптированные
посты"] --> A2["MiniMax M2.5
10 платформ"]
A2 --> DB_PP[("platform_posts
пост + комментарий
+ reply + ссылка")]
DB_PP --> SYNC["Синхронизация
Content Dashboard"]
end
subgraph CURATOR["CURATOR - Куратор | после Adapter"]
direction LR
CUR1["5 постов x 10 платформ
= 50 адаптаций"] --> CUR2{"Распределение
по частоте"}
CUR2 --> CUR_TH["Threads RU/EN
все 5 постов"]
CUR2 --> CUR_TG["Telegram
2 лучших"]
CUR2 --> CUR_LI["LinkedIn
1 лучший"]
CUR2 --> CUR_VK["VK / FB
1-2 поста"]
CUR2 --> CUR_EN["Bluesky / Mastodon
2-3 поста"]
CUR2 --> CUR_ART["Dev.to / Hashnode
1 статья/нед"]
end
subgraph PUBLISH["PUBLISHER - Публикация | cron */30 06-21"]
direction LR
PUB_DIRECT["Direct API
TG, LinkedIn, VK
Bluesky, Threads RU
Mastodon, Dev.to, Hashnode"]
PUB_PUBLER["Publer API
Facebook, TikTok
Threads EN"]
end
subgraph STATS["ANALYST - Аналитика | cron 21:00"]
direction LR
ST1["Сбор engagement
APIs платформ"] --> ST2["Performance
Score"]
ST2 --> DB_ENG[("engagement")]
ST2 --> ST3["Daily Report
в Telegram"]
end
SCOUT --> WRITER
WRITER --> ILLUSTRATOR
ILLUSTRATOR --> ADAPTER
ADAPTER --> CURATOR
CURATOR --> PUBLISH
PUBLISH --> STATS
STATS -.->|"feedback loop
лучшие темы"| SCOUT
style SCOUT fill:#dbeafe,stroke:#2563eb
style WRITER fill:#dcfce7,stroke:#16a34a
style ILLUSTRATOR fill:#fef3c7,stroke:#d97706
style ADAPTER fill:#ede9fe,stroke:#7c3aed
style CURATOR fill:#fff7ed,stroke:#ea580c
style PUBLISH fill:#fce7f3,stroke:#db2777
style STATS fill:#e0f2fe,stroke:#0284c7
БД - PostgreSQL (schema: content)
erDiagram
news_feed {
serial id PK
text title
text url
text source
int score
text title_hash UK
boolean used
text pub_date
timestamptz fetched_at
}
posts {
serial id PK
int news_id FK
text post_text
int char_count
text topic_cluster
int quality_score
text image_url
text product_url
text product_name
text status
}
platform_posts {
serial id PK
int post_id FK
text platform
text adapted_text
int char_count
text comment_text
text reply_text
text link_url
text link_placement
boolean include_image
text image_url
timestamptz scheduled_at
timestamptz published_at
text status
}
engagement {
serial id PK
int platform_post_id FK
int views
int likes
int comments
float engagement_rate
}
news_feed ||--o{ posts : "generates"
posts ||--o{ platform_posts : "adapts to"
platform_posts ||--o{ engagement : "tracks"