# natiejun/orise-charge-cloud architecture

> Architecture diagram of the GitHub repository natiejun/orise-charge-cloud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/natiejun/orise-charge-cloud
- Repository: https://github.com/natiejun/orise-charge-cloud

## Overview

##### Project type and purpose
- This is a cloud-native, full-stack microservices application for an EV charging platform.
- It consists of backend microservices (charging infrastructure, user operations, simulation, client service), a front-end admin console, and a mobile (mini-program) client.

##### File structure
- Top-level “omind-api” defines service interfaces.
- “omind-modules” holds implementation microservices:
- omind-baseplat (infrastructure service)
- omind-userplat (charging operations)
- omind-mp (mini-program back end)
- omind-simplat (simulated charging pile)
- ruoyi-* modules provide the common scaffolding: auth, gateway, config, registry, resource, system, job, etc.
- “config” folder contains Nacos and Grafana dashboards.
- “docker” contains docker-compose setup for MySQL, Redis, RabbitMQ, MinIO, Nacos, and Nginx.

##### Insights from the README
- Architecture: microservices with Spring Cloud, Dubbo (low-latency RPC), Redis cache, RabbitMQ event bus, Nacos config & service registry.
- UI: Vue-admin front-end, uni-app mobile client, API Gateway for routing.
- Runtime: Docker-compose orchestration, dynamic scaling, multi-tenant, high concurrency via smart-socket.

##### Essential details without overcrowding
- A second layer showing internal interactions of a single service if needed.
- Avoid drawing every single sub-module; focus on service boundaries and data flows.
- Reference the “Cloud 服务架构图.png” in the README as inspiration.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Clients"
        AdminWeb["Admin Web UI\n(Vue-admin)"]:::client
        MobileApp["Mobile Mini-Program\n(uni-app)"]:::client
        SimCLI["Simulation CLI"]:::client
    end

    subgraph "Gateway Layer"
        GW["API Gateway\n(ruoyi-gateway)"]:::gateway
        Auth["Authentication Service\n(ruoyi-auth)"]:::gateway
        GW --> Auth
    end

    subgraph "Service Registry & Config"
        NacosApp["Nacos\nRegistry & Config"]:::infra
    end

    subgraph "Core Microservices"
        CPS["Charging Infrastructure Service\n(omind-baseplat)"]:::core
        COS["Charging Operations Service\n(omind-userplat)"]:::core
        MPS["Mini-Program Service\n(omind-mp)"]:::core
        SPS["Simulated Pile Service\n(omind-simplat)"]:::core
    end

    subgraph "Common Services"
        RS["Resource Service\n(ruoyi-resource)"]:::common
        SS["System Service\n(ruoyi-system)"]:::common
        JS["Job Service\n(ruoyi-job)"]:::common
    end

    subgraph "Infrastructure Services"
        DB["MySQL"]:::infra
        Cache["Redis"]:::infra
        MQ["RabbitMQ"]:::infra
        Storage["MinIO"]:::infra
        Graf["Grafana Dashboards"]:::infra
    end

    subgraph "External Platforms"
        ExtCharge["Third-Party Charging Platforms"]:::external
    end

    %% Client to Gateway
    AdminWeb --> GW
    MobileApp --> GW
    SimCLI --> GW

    %% Gateway to Registry & Config
    GW --> NacosApp
    Auth --> NacosApp

    %% Gateway to Microservices
    Auth --> CPS
    Auth --> COS
    Auth --> MPS
    Auth --> SPS

    %% Microservices registration
    CPS -->|"register & fetch config"| NacosApp
    COS -->|"register & fetch config"| NacosApp
    MPS -->|"register & fetch config"| NacosApp
    SPS -->|"register & fetch config"| NacosApp

    %% Microservices sync & async interactions
    SPS -->|"events"| MQ
    CPS -->|"events"| MQ
    COS -->|"events"| MQ

    %% Microservices to Common Services
    CPS --> RS
    CPS --> SS
    CPS --> JS
    COS --> RS
    COS --> SS
    COS --> JS
    MPS --> RS
    MPS --> SS
    MPS --> JS

    %% Microservices to Infra
    CPS --> DB
    COS --> DB
    MPS --> DB
    SPS --> DB
    CPS --> Cache
    COS --> Cache
    MPS --> Cache
    SPS --> Cache
    CPS --> Storage
    COS --> Storage
    MPS --> Storage
    SPS --> Storage

    %% Monitoring
    Graf --> NacosApp
    Graf --> DB
    Graf --> MQ
    Graf --> Cache

    %% External integrations
    CPS -->|"sync API"| ExtCharge
    COS -->|"sync API"| ExtCharge

    %% Click Events
    click GW "https://github.com/natiejun/orise-charge-cloud/blob/master/ruoyi-gateway/src/main/java/org/dromara/gateway/RuoYiGatewayApplication.java"
    click Auth "https://github.com/natiejun/orise-charge-cloud/blob/master/ruoyi-auth/src/main/java/org/dromara/auth/RuoYiAuthApplication.java"
    click NacosApp "https://github.com/natiejun/orise-charge-cloud/blob/master/config/nacos/application-common.yml"
    click NacosApp "https://github.com/natiejun/orise-charge-cloud/blob/master/config/nacos/ruoyi-gateway.yml"
    click NacosApp "https://github.com/natiejun/orise-charge-cloud/blob/master/config/nacos/ruoyi-auth.yml"
    click CPS "https://github.com/natiejun/orise-charge-cloud/blob/master/omind-modules/omind-baseplat/src/main/java/org/dromara/omind/baseplat/OmindBaseplatApplication.java"
    click COS "https://github.com/natiejun/orise-charge-cloud/blob/master/omind-modules/omind-userplat/src/main/java/org/dromara/omind/userplat/OmindUserplatApplication.java"
    click MPS "https://github.com/natiejun/orise-charge-cloud/blob/master/omind-modules/omind-mp/src/main/java/org/dromara/omind/mp/OmindMpApplication.java"
    click SPS "https://github.com/natiejun/orise-charge-cloud/blob/master/omind-modules/omind-simplat/src/main/java/org/dromara/omind/simplat/OmindSimplatApplication.java"
    click RS "https://github.com/natiejun/orise-charge-cloud/blob/master/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/RuoYiResourceApplication.java"
    click SS "https://github.com/natiejun/orise-charge-cloud/blob/master/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/RuoYiSystemApplication.java"
    click JS "https://github.com/natiejun/orise-charge-cloud/blob/master/ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/RuoYiJobApplication.java"
    click Graf "https://github.com/natiejun/orise-charge-cloud/blob/master/config/grafana/Nacos.json"

    %% Styles
    classDef client fill:#ccffcc,stroke:#333,stroke-width:1px;
    classDef gateway fill:#cce5ff,stroke:#333,stroke-width:1px;
    classDef core fill:#ffd699,stroke:#333,stroke-width:1px;
    classDef common fill:#e5ccff,stroke:#333,stroke-width:1px;
    classDef infra fill:#e0e0e0,stroke:#333,stroke-width:1px;
    classDef external fill:#ffffff,stroke-dasharray:5 5,stroke:#333;
```
