From de74bd1d7034c88c714e4b8ea80a750691ee1d72 Mon Sep 17 00:00:00 2001 From: Chang lue Tsen Date: Tue, 29 Apr 2025 12:46:19 +0900 Subject: [PATCH] fix(subscribe): improve query logic and handle status filtering --- README.md | 6 +- doc/image/architecture.svg | 849 +++++++++++++++++++++++++++++++++++++ readme_zh.md | 6 +- 3 files changed, 859 insertions(+), 2 deletions(-) create mode 100644 doc/image/architecture.svg diff --git a/README.md b/README.md index 09c6bc3..091435f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
[![License](https://img.shields.io/github/license/perfect-panel/server)](LICENSE) -![Go Version](https://img.shields.io/badge/Go-1.21%2B-blue) +[![Go Version](https://img.shields.io/badge/Go-1.21%2B-blue)](https://go.dev/) [![Go Report Card](https://goreportcard.com/badge/github.com/perfect-panel/server)](https://goreportcard.com/report/github.com/perfect-panel/server) [![Docker](https://img.shields.io/badge/Docker-Available-blue)](Dockerfile) [![CI/CD](https://img.shields.io/github/actions/workflow/status/perfect-panel/server/release.yml)](.github/workflows/release.yml) @@ -125,6 +125,10 @@ The documentation covers all endpoints, request/response formats, and authentica Visit [ppanel.dev](https://ppanel.dev/) for more details. +## 🏛 Architecture + +![Architecture Diagram](./doc/image/architecture.svg) + ## 📁 Directory Structure ``` diff --git a/doc/image/architecture.svg b/doc/image/architecture.svg new file mode 100644 index 0000000..7203796 --- /dev/null +++ b/doc/image/architecture.svg @@ -0,0 +1,849 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

部署环境

+
+
+
+
+
+ + + + +
+ +

perfect-panel/server

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

HTTPS

+
+
+
+
+
+ + + +
+ +

代理协议: SS, Trojan..

+
+
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +

中间件

+
+
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +

读写

+
+
+
+
+
+ + + +
+ +

缓存

+
+
+
+
+
+ + + +
+ +

API 调用

+
+
+
+
+
+ + + +
+ +

构建脚本: Makefile, script

+
+
+
+
+
+ + + +
+ +

Dockerfile

+
+
+
+
+
+ + + +
+ +

RESTful API

+
+
+
+
+
+ + + +
+ +

持久化数据

+
+
+
+
+
+ + + +
+ +

缓存数据

+
+
+
+
+
+
+ + + + + + +
+ +

用户浏览器

+
+
+
+
+
+ + + + + +
+ +

前端: ppanel-web

+
+
+
+
+
+ + + + + +
+ +

代理客户端: Clash,Shadowrocket

+
+
+
+
+
+ + + + + +
+ +

代理核心: Xray-core...

+
+
+
+
+
+ + + + + +
+ +

Web 服务器: Gin

+
+
+
+
+
+ + + + + +
+ +

API 控制器: internal/handler

+
+
+
+
+
+ + + + + +
+ +

中间件: internal/middleware\n认证、日志、CORS

+
+
+
+
+
+ + + + + +
+ +

服务层: internal/svc

+
+
+
+
+
+ + + + + +
+ +

业务逻辑: internal/logic\n用户管理、代理配置、流量统计

+
+
+
+
+
+ + + + + +
+ +

代理核心: Xray / PPNode

+
+
+
+
+
+ + + + + +
+ +

队列服务: queue\n异步任务

+
+
+
+
+
+ + + + + +
+ +

定时任务: scheduler\n数据清理、状态同步

+
+
+
+
+
+ + + + + +
+ +

数据模型: internal/model

+
+
+
+
+
+ + + + + +
+ +

初始化: initialize\n配置加载、DB连接

+
+
+
+
+
+ + + + + +
+ +

配置文件: etc/ppanel.yaml

+
+
+
+
+
+ + + + + +
+ +

公共工具: pkg\n日志、加密、HTTP客户端

+
+
+
+
+
+ + + + + +
+ +

数据库: MySQL

+
+
+
+
+
+ + + + + +
+ +

缓存: Redis

+
+
+
+
+
+ + + + + +
+ +

外部服务: 支付 SDK, 通知

+
+
+
+
+
+ + + + + +
+ +

Docker / Linux 服务器

+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/readme_zh.md b/readme_zh.md index c9e894c..9f38721 100644 --- a/readme_zh.md +++ b/readme_zh.md @@ -3,7 +3,7 @@
[![License](https://img.shields.io/github/license/perfect-panel/server)](LICENSE) -![Go Version](https://img.shields.io/badge/Go-1.21%2B-blue) +[![Go Version](https://img.shields.io/badge/Go-1.21%2B-blue)](https://go.dev/) [![Go Report Card](https://goreportcard.com/badge/github.com/perfect-panel/server)](https://goreportcard.com/report/github.com/perfect-panel/server) [![Docker](https://img.shields.io/badge/Docker-Available-blue)](Dockerfile) [![CI/CD](https://img.shields.io/github/actions/workflow/status/perfect-panel/server/release.yml)](.github/workflows/release.yml) @@ -124,6 +124,10 @@ PPanel 服务端是 PPanel 项目的后端组件,为代理服务提供强大 访问 [ppanel.dev](https://ppanel.dev) 获取更多信息。 +## 🏛 系统架构 + +![Architecture Diagram](./doc/image/architecture.svg) + ## 📁 目录结构 ```