
PlantUML
Edit PlantUML in VPasCode
@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
title PayQuick - 容器图
Person(customer, "客户", "使用移动应用或 Web 界面")
Person(merchant, "商家", "使用 Web 管理面板")
System_Boundary(payquick, "PayQuick 平台") {
Container(mobile_app, "移动应用", "React Native, TypeScript", "为客户提供用户界面")
Container(web_app, "Web 应用", "React, TypeScript", "提供管理员和商家管理面板")
Container(api_gateway, "API 网关", "Node.js, Express", "处理路由、认证和限流")
Container(payment_service, "支付服务", "Java, Spring Boot", "处理支付并管理交易")
Container(notification_service, "通知服务", "Python, FastAPI", "发送短信和电子邮件通知")
ContainerDb(database, "数据库", "PostgreSQL", "存储用户账户、交易和余额")
ContainerDb(cache, "缓存", "Redis", "存储会话数据和频繁访问的记录")
ContainerQueue(queue, "消息队列", "RabbitMQ", "处理异步通知")
}
System_Ext(bank_api, "银行 API", "外部银行集成")
System_Ext(sms_provider, "Twilio 短信 API", "外部短信发送")
Rel(customer, mobile_app, "使用", "HTTPS")
Rel(merchant, web_app, "使用", "HTTPS")
Rel(mobile_app, api_gateway, "调用 API", "HTTPS/JSON")
Rel(web_app, api_gateway, "调用 API", "HTTPS/JSON")
Rel(api_gateway, payment_service, "路由请求至", "gRPC")
Rel(api_gateway, notification_service, "路由请求至", "gRPC")
Rel(payment_service, database, "读写数据至", "JDBC")
Rel(payment_service, cache, "缓存常用数据至", "Redis 协议")
Rel(notification_service, queue, "发布事件至", "AMQP")
Rel(notification_service, sms_provider, "通过", "REST API 发送短信")
Rel(payment_service, bank_api, "通过", "HTTPS 处理转账")
@enduml










