diff --git a/README.md b/README.md index 4c12041..72f7eca 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,21 @@ A lightweight, standalone email gateway service written in Go. It provides a sim - **Configurable**: extensive configuration via `config.yaml`, environment variables, or command-line flags. - **Single Binary**: Easy to deploy with no external runtime dependencies. +## Architecture + +### System Architecture +The service acts as a lightweight middleware between your applications and SMTP providers. +1. **API Layer**: Exposes a RESTful interface using Gin Gonic. +2. **Auth Layer**: Validates requests via Bearer Token. +3. **Service Layer**: Handles email composition and attachment processing. +4. **Integration**: Communicates with external SMTP servers to deliver messages. + +### Technical Stack +- **Language**: [Go](https://go.dev/) (1.18+) +- **Web Framework**: [Gin Gonic](https://gin-gonic.com/) +- **Email Client**: [Gomail](https://github.com/go-gomail/gomail) +- **Config Management**: YAML & Environment Variables + ### Getting Started #### Prerequisites diff --git a/README_CN.md b/README_CN.md index bd94a4d..bf40d4e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -18,6 +18,21 @@ - **灵活配置**: 支持 `config.yaml`、环境变量或命令行参数配置。 - **单文件部署**: 编译为单个二进制文件,无外部运行时依赖。 +## 架构说明 + +### 系统架构 +本服务作为一个轻量级中间件,连接您的应用与 SMTP 服务商。 +1. **API 层**: 使用 Gin Gonic 提供的 RESTful 接口。 +2. **认证层**: 通过 Bearer Token 进行请求验证。 +3. **服务层**: 负责邮件内容的构建及附件处理。 +4. **集成层**: 与外部 SMTP 服务器通信,完成最终投递。 + +### 技术栈 +- **核心语言**: [Go](https://go.dev/) (1.18+) +- **Web 框架**: [Gin Gonic](https://gin-gonic.com/) +- **邮件库**: [Gomail](https://github.com/go-gomail/gomail) +- **配置管理**: YAML 与 环境变量 + ### 快速开始 #### 前置要求