# r-pan **Repository Path**: w599472701/r-pan ## Basic Information - **Project Name**: r-pan - **Description**: 简单的云盘系统 后期需要结合easy pan - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: develop - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2025-03-18 - **Last Updated**: 2025-10-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # r-pan 云盘系统 / r-pan Cloud Storage System ## 📦 项目简介 / Project Overview r-pan 是一个基于 **JDK 21** 开发的现代化云盘系统,致力于提供高效、安全、可扩展的文件存储服务。支持文件断点续传、秒传、分片上传、上传重试、权限控制、外链分享、前端管理等功能,适合部署为个人网盘、企业文件中心或教学实践项目。 r-pan is a modern cloud storage system built on **JDK 21**, designed to deliver efficient, secure, and scalable file storage services. It supports breakpoint resume, instant upload, chunked upload, retry mechanisms, access control, shareable links, and a front-end management UI—ideal for personal drives, enterprise file centers, or educational projects. --- ## 🧩 项目架构 / Architecture - **后端 / Backend**:Spring Boot 3 + JDK 21 + Maven + MyBatis-Plus + MinIO SDK - **数据库 / Database**:MySQL(或兼容关系型数据库 / or any relational DB) - **模块划分 / Modules**: - `core`:业务核心逻辑(上传管理、分片处理等 / core logic: upload & chunk handling) - `web`:接口暴露层,采用 RESTful 设计 / RESTful API layer - `common`:通用工具类、响应封装 / common utilities & response wrappers - `storage`:本地磁盘 & MinIO(兼容 S3),可扩展至阿里 OSS、腾讯 COS 等 / local + S3-compatible storage, extendable - `cache`:Redis 分布式缓存与锁,优化高并发 / Redis cache & distributed locks for concurrency - `lock`:本地锁模块,可扩展至 Redis 分布式锁 / local locks, extendable to Redis locks --- ## 🚀 功能亮点 / Key Features ### 📂 文件上传与管理 / File Upload & Management - ✅ **断点续传 / Breakpoint Resume** 支持大文件中断后恢复,仅补传未完成部分。 Resume large uploads by only sending missing chunks. - ✅ **秒传机制 / Instant Upload** 基于文件指纹(哈希)快速判断是否已上传,瞬间完成。 Detect duplicates via file hash to skip re-upload. - ✅ **分片上传与合并 / Chunked Upload & Merge** 多分片并发上传,后端自动合并完整文件。 Parallel chunk uploads with server-side merge. - ✅ **上传重试机制 / Retry Mechanism** 失败分片可自动或手动重试,保障上传成功。 Automatic/manual retry for failed chunks. ### 👥 用户与权限控制 / User & Access Control - ✅ **多用户系统 / Multi-user** 注册、登录、文件隔离,多用户独立空间。 - ✅ **权限管理 / Permissions** 文件可设公开、私有或访问密码策略。 ### 🌐 文件分享与前端界面 / Sharing & UI - ✅ **外链分享 / Shareable Links** 生成临时下载链接,可设置过期时间与访问次数。 - 🔜 **二维码分享(计划中)/ QR Code Sharing (Planned)** 移动端扫码下载支持。 - ✅ **前端管理界面 / Front-end UI** Vue 3 + Element Plus 实现:上传、下载、预览、重命名、删除、拖拽、多文件、进度条等。 ### 📦 存储与扩展性 / Storage & Extensibility - ✅ **本地磁盘存储 / Local Disk** 可配置存储路径。 - ✅ **可扩展存储接口 / Extensible Storage API** 兼容 MinIO/S3,预留对接阿里 OSS、腾讯 COS、七牛云等。 - ✅ **数据持久化 / Data Persistence** 用户、文件元数据、上传记录均存储于 MySQL。 --- ## 🛠️ 安装教程 / Installation & Usage 1. 克隆项目代码 / Clone the repo: ```bash git clone https://gitee.com/w599472701/r-pan.git cd r-pan 2. 构建并运行后端 / Build & run backend: ```bash mvn clean install java -jar web/target/r-pan-web.jar 3. 配置 / Configuration: ```bash 在 application.yml 中设置数据库、Redis、MinIO 连接信息。 可选环境变量:SPRING_PROFILES_ACTIVE、MINIO_ENDPOINT、REDIS_HOST 等。 ## 💡 赞助声明 本项目由 [VTEXS](https://console.vtexs.com/) 的「开源项目免费 VPS 计划」提供算力支持。 感谢 [VTEXS](https://console.vtexs.com/) 对开源社区的支持!