# zhongfucheng3y/austin architecture

> Architecture diagram of the GitHub repository zhongfucheng3y/austin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zhongfucheng3y/austin
- Repository: https://github.com/zhongfucheng3y/austin

## Overview

##### Project type and purpose
- This is a full-stack, modular, event-driven message-push platform (“austin”) built on Spring Boot.
- It exposes a web UI and REST APIs for template/channel management, then internally assembles message tasks, publishes them to message queues, processes them in a handler pipeline, pushes to third-party channels, and provides real-time tracing and data analytics via Flink/Hive.

##### File-structure–based component breakdown
- **austin-web**: Spring Boot web layer (UI + REST controllers)
- **austin-service-api + service-api-impl**: service-layer interfaces and pipeline orchestration (pre-check → assemble → MQ → post-check)
- **austin-common**: shared domain, DTOs, enums, and pipeline engine abstractions
- **austin-support**: infrastructure adapters (Redis, RabbitMQ, Kafka, RocketMQ, EventBus), thread pools, DAO for MySQL
- **austin-handler**: consumption layer – receives tasks from MQs, runs business-process pipeline actions (deduplication, shield, send, etc.), calls channel SDKs/APIs
- **austin-cron**: scheduled task module (xxl-job integration) for batch/timed sends
- **austin-stream**: Flink job – consumes business/log topics from Kafka, writes metrics to Redis (real-time dashboards) and can sink to Hive
- **austin-data-house**: Hive write-side for long-term analytics; Flink job bootstrap
- **Infra/config**: docker-compose definitions (MySQL, Redis, Kafka, RabbitMQ, RocketMQ, Prometheus, Grafana, Graylog, Flink, Hive, Apollo/Nacos, metabase, xxljob)

##### Key README insights
- Core features: multi-channel messaging, template management, full-link tracing, cron jobs, de-dup, night shield, dynamic routing
- Tech stack: Java 8, Spring Boot 2.5.x, MySQL, Redis, Kafka/RabbitMQ/RocketMQ, Flink, Hive, xxl-job, Apollo/Nacos, Graylog, Prometheus/Grafana, Docker

##### Elements
- Clear, consistent labels for each module and external system
- Green clouds for message brokers (Kafka, RMQ, RocketMQ)
- Purple parallelograms for data pipelines (Flink)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Entry
    User["End User / System"]:::external
    User --> Web

    %% Frontend / API Layer
    Web["API Layer (austin-web)"]:::frontend
    click Web "https://github.com/zhongfucheng3y/austin/tree/master/austin-web/src/main/java/com/java3y/austin/web"

    %% Service Layer
    Web --> ServiceAPI
    ServiceAPI["Service Layer Interfaces\n(austin-service-api)"]:::service
    click ServiceAPI "https://github.com/zhongfucheng3y/austin/tree/master/austin-service-api/src/main/java/com/java3y/austin/service/api"

    ServiceAPI --> ServiceImpl
    ServiceImpl["Service Impl & Pipeline\n(austin-service-api-impl)"]:::service
    click ServiceImpl "https://github.com/zhongfucheng3y/austin/tree/master/austin-service-api-impl/src/main/java/com/java3y/austin/service/api/impl"

    ServiceImpl --> Common
    Common["Shared Domain & Pipeline Engine\n(austin-common)"]:::service
    click Common "https://github.com/zhongfucheng3y/austin/tree/master/austin-common/src/main/java/com/java3y/austin/common"

    ServiceImpl --> Support
    Support["Infrastructure Adapters & DAO\n(austin-support)"]:::service
    click Support "https://github.com/zhongfucheng3y/austin/tree/master/austin-support/src/main/java/com/java3y/austin/support"

    %% Persistence & Cache
    Support --> MySQL
    Support --> Redis

    %% Message Broker Layer
    ServiceImpl -->|"publish tasks"| BrokerKafka
    ServiceImpl -->|"publish tasks"| BrokerRMQ
    ServiceImpl -->|"publish tasks"| BrokerRocket
    ServiceImpl -->|"publish tasks"| BrokerRedisStream

    subgraph "Message Brokers"
        direction TB
        BrokerKafka["Kafka"]:::broker
        BrokerRMQ["RabbitMQ"]:::broker
        BrokerRocket["RocketMQ"]:::broker
        BrokerRedisStream["Redis Streams"]:::broker
    end

    %% Handler Layer
    BrokerKafka --> Handler
    BrokerRMQ --> Handler
    BrokerRocket --> Handler
    BrokerRedisStream --> Handler

    Handler["Handler Layer\n(austin-handler)"]:::service
    click Handler "https://github.com/zhongfucheng3y/austin/tree/master/austin-handler/src/main/java/com/java3y/austin/handler"
    Handler --> ExternalChannels
    Handler -->|"emit events"| BrokerKafka

    %% External Channels
    ExternalChannels["External Channels\n(SMS, Email, WeChat, Push)"]:::external

    %% Scheduler
    Scheduler["Scheduler (xxl-job)\n(austin-cron)"]:::service
    click Scheduler "https://github.com/zhongfucheng3y/austin/tree/master/austin-cron/src/main/java/com/java3y/austin/cron"
    Scheduler --> ServiceImpl

    %% Real-time Processing
    BrokerKafka --> Stream
    Stream["Real-time Processing (Flink)\n(austin-stream)"]:::pipeline
    click Stream "https://github.com/zhongfucheng3y/austin/tree/master/austin-stream/src/main/java/com/java3y/austin/stream"
    Stream --> Redis
    Stream --> Hive

    %% Data Warehouse
    DataHouse["Data Warehouse & Hive Job\n(austin-data-house)"]:::data
    click DataHouse "https://github.com/zhongfucheng3y/austin/tree/master/austin-data-house/src/main/java/com/java3y/austin/datahouse"
    DataHouse --> Hive

    %% Data Stores
    MySQL["MySQL"]:::data
    Redis["Redis"]:::data
    Hive["Hive"]:::data

    %% Config & Infra
    Config["Config Center\n(Apollo/Nacos)"]:::external
    Config -.-> Web
    Config -.-> ServiceImpl
    Config -.-> Handler
    Config -.-> Scheduler
    Config -.-> Stream
    Config -.-> DataHouse

    Monitoring["Monitoring & Logging\n(Prometheus, Grafana, Graylog)"]:::external
    Monitoring -.-> Web
    Monitoring -.-> ServiceImpl
    Monitoring -.-> Handler
    Monitoring -.-> Scheduler
    Monitoring -.-> Stream
    Monitoring -.-> DataHouse

    InfraConfigs["Infra & Config Definitions"]:::external
    click InfraConfigs "https://github.com/zhongfucheng3y/austin/blob/master/docker-compose.yml"
    click InfraConfigs "https://github.com/zhongfucheng3y/austin/tree/master/doc/docker/"
    InfraConfigs --> MySQL
    InfraConfigs --> Redis
    InfraConfigs --> BrokerKafka
    InfraConfigs --> BrokerRMQ
    InfraConfigs --> BrokerRocket
    InfraConfigs --> BrokerRedisStream
    InfraConfigs --> Stream
    InfraConfigs --> Hive
    InfraConfigs --> Config

    %% Styles
    classDef frontend fill:#AEDFF7,stroke:#036,stroke-width:1px;
    classDef service fill:#B3D1FF,stroke:#036,stroke-width:1px;
    classDef broker fill:#C6F6D5,stroke:#266,stroke-width:1px;
    classDef data fill:#FFD59E,stroke:#642,stroke-width:1px;
    classDef pipeline fill:#E9D5FF,stroke:#633,stroke-width:1px;
    classDef external fill:#E2E8F0,stroke:#666,stroke-width:1px;
```
