From 31a4a06bec7f2367fe16182a3128b1ef00d3a997 Mon Sep 17 00:00:00 2001 From: ruberoid Date: Tue, 14 Oct 2025 13:24:35 +0400 Subject: [PATCH] Update CLAUDE.md with submodule structure and message flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- CLAUDE.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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)