Files
urldb/README.md

278 lines
7.6 KiB
Markdown
Raw Normal View History

2025-07-21 00:43:07 +08:00
# 🚀 urlDB - 老九网盘资源数据库
2025-07-10 01:27:35 +08:00
2025-07-19 10:07:04 +08:00
<div align="center">
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
![Go Version](https://img.shields.io/badge/Go-1230?logo=go&logoColor=white)
![Vue Version](https://img.shields.io/badge/Vue-334FC08D?logo=vue.js&logoColor=white)
![Nuxt Version](https://img.shields.io/badge/Nuxt-300.8+-00DC82?logo=nuxt.js&logoColor=white)
2025-07-18 00:34:27 +08:00
![License](https://img.shields.io/badge/License-GPL%20v3-blue.svg)
2025-07-17 14:08:52 +08:00
![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15+-336791go=postgresql&logoColor=white)
2025-07-10 01:27:35 +08:00
2025-07-19 00:57:28 +08:00
**一个现代化的网盘资源数据库,支持多网盘自动化转存分享,支持百度网盘,阿里云盘,夸克网盘, 天翼云盘迅雷云盘123云盘115网盘UC网盘 **
2025-07-10 01:27:35 +08:00
2025-08-01 16:14:46 +08:00
🌐 [在线演示](https://pan.l9.lc) | 📖 [文档](https://ecn5khs4t956.feishu.cn/wiki/PsnDwtxghiP0mLkTiruczKtxnwd?from=from_copylink) | 🐛 [问题反馈](https://github.com/ctwj/urldb/issues) | ⭐ [给个星标](https://github.com/ctwj/urldb)
2025-07-10 01:27:35 +08:00
2025-07-19 00:57:28 +08:00
### 支持的网盘平台
| 平台 | 录入 | 转存 | 分享 |
|------|-------|-----|------|
| 百度网盘 | ✅ 支持 | 🚧 开发中 | 🚧 开发中 |
| 阿里云盘 | ✅ 支持 | 🚧 开发中 | 🚧 开发中 |
| 夸克网盘 | ✅ 支持 | ✅ 支持 | ✅ 支持 |
| 天翼云盘 | ✅ 支持 | 🚧 开发中 | 🚧 开发中 |
| 迅雷云盘 | ✅ 支持 | 🚧 开发中 | 🚧 开发中 |
| UC网盘 | ✅ 支持 | 🚧 开发中 | 🚧 开发中 |
| 123云盘 | ✅ 支持 | 🚧 开发中 | 🚧 开发中 |
| 115网盘 | ✅ 支持 | 🚧 开发中 | 🚧 开发中 |
2025-07-17 14:08:52 +08:00
</div>
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
---
2025-07-10 01:27:35 +08:00
2025-07-18 00:34:27 +08:00
## 🔔 温馨提示
📌 **本项目仅供技术交流与学习使用**,自身不存储或提供任何资源文件及下载链接。
📌 **请勿将本项目用于任何违法用途**,否则后果自负。
📌 如有任何问题或建议,欢迎交流探讨! 😊
> **免责声明**:本项目由 Trae AI 辅助编写。由于时间有限,仅在空闲时维护。如遇使用问题,请优先自行排查,感谢理解!
---
2025-07-30 11:18:43 +08:00
## 📸 项目截图
2025-08-01 16:14:46 +08:00
[文档说明](https://ecn5khs4t956.feishu.cn/wiki/PsnDwtxghiP0mLkTiruczKtxnwd?from=from_copylink) [服务器要求](https://ecn5khs4t956.feishu.cn/wiki/W8YBww1Mmiu4Cdkp5W4c8pFNnMf?from=from_copylink)
2025-07-30 11:18:43 +08:00
### 🏠 首页
![首页](https://raw.githubusercontent.com/ctwj/urldb/refs/heads/main/github/index.webp)
### 🔧 后台管理
![后台管理](https://raw.githubusercontent.com/ctwj/urldb/refs/heads/main/github/admin.webp)
### ⚙️ 系统配置
![系统配置](https://raw.githubusercontent.com/ctwj/urldb/refs/heads/main/github/config.webp)
### 🔍 搜索统计
![资源搜索](https://raw.githubusercontent.com/ctwj/urldb/refs/heads/main/github/search.webp)
### 👤 多账号管理
![账号管理](https://raw.githubusercontent.com/ctwj/urldb/refs/heads/main/github/account.webp)
---
2025-07-17 14:08:52 +08:00
## ✨ 功能特性
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
### 🎯 核心功能
- **📁 多平台网盘支持** - 支持夸克网盘、阿里云盘、百度网盘、UC网盘
2025-07-18 00:34:27 +08:00
- **🔍 公开API** - 支持API数据录入资源搜索
- **🏷️ 自动预处理** - 系统自动处理资源, 对数据进行有效性判断
- **📊 自动转存分享** - 有效资源,如果属于支持类型将自动转存分享
- **📱 多账号管理** - 同平台支持多账号管理
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
## 🏗️ 技术架构
### 后端技术栈
- **🦀 Golang 10.23+** - 高性能后端语言
- **🌿 Gin** - 轻量级Web框架
- **🗄️ PostgreSQL** - 关系型数据库
- **🔧 GORM** - ORM框架
- **🔐 JWT** - 身份认证
### 前端技术栈
2025-07-18 00:34:27 +08:00
- **⚡ Nuxt.js 3** - Vue.js全栈框架
2025-07-17 14:08:52 +08:00
- **🎨 Vue 3** - 渐进式JavaScript框架
- **📝 TypeScript** - 类型安全的JavaScript
- **🎨 Tailwind CSS** - 实用优先的CSS框架
- **🔧 Pinia** - 状态管理
---
2025-07-30 11:11:54 +08:00
2025-07-17 14:08:52 +08:00
## 🚀 快速开始
### 环境要求
2025-07-18 00:34:27 +08:00
- **Docker** 和 **Docker Compose**
- 或者本地环境:
- **Go** 1.23+
- **Node.js** 18+
- **PostgreSQL** 15+
- **pnpm** (推荐) 或 npm
2025-07-17 14:08:52 +08:00
### 方式一Docker 部署(推荐)
```bash
# 克隆项目
2025-07-18 09:42:07 +08:00
git clone https://github.com/ctwj/urldb.git
cd urldb
2025-07-17 14:08:52 +08:00
# 使用 Docker Compose 启动
2025-07-18 00:34:27 +08:00
docker compose up --build -d
2025-07-17 14:08:52 +08:00
# 访问应用
2025-07-21 15:27:58 +08:00
# 前端: http://localhost:3030
2025-07-18 00:34:27 +08:00
# 后端API: http://localhost:8080
2025-07-10 01:27:35 +08:00
```
2025-07-17 14:08:52 +08:00
### 方式二:本地开发
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
#### 1. 克隆项目
```bash
2025-07-18 09:42:07 +08:00
git clone https://github.com/ctwj/urldb.git
cd urldb
2025-07-17 14:08:52 +08:00
```
2025-07-18 00:34:27 +08:00
#### 2. 后端设置
2025-07-10 01:27:35 +08:00
```bash
# 复制环境变量文件
cp env.example .env
2025-07-17 14:08:52 +08:00
# 编辑环境变量
vim .env
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
# 安装Go依赖
2025-07-10 01:27:35 +08:00
go mod tidy
2025-07-17 14:08:52 +08:00
# 启动后端服务
2025-07-10 01:27:35 +08:00
go run main.go
```
2025-07-18 00:34:27 +08:00
#### 3. 前端设置
2025-07-10 01:27:35 +08:00
```bash
# 进入前端目录
cd web
# 安装依赖
2025-07-10 13:56:37 +08:00
pnpm install
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
# 启动开发服务器
2025-07-10 13:56:37 +08:00
pnpm dev
2025-07-10 01:27:35 +08:00
```
2025-07-17 14:08:52 +08:00
#### 4. 数据库设置
```sql
-- 创建数据库
2025-07-19 00:44:00 +08:00
CREATE DATABASE url_db;
2025-07-17 14:08:52 +08:00
```
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
---
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
## 📁 项目结构
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
```
l9pan/
├── 📁 common/ # 通用功能模块
│ ├── 📄 pan_factory.go # 网盘工厂模式
│ ├── 📄 alipan.go # 阿里云盘实现
│ ├── 📄 baidu_pan.go # 百度网盘实现
│ ├── 📄 quark_pan.go # 夸克网盘实现
│ └── 📄 uc_pan.go # UC网盘实现
├── 📁 db/ # 数据库层
│ ├── 📁 entity/ # 数据实体
│ ├── 📁 repo/ # 数据仓库
│ ├── 📁 dto/ # 数据传输对象
│ └── 📁 converter/ # 数据转换器
├── 📁 handlers/ # API处理器
├── 📁 middleware/ # 中间件
├── 📁 utils/ # 工具函数
├── 📁 web/ # 前端项目
│ ├── 📁 pages/ # 页面组件
│ ├── 📁 components/ # 通用组件
│ ├── 📁 composables/ # 组合式函数
│ └── 📁 stores/ # 状态管理
├── 📁 docs/ # 项目文档
2025-07-19 10:07:04 +08:00
├── 📁 nginx/ # Nginx配置
│ ├── 📄 nginx.conf # 主配置文件
│ └── 📁 conf.d/ # 站点配置
2025-07-17 14:08:52 +08:00
├── 📄 main.go # 主程序入口
├── 📄 Dockerfile # Docker配置
├── 📄 docker-compose.yml # Docker Compose配置
2025-07-19 10:07:04 +08:00
├── 📄 docker-start-nginx.sh # Nginx启动脚本
2025-07-17 14:08:52 +08:00
└── 📄 README.md # 项目说明
```
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
---
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
## 🔧 配置说明
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
### 环境变量配置
2025-07-10 01:27:35 +08:00
```bash
2025-07-17 14:08:52 +08:00
# 数据库配置
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
2025-07-19 00:44:00 +08:00
DB_NAME=url_db
2025-07-17 14:08:52 +08:00
# 服务器配置
PORT=8080
# 时区配置
TIMEZONE=Asia/Shanghai
2025-07-10 01:27:35 +08:00
```
2025-07-18 00:34:27 +08:00
### Docker 服务说明
| 服务 | 端口 | 说明 |
|------|------|------|
2025-07-22 09:40:23 +08:00
| server | 3030 | 应用 |
| postgres | 5431 | PostgreSQL 数据库 |
2025-07-18 00:34:27 +08:00
2025-07-22 09:40:23 +08:00
### 镜像构建
2025-07-20 23:22:10 +08:00
2025-07-22 09:40:23 +08:00
```
docker build -t ctwj/urldb-frontend:1.0.7 --target frontend .
docker build -t ctwj/urldb-backend:1.0.7 --target backend .
docker push ctwj/urldb-frontend:1.0.7
docker push ctwj/urldb-backend:1.0.7
```
2025-07-20 23:22:10 +08:00
2025-07-17 14:08:52 +08:00
---
## 📚 API 文档
### 公开统计
提供批量入库和搜索api通过 apiToken 授权
2025-07-24 12:27:39 +08:00
> 📖 完整API文档请访问`http://doc.l9.lc/`
2025-07-17 14:08:52 +08:00
## 🤝 贡献指南
我们欢迎所有形式的贡献!
## 📄 许可证
2025-07-19 00:44:00 +08:00
本项目采用 [GPL License](LICENSE) 许可证。
2025-07-17 14:08:52 +08:00
---
## 🙏 致谢
感谢以下开源项目的支持:
- [Gin](https://github.com/gin-gonic/gin) - Go Web框架
- [Nuxt.js](https://nuxt.com/) - Vue.js全栈框架
- [Tailwind CSS](https://tailwindcss.com/) - CSS框架
- [GORM](https://gorm.io/) - Go ORM库
---
## 📞 联系我们
2025-07-18 09:42:07 +08:00
- **项目地址**: [https://github.com/ctwj/urldb](https://github.com/ctwj/urldb)
- **问题反馈**: [Issues](https://github.com/ctwj/urldb/issues)
2025-07-17 14:08:52 +08:00
- **邮箱**: 510199617@qq.com
---
2025-07-19 10:07:04 +08:00
<div align="center">
2025-07-17 14:08:52 +08:00
**如果这个项目对您有帮助,请给我们一个 ⭐ Star**
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
Made with ❤️ by [老九]
2025-07-10 01:27:35 +08:00
2025-07-17 14:08:52 +08:00
</div>