diff --git a/CLAUDE.md b/CLAUDE.md index 007b091..7fbb8b4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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: - **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 - **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 The services follow a message bus pattern using RabbitMQ for async communication: - TelegramListener publishes MessageReceived events -- TextMatcher subscribes to MessageReceived, publishes TextMatchCreated/TextMatchMatched events -- TelegramClient subscribes to TextMatchMatched events and notifies users +- TextMatcher subscribes to MessageReceived, stores match history in database, and publishes: + - 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: - Host (API/entry point)