TinyFlow 是一个现代化的高性能短链接生成与统计系统,支持快速生成短链接并提供详细的访问数据分析功能。
- 🚀 极速生成:毫秒级短链生成
- 📊 实时统计:详细的访问数据分析
- 🔗 自定义短码:支持自定义短链接后缀
- 📱 二维码生成:自动生成短链接二维码
- 🌐 多语言支持:完整的中英文国际化
- 基于号段模式的ID生成算法
- 多级缓存架构(本地 + Redis)
- 异步消息队列处理
- 响应式前端设计
- Java 17 或更高版本
- Node.js 18 或更高版本
- MySQL 8.0
- Redis 7.0
- 克隆项目
git clone https://github.com/Layau-code/TinyFlow.git
cd TinyFlow- 启动后端服务
mvn spring-boot:run- 启动前端服务
cd web
npm install
npm run dev- 访问应用
- 前端界面:http://localhost:5173
- 后端API:http://localhost:8080
- 框架:Spring Boot 3.5.7
- 数据库:MySQL + JPA
- 缓存:Redis + Caffeine
- 消息队列:RabbitMQ
- 监控:Spring Boot Actuator
- 框架:Vue 3 + Vite
- 样式:Tailwind CSS
- 图表:ECharts
- 国际化:Vue I18n
src/
├── main/java/com/layor/tinyflow/ # 后端源代码
│ ├── controller/ # API控制器
│ ├── service/ # 业务逻辑
│ ├── repository/ # 数据访问
│ └── entity/ # 数据实体
web/
├── src/ # 前端源代码
│ ├── components/ # Vue组件
│ ├── pages/ # 页面组件
│ └── composables/ # 组合式函数
# 构建后端
mvn clean package -DskipTests
# 构建前端
cd web
npm install
npm run buildserver {
listen 80;
server_name yourdomain.com;
location / {
root /var/www/tinyflow/web/dist;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://localhost:8080;
}
}curl -X POST http://localhost:8080/api/shorten \
-H "Content-Type: application/json" \
-d '{"longUrl": "https://example.com"}'curl -I http://localhost:8080/abc123欢迎提交 Issue 和 Pull Request!请遵循以下流程:
- Fork 本仓库
- 创建功能分支 (
git checkout -b feature/AmazingFeature) - 提交更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 创建 Pull Request
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
如果这个项目对您有帮助,请给个 ⭐️ 支持一下!
