Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shuakami/linkit
✨高性能的企业级短链接服务系统。基于Go + DDD架构,支持智能跳转、访问统计和安全管理,毫秒级响应,轻松应对高并发场景。High-performance enterprise URL shortening service. Built with Go + DDD architecture, featuring smart redirection, access analytics, and security management. Millisecond-level response time for high-concurrency scenarios.
https://github.com/shuakami/linkit
clean-architecture ddd enterprise-ready gin go golang high-performance link-management postgresql redis short-url url-shortener
Last synced: 1 day ago
JSON representation
✨高性能的企业级短链接服务系统。基于Go + DDD架构,支持智能跳转、访问统计和安全管理,毫秒级响应,轻松应对高并发场景。High-performance enterprise URL shortening service. Built with Go + DDD architecture, featuring smart redirection, access analytics, and security management. Millisecond-level response time for high-concurrency scenarios.
- Host: GitHub
- URL: https://github.com/shuakami/linkit
- Owner: shuakami
- License: agpl-3.0
- Created: 2025-02-13T14:56:56.000Z (1 day ago)
- Default Branch: master
- Last Pushed: 2025-02-13T15:22:47.000Z (1 day ago)
- Last Synced: 2025-02-13T16:25:25.027Z (1 day ago)
- Topics: clean-architecture, ddd, enterprise-ready, gin, go, golang, high-performance, link-management, postgresql, redis, short-url, url-shortener
- Language: Go
- Homepage:
- Size: 4.56 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Linkit
简体中文 | English这是一个使用 Go 语言开发的高性能短链接服务系统,采用领域驱动设计(DDD)和整洁架构(Clean Architecture)实现。
它不仅提供基本的短链接功能,还支持智能跳转和详细的访问统计,帮助企业更好地管理和分析链接数据。
## 产品特性
## 核心功能
- **短链接生成**:支持长链接转短链接,支持自定义短码。
- **智能跳转**:根据访问者的设备类型、地理位置等条件进行智能跳转。
- **访问统计**:提供详细的访问数据统计,包括访问次数、来源、设备类型等。
- **安全管理**:支持链接过期时间设置和访问次数限制,确保链接安全。## 技术架构
Linkit 采用了现代化的技术栈,确保系统的高性能和可扩展性:
- **Web 框架**:Gin - 轻量高效,适合高并发场景。
- **数据库**:PostgreSQL - 强大的数据存储和查询能力。
- **缓存**:Redis - 多级缓存策略,提升系统响应速度。
- **架构设计**:DDD + Clean Architecture - 业务逻辑清晰,易于维护和扩展。## 快速开始
以下是快速启动 Linkit 服务的步骤:
1. 克隆项目到本地:
```bash
git clone https://github.com/shuakami/linkit.git
cd linkit
```2. 环境准备:
- 安装 Go 1.21+
- 安装 PostgreSQL 14+
- 安装 Redis 7+3. 配置服务:
项目根目录下有一个示例配置文件 `configs/config.example.yaml`,复制一份并重命名为 `config.yaml`:Windows:
```cmd
copy configs\config.example.yaml configs\config.yaml
```
Linux/Mac:
```bash
cp configs/config.example.yaml configs/config.yaml
```然后编辑 `config.yaml` 文件,主要需要修改以下配置:
- 数据库连接信息(host、port、user、password、dbname)
- Redis连接信息(host、port、password)
- 短链接域名(domain)4. 启动服务:
```bash
# 下载依赖
go mod download
# 初始化数据库
go run scripts/migrate.go
# 启动服务
go run cmd/main.go
```服务启动后,你可以:
1. 访问 https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/shuakami/linkit/master/docs/api.yaml 查看在线API文档
2. 或直接查看项目中的 `docs/api.yaml` 文件了解API详情> 如果你觉得这个项目对你有帮助,那就给个Star呗~