How tangweichiang/groupproject-capybara-master works
Project Type and Purpose
• This is a real-time streaming pipeline application for issue tracking. The README explains that the system ingests GitHub issue data, processes it in real time using Apache Kafka, and exposes it via both a Spring Boot–based microservice and a Telegram bot interface. The design leverages containerization (Docker) for easier deployment and includes a persistent MySQL database.
File Structure for Architectural Clues
• The top-level files (Dockerfile, compose.yaml, pom.xml) indicate a containerized Java/Spring Boot application.
• The “src/main/java/my/uum” folder is organized into sub-packages including:
– config (e.g., KafkaTopicConfig.java),
– entity (domain objects like Comment.java, Comment2.java),
– github (GitHubApiClient.java) for integration with external GitHub services,
– jpa (repositories and service layers for database interactions),
– kafka (KafkaConsumer1.java, KafkaConsumer2.java, KafkaProducer1.java, KafkaProducer2.java) representing the event streaming components,
– telegram (TelegramBot.java) which handles the bot interactions.
• The “src/main/resources” includes the application.properties file, which likely contains the configuration details required by Spring Boot.
Key Components and Their Relationships
– Spring Boot Application: The central microservice container orchestrating the components.
– Kafka Producers/Consumers: Modules that interact with Apache Kafka to stream data.
– MySQL Database: Persistent data storage for issue/comment data.
– GitHub Integration Module: Responsible for fetching issue data from GitHub.
– Telegram Bot: Provides an end-user interface for real-time interaction (commands like “/start”, “/consumer”, “/quit”).
b. Relationships and Data Flow:
– The GitHub Integration component (in the “github” package) obtains issue and comment data and may push these events to Kafka via one of the Kafka producers.
– Kafka streams the data in real time to one or more Kafka consumers.
– The consumer components then process the events; one branch can persist data via JPA into the MySQL database, while another branch drives the Telegram bot (in the “telegram” package) to notify users.
– The Spring Boot application (entry points like App.java and SpringbootKafka.java) binds these services together and configures transactional and streaming processing.
Important Architectural Patterns/Design Principles
• Use of Microservices—even if within a single application—for separation of concerns: each package (Kafka, GitHub, JPA, Telegram) represents a self-contained logical component.
• Real-time streaming design utilizing Apache Kafka, showing producer-consumer interaction.
• Emphasis on containerization with Docker and orchestration using Docker Compose.
• The layered approach (configuration, domain entities, service/repository, and external integrations) consistent with a typical Spring Boot MVC/REST pattern.
Elements
• Use clear, descriptive labels for each component (e.g., “Kafka Producer”, “Kafka Consumer”, “GitHub API Client”, “Telegram Bot”, “MySQL Database”, “Spring Boot Core”).
– From GitHub API → Kafka Producer → Kafka Topics → Kafka Consumer(s)
– From Kafka Consumer → Database (via JPA) and → Telegram Bot
– Rectangles for microservices or internal modules,
• Optionally, indicate Docker containers and the overall system orchestration using Docker Compose which ties together these individual components.