From 2e21a14b50c231d186d7f1cf927390ba3385bd85 Mon Sep 17 00:00:00 2001 From: Lan Date: Sun, 26 Jan 2025 10:57:46 +0800 Subject: [PATCH] feat: update readme --- readme.md | 326 +++++++++++++++++++++++++++++++++++++++++---------- readme_en.md | 313 ++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 532 insertions(+), 107 deletions(-) diff --git a/readme.md b/readme.md index e159354..81e0bb0 100644 --- a/readme.md +++ b/readme.md @@ -1,92 +1,290 @@ -![banner](https://fastly.jsdelivr.net/gh/vastsa/FileCodeBox@V1.6/static/banners/img_1.png) +# FileCodeBox - 文件快递柜
-

文件快递柜-轻量

-

匿名口令分享文本,文件,像拿快递一样取文件

-

交流Q群:739673698

+ +FileCodeBox Logo + +

匿名口令分享文本和文件,像拿快递一样取文件

+ +[![GitHub stars](https://img.shields.io/github/stars/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/stargazers) +[![GitHub forks](https://img.shields.io/github/forks/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/network) +[![GitHub issues](https://img.shields.io/github/issues/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/issues) +[![GitHub license](https://img.shields.io/github/license/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/blob/master/LICENSE) +[![QQ Group](https://img.shields.io/badge/QQ%20Group-739673698-blue.svg)](https://qm.qq.com/cgi-bin/qm/qr?k=eMXxqKZBrwjWYgPgpBjhQ8-q8_eK-BoR&jump_from=webapi&authKey=6vXVaJ3nXgEVoQzV9OFX+XvRyPJhJd7l9QQhBkZz+qBk1YYqxUXyqBuPL4WLkjMj) +[![Python Version](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org) +[![FastAPI](https://img.shields.io/badge/FastAPI-0.68+-green.svg)](https://fastapi.tiangolo.com) +[![Vue Version](https://img.shields.io/badge/Vue.js-3.x-brightgreen.svg)](https://v3.vuejs.org) + +[English](./readme_en.md) | [部署教程](https://github.com/vastsa/FileCodeBox/wiki/部署教程) | [常见问题](https://github.com/vastsa/FileCodeBox/wiki/常见问题) +
+## 📝 项目简介 ---- +FileCodeBox 是一个基于 FastAPI + Vue3 开发的轻量级文件分享工具。它允许用户通过简单的方式分享文本和文件,接收者只需要一个提取码就可以取得文件,就像从快递柜取出快递一样简单。 +## 🖼️ 功能预览 -
- 简体中文 | - English | - 部署教程 | - 常见问题 +
+

+ +前端仓库 + +    + +演示站点 + +

-## 新版预览 -前端开源地址:https://github.com/vastsa/FileCodeBoxFronted +### 新版界面 +
+ + + + + + + + + + + + + + + + + +
文件上传文本分享
文件管理系统设置
移动端深色模式
国际化响应式
+
-预览:share.lanol.cn - - - - +### 经典界面 +
+
寄文件寄文件
+ + + - - - + + + - - - + + + - - - +
首页上传
寄文件寄文件
管理设置
寄文件寄文件
分享下载
寄文件寄文件
+
+ +## 🎯 应用场景 + + + + + + + + + + +
+

📁 临时文件分享

+快速分享单个文件,无需注册登录 +
+

📝 文本快速分享

+分享代码片段、文本内容等 +
+

🕶️ 匿名文件传输

+保护隐私的文件传输方式 +
+

💾 临时文件存储

+支持设置过期时间的文件存储 +
+

🔄 跨平台传输

+在不同设备间快速传输文件 +
+

🌐 小型分享服务

+搭建私有的文件分享服务 +
-## 部分截图 +## ✨ 核心特性 - - - - +
寄文件寄文件
+ + + + - - - + + + + - - - + + + + + + + + +
+

🚀 轻量简洁

+基于 FastAPI + SQLite3 + Vue3 + ElementUI,部署简单,性能出色 +
+

📤 便捷上传

+支持复制粘贴、拖拽上传,操作简单直观 +
+

📦 多种类型

+支持文本和各类文件的分享 +
寄文件寄文件
+

🔒 安全机制

+ +- IP 限制上传次数 +- 错误次数限制 +- 文件过期机制 +
+

🎫 提取码分享

+随机提取码,可自定义次数及有效期 +
+

🌍 多语言支持

+支持中文简体、繁体及英文 +
寄文件寄文件
+

🎭 匿名分享

+无需注册登录,保护隐私 +
+

🛠 管理面板

+文件管理和系统配置 +
+

🐳 容器部署

+支持 Docker 一键部署 +
+

💾 存储扩展

+支持本地存储、S3 协议、OneDrive 等 +
+

📱 响应式设计

+支持移动端访问 +
+

💻 终端支持

+支持命令行下载 +
-## 主要特色 +## 🚀 快速开始 -- [x] **轻量简洁:** 项目基于Fastapi + Sqlite3 + Vue3 + ElementUI -- [x] **轻松上传:** 支持复制粘贴和拖拽选择 -- [x] **多种类型:** 支持文本和文件 -- [x] **防止爆破:** 错误次数限制 -- [x] **防止滥用:** IP限制上传次数 -- [x] **口令分享:** 随机口令,存取文件,自定义次数及有效期 -- [x] **国际化:** 支持中文简体、繁体以及英文等 -- [x] **匿名分享:** 无需注册,无需登录 -- [x] **管理面板:** 查看和删除文件 -- [x] **一键部署:** 支持Docker一键部署 -- [x] **自由拓展:** 支持S3协议和本地文件流,可根据需求在storage文件中新增存储引擎 -- [x] **简单明了:** 适合新手练手项目 -- [x] **终端下载:** 终端命令`wget https://share.lanol.cn/share/select?code=83432` +### Docker 部署 + +```bash +docker run -d --name filecode \ + -p 12345:12345 \ + -v /opt/filecode:/app/data \ + --restart=always \ + vastsa/filecode +``` + +### 手动部署 + +1. 克隆项目 +```bash +git clone https://github.com/vastsa/FileCodeBox.git +``` + +2. 安装依赖 +```bash +cd FileCodeBox +pip install -r requirements.txt +``` + +3. 启动服务 +```bash +python main.py +``` + +## 📖 使用说明 + +### 分享文件 +1. 打开网页,点击"分享文件" +2. 选择或拖拽文件 +3. 设置过期时间和次数 +4. 获取提取码 + +### 获取文件 +1. 打开网页,输入提取码 +2. 点击获取 +3. 下载文件或查看文本 + +### 管理面板 +1. 访问 `/admin` +2. 输入管理员密码 +3. 管理文件和配置 + +## 🛠 开发指南 + +### 项目结构 +``` +FileCodeBox/ +├── apps/ # 应用代码 +│ ├── admin/ # 管理后台 +│ └── base/ # 基础功能 +├── core/ # 核心功能 +├── data/ # 数据目录 +└── fcb-fronted/ # 前端代码 +``` + +### 开发环境 +- Python 3.8+ +- Node.js 14+ +- Vue 3 +- FastAPI + +### 本地开发 +1. 后端开发 +```bash +python main.py +``` + +2. 前端开发 +```bash +cd fcb-fronted +npm install +npm run dev +``` + +## 🤝 贡献指南 + +1. Fork 本项目 +2. 创建新分支 `git checkout -b feature/xxx` +3. 提交更改 `git commit -m 'Add xxx'` +4. 推送到分支 `git push origin feature/xxx` +5. 提交 Pull Request + +## ❓ 常见问题 + +### Q: 如何修改上传大小限制? +A: 在管理面板中修改配置项 `uploadSize` + +### Q: 如何配置存储引擎? +A: 在管理面板中选择存储引擎并配置相应参数 + +### Q: 如何备份数据? +A: 备份 `data` 目录即可 + +更多问题请访问 [Wiki](https://github.com/vastsa/FileCodeBox/wiki/常见问题) + +## 📊 项目统计 -## Badges
-Featured|HelloGitHub +Featured|HelloGitHub + +![Repobeats](https://repobeats.axiom.co/api/embed/7a6c92f1d96ee57e6fb67f0df371528397b0c9ac.svg) + +[![Star History](https://api.star-history.com/svg?repos=vastsa/FileCodeBox&type=Date)](https://star-history.com/#vastsa/FileCodeBox&Date)
-## 状态 +## 📜 免责声明 -![Alt](https://repobeats.axiom.co/api/embed/7a6c92f1d96ee57e6fb67f0df371528397b0c9ac.svg "Repobeats analytics image") - -## Star History - -[![Star History Chart](https://api.star-history.com/svg?repos=vastsa/FileCodeBox&type=Date)](https://star-history.com/#vastsa/FileCodeBox&Date) - - -## 免责声明 - -本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与本人无关。使用请保留项目地址,谢谢。 +本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与作者无关。使用时请保留项目地址和版权信息。 diff --git a/readme_en.md b/readme_en.md index 05dda3d..6a4336a 100644 --- a/readme_en.md +++ b/readme_en.md @@ -1,63 +1,290 @@ +# FileCodeBox +
-

File Delivery Cabinet - Lite

-

FileCodeBox-Lite

-

Anonymous passcode sharing of text and files, picking up files just like picking up express deliveries

-

Join our QQ Group: 739673698

+ +FileCodeBox Logo + +

Share text and files anonymously with a passcode, like picking up a package

+ +[![GitHub stars](https://img.shields.io/github/stars/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/stargazers) +[![GitHub forks](https://img.shields.io/github/forks/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/network) +[![GitHub issues](https://img.shields.io/github/issues/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/issues) +[![GitHub license](https://img.shields.io/github/license/vastsa/FileCodeBox)](https://github.com/vastsa/FileCodeBox/blob/master/LICENSE) +[![QQ Group](https://img.shields.io/badge/QQ%20Group-739673698-blue.svg)](https://qm.qq.com/cgi-bin/qm/qr?k=eMXxqKZBrwjWYgPgpBjhQ8-q8_eK-BoR&jump_from=webapi&authKey=6vXVaJ3nXgEVoQzV9OFX+XvRyPJhJd7l9QQhBkZz+qBk1YYqxUXyqBuPL4WLkjMj) +[![Python Version](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org) +[![FastAPI](https://img.shields.io/badge/FastAPI-0.68+-green.svg)](https://fastapi.tiangolo.com) +[![Vue Version](https://img.shields.io/badge/Vue.js-3.x-brightgreen.svg)](https://v3.vuejs.org) + +[简体中文](./readme.md) | [Deployment Guide](https://github.com/vastsa/FileCodeBox/wiki/Deployment-Guide) | [FAQ](https://github.com/vastsa/FileCodeBox/wiki/FAQ) +
-![banner](https://fastly.jsdelivr.net/gh/vastsa/FileCodeBox@V1.6/static/banners/img_1.png) +## 📝 Introduction ---- +FileCodeBox is a lightweight file sharing tool developed with FastAPI + Vue3. It allows users to share text and files easily, where recipients only need a passcode to retrieve the files, just like picking up a package from a delivery locker. -
- 简体中文 | - English | - Deployment Guide | - FAQ +## 🖼️ Preview + +
+

+ +Frontend Repository + +    + +Demo Site + +

-## Screenshots +### New Interface +
+ + + + + + + + + + + + + + + + + +
File UploadText Share
File ManagementSystem Settings
Mobile ViewDark Mode
InternationalizationResponsive
+
- - - - +### Classic Interface +
+
Send FilesSend Files
+ + + - - - + + + - - - + + + + +
HomeUpload
Send FilesSend Files
ManagementSettings
Send FilesSend Files
ShareDownload
+
+ +## 🎯 Use Cases + + + + + + + + + + +
+

📁 Temporary File Sharing

+Quick file sharing without registration +
+

📝 Quick Text Sharing

+Share code snippets and text content +
+

🕶️ Anonymous Transfer

+Privacy-protected file transfer +
+

💾 Temporary Storage

+File storage with expiration time +
+

🔄 Cross-platform Transfer

+Quick file transfer between devices +
+

🌐 Private Share Service

+Build your own file sharing service +
-## Key Features +## ✨ Core Features -- [x] **Lightweight and Simple:** Built on Fastapi + Sqlite3 + Vue3 + ElementUI -- [x] **Easy Upload:** Supports copy-paste and drag-and-drop selection -- [x] **Multiple Types:** Supports text and files -- [x] **Brute-Force Protection:** Limits on wrong attempts -- [x] **Abuse Prevention:** IP-based upload limits -- [x] **Passcode Sharing:** Random passcodes for storing and retrieving files, customizable retries, and expiration periods -- [x] **Internationalization:** Supports Simplified Chinese, Traditional Chinese, English, etc. -- [x] **Anonymous Sharing:** No registration or login required -- [x] **Admin Panel:** View and delete files -- [x] **One-Click Deployment:** Supports Docker one-click deployment -- [x] **Flexible Expansion:** Supports S3 protocol and local file streams, with the ability to add new storage engines in the storage file -- [x] **Simple and Clear:** Ideal for beginner projects -- [x] **Terminal Download:** Terminal command `wget https://share.lanol.cn/share/select?code=83432` + + + + + + + + + + + + + + + + + + + + + +
+

🚀 Lightweight

+Based on FastAPI + SQLite3 + Vue3 + ElementUI +
+

📤 Easy Upload

+Support copy-paste and drag-drop +
+

📦 Multiple Types

+Support text and various file types +
+

🔒 Security

-## Project Status +- IP upload limits +- Error attempt limits +- File expiration +
+

🎫 Passcode Sharing

+Random codes with customizable limits +
+

🌍 Multi-language

+Support for Simplified Chinese, Traditional Chinese, and English +
+

🎭 Anonymous

+No registration required +
+

🛠 Admin Panel

+File and system management +
+

🐳 Docker

+One-click deployment +
+

💾 Storage Options

+Local, S3, OneDrive support +
+

📱 Responsive

+Mobile-friendly design +
+

💻 CLI Support

+Command-line download +
-![Alt](https://repobeats.axiom.co/api/embed/7a6c92f1d96ee57e6fb67f0df371528397b0c9ac.svg "Repobeats analytics image") +## 🚀 Quick Start -## Star History +### Docker Deployment -[![Star History Chart](https://api.star-history.com/svg?repos=vastsa/FileCodeBox&type=Date)](https://star-history.com/#vastsa/FileCodeBox&Date) +```bash +docker run -d --name filecode \ + -p 12345:12345 \ + -v /opt/filecode:/app/data \ + --restart=always \ + vastsa/filecode +``` -## Disclaimer +### Manual Deployment -This project is open-sourced for learning purposes only and shall not be used for any illegal activities. Any consequences are the sole responsibility of the user and have no -relation to the author. Please retain the project link when using. Thank you. +1. Clone the repository +```bash +git clone https://github.com/vastsa/FileCodeBox.git +``` + +2. Install dependencies +```bash +cd FileCodeBox +pip install -r requirements.txt +``` + +3. Start the service +```bash +python main.py +``` + +## 📖 Usage Guide + +### Share Files +1. Open the website, click "Share File" +2. Select or drag files +3. Set expiration time and count +4. Get the passcode + +### Retrieve Files +1. Open the website, enter passcode +2. Click retrieve +3. Download file or view text + +### Admin Panel +1. Visit `/admin` +2. Enter admin password +3. Manage files and settings + +## 🛠 Development Guide + +### Project Structure +``` +FileCodeBox/ +├── apps/ # Application code +│ ├── admin/ # Admin backend +│ └── base/ # Base functions +├── core/ # Core functions +├── data/ # Data directory +└── fcb-fronted/ # Frontend code +``` + +### Development Environment +- Python 3.8+ +- Node.js 14+ +- Vue 3 +- FastAPI + +### Local Development +1. Backend development +```bash +python main.py +``` + +2. Frontend development +```bash +cd fcb-fronted +npm install +npm run dev +``` + +## 🤝 Contributing + +1. Fork the project +2. Create your feature branch `git checkout -b feature/xxx` +3. Commit your changes `git commit -m 'Add xxx'` +4. Push to the branch `git push origin feature/xxx` +5. Open a Pull Request + +## ❓ FAQ + +### Q: How to modify upload size limit? +A: Change `uploadSize` in admin panel + +### Q: How to configure storage engine? +A: Select storage engine and configure parameters in admin panel + +### Q: How to backup data? +A: Backup the `data` directory + +For more questions, visit [Wiki](https://github.com/vastsa/FileCodeBox/wiki/常见问题) + +## �� Project Statistics and Analytics + +
+Featured|HelloGitHub + +![Repobeats](https://repobeats.axiom.co/api/embed/7a6c92f1d96ee57e6fb67f0df371528397b0c9ac.svg) + +[![Star History](https://api.star-history.com/svg?repos=vastsa/FileCodeBox&type=Date)](https://star-history.com/#vastsa/FileCodeBox&Date) +
+ +## 📜 Disclaimer + +This project is open-source for learning purposes only. It should not be used for any illegal purposes. The author is not responsible for any consequences. Please retain the project address and copyright information when using it. \ No newline at end of file