Update CLAUDE.md with submodule structure and message flow

- Documented git submodule architecture
- Explained Drone CI/CD and tag-based versioning
- Updated message flow to include TextSubscriptionUpdated events
- Clarified text-matcher's role in storing match history

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ruberoid 2025-10-14 13:24:35 +04:00
parent c84dfe56e9
commit 31a4a06bec

View File

@ -7,16 +7,20 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
This is a microservices-based Telegram bot system for text monitoring and notifications. The system consists of 4 main services that communicate via RabbitMQ: This is a microservices-based Telegram bot system for text monitoring and notifications. The system consists of 4 main services that communicate via RabbitMQ:
- **telegram-listener**: Scans open Telegram channels and chats for messages - **telegram-listener**: Scans open Telegram channels and chats for messages
- **telegram-client**: Bot interface for user interactions - **telegram-client**: Bot interface for user interactions
- **text-matcher**: Matches incoming messages against user subscriptions - **text-matcher**: Matches incoming messages against user subscriptions
- **users**: Manages users and their preferences - **users**: Manages users and their preferences
**Important:** This repository is the parent project containing all services as **git submodules**. Each service (telegram-listener, telegram-client, text-matcher, users) is a separate repository added as a submodule. Git tags are created at the parent repository level, which triggers the Drone CI/CD pipeline to automatically build and publish NuGet packages with versions based on the git tag.
## Architecture ## Architecture
The services follow a message bus pattern using RabbitMQ for async communication: The services follow a message bus pattern using RabbitMQ for async communication:
- TelegramListener publishes MessageReceived events - TelegramListener publishes MessageReceived events
- TextMatcher subscribes to MessageReceived, publishes TextMatchCreated/TextMatchMatched events - TextMatcher subscribes to MessageReceived, stores match history in database, and publishes:
- TelegramClient subscribes to TextMatchMatched events and notifies users - TextSubscriptionMatched events (for first-time matches)
- TextSubscriptionUpdated events (for updates to previously matched messages)
- TelegramClient subscribes to both TextSubscriptionMatched and TextSubscriptionUpdated events and notifies users
Each service follows Clean Architecture with separate projects for: Each service follows Clean Architecture with separate projects for:
- Host (API/entry point) - Host (API/entry point)