From fe1a7727f79f8c0dde0dda10e2a237a39961f038 Mon Sep 17 00:00:00 2001 From: Lan Date: Sat, 11 Jul 2026 23:00:24 +0800 Subject: [PATCH] docs: simplify project readme --- readme.md | 301 +++++++++------------------------------------------ readme_en.md | 300 +++++++++----------------------------------------- 2 files changed, 108 insertions(+), 493 deletions(-) diff --git a/readme.md b/readme.md index 50508de..52af9f8 100644 --- a/readme.md +++ b/readme.md @@ -1,274 +1,81 @@
-FileCodeBox +FileCodeBox # FileCodeBox -**开箱即用的自托管文件快递柜** +### 像取快递一样取文件 -匿名分享文件与文本。无需注册,输入口令即可取件。 +一个轻量、现代的自托管文件分享工具。无需注册,上传后获得口令,对方输入即可取件。 -[在线演示](https://share.lanol.cn) · [使用文档](https://fcb-docs.aiuo.net/) · [快速部署](#快速部署) · [English](./readme_en.md) +[在线演示](https://share.lanol.cn) · [使用文档](https://fcb-docs.aiuo.net/) · [English](./readme_en.md) -[![Release](https://img.shields.io/github/v/release/vastsa/FileCodeBox?style=for-the-badge&color=6366F1)](https://github.com/vastsa/FileCodeBox/releases/latest) -[![Docker Pulls](https://img.shields.io/docker/pulls/lanol/filecodebox?style=for-the-badge&logo=docker&color=0EA5E9)](https://hub.docker.com/r/lanol/filecodebox) -[![License](https://img.shields.io/github/license/vastsa/FileCodeBox?style=for-the-badge&color=22C55E)](./LICENSE) -[![Stars](https://img.shields.io/github/stars/vastsa/FileCodeBox?style=for-the-badge&logo=github&color=F59E0B)](https://github.com/vastsa/FileCodeBox/stargazers) +[![Release](https://img.shields.io/github/v/release/vastsa/FileCodeBox?style=flat-square&color=111111)](https://github.com/vastsa/FileCodeBox/releases/latest) +[![Docker Pulls](https://img.shields.io/docker/pulls/lanol/filecodebox?style=flat-square&logo=docker&color=111111)](https://hub.docker.com/r/lanol/filecodebox) +[![Stars](https://img.shields.io/github/stars/vastsa/FileCodeBox?style=flat-square&logo=github&color=111111)](https://github.com/vastsa/FileCodeBox/stargazers) +[![License](https://img.shields.io/github/license/vastsa/FileCodeBox?style=flat-square&color=111111)](./LICENSE) + +
+ +FileCodeBox 取件页面
+## 一条命令开始 + ```bash docker run -d --restart unless-stopped -p 12345:12345 -v ./data:/app/data --name filecodebox lanol/filecodebox:2.5.0 # x-release-please-version ``` +访问 `http://localhost:12345`,完成首次初始化。生产环境建议固定版本号;`latest` 指向最新正式版。 + +## 简单,但足够强大 + + + + + + + +
即传即取
文件与文本统一分享,支持拖拽、粘贴、批量与分片上传。
按需失效
按时间、取件次数或永久保存,自动清理过期内容。
数据自主
本地、S3、OneDrive、WebDAV 与 OpenDAL,数据留在自己的基础设施。
+ +## 从分享,到管理 + + + + + + +
文件发送页面管理仪表盘
+ +

+ 移动端取件 +    + 移动端发送 +    + 移动端管理 +

+
- 打开 http://localhost:12345,完成首次初始化,即可开始分享。 + +`FastAPI` `Vue 3` `SQLite` `Docker` `S3` `WebDAV` `Dark Mode` +
-
+## 继续了解 -

- FileCodeBox 深色取件界面 -

- -## 为什么选择 FileCodeBox - - - - - - - -
- -### 简单直接 - -无需账号体系。上传内容后获得取件码,对方输入口令即可下载文件或查看文本。 - - - -### 自托管优先 - -一个 Docker 容器即可运行,数据与配置保存在自己的服务器,迁移和备份都足够清晰。 - - - -### 面向真实使用 - -支持批量、分片和预签名上传,提供过期策略、容量限制、管理后台与多存储后端。 - -
- -## 核心能力 - -| 分享体验 | 管理与安全 | 存储与部署 | -| --- | --- | --- | -| 文件与文本统一分享 | 首次启动安全初始化 | 本地文件系统 | -| 拖拽、粘贴与批量上传 | 管理员会话与权限控制 | S3 兼容对象存储 | -| 随机或自定义取件码 | 上传频率与错误次数限制 | OneDrive 与 WebDAV | -| 按时间、次数或永久有效 | 文件过期清理与容量配额 | OpenDAL 扩展存储 | -| 分片上传与断点续传 | 文件状态与存储健康视图 | Docker 多架构镜像 | -| 响应式界面与深色模式 | 中英文管理界面 | 反向代理友好 | - -## 产品预览 - - - - - - - - - - -
FileCodeBox 文件发送FileCodeBox 管理仪表盘
简洁的文件与文本发送流程围绕文件健康和存储策略设计的仪表盘
- -
-查看更多界面 -
- - - - - - - - - -
文件管理系统设置
后台登录移动端文件管理
-
- -

- 移动端取件 -   - 移动端发送 -   - 移动端后台 -

- -> 当前主题源码位于 [FileCodeBoxFronted](https://github.com/vastsa/FileCodeBoxFronted),镜像构建时会自动拉取其默认分支的最新版本。 - -## 快速部署 - -### Docker Compose - -```yaml -services: - filecodebox: - image: lanol/filecodebox:2.5.0 # x-release-please-version - container_name: filecodebox - restart: unless-stopped - ports: - - "12345:12345" - volumes: - - ./data:/app/data -``` - -```bash -docker compose up -d -``` - -生产环境建议固定版本号以便回滚。`latest` 指向最新正式版,`edge-*` 为 `master` 分支开发镜像。 - -### 手动运行 - -```bash -git clone https://github.com/vastsa/FileCodeBox.git -cd FileCodeBox -pip install -r requirements.txt -python main.py -``` - -默认访问地址为 `http://localhost:12345`。首次打开站点时,按引导设置管理员密码。 - -### 反向代理 - -
-Nginx 示例 - -```nginx -location / { - proxy_pass http://127.0.0.1:12345; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - client_max_body_size 100m; -} -``` - -
- -## 使用方式 - -| 操作 | 流程 | -| --- | --- | -| 分享文件 | 选择或拖入文件 → 设置有效期 → 获得取件码 | -| 分享文本 | 输入文本 → 设置有效期 → 获得取件码 | -| 获取内容 | 输入取件码 → 在线查看文本或下载文件 | -| 管理系统 | 访问 `/#/admin` → 查看文件、统计和系统设置 | - -命令行同样可以上传: - -```bash -curl -X POST "http://localhost:12345/share/file/" \ - -F "file=@/path/to/file.txt" \ - -F "expire_value=1" \ - -F "expire_style=day" -``` - -完整的接口、分片上传和存储配置,请查看: - -- [快速开始](https://fcb-docs.aiuo.net/guide/getting-started) -- [上传与分片](https://fcb-docs.aiuo.net/guide/upload) -- [存储配置](https://fcb-docs.aiuo.net/guide/storage) -- [安全设置](https://fcb-docs.aiuo.net/guide/security) -- [API 文档](https://fcb-docs.aiuo.net/api/) - -## 技术架构 - -```text -Browser / CLI - │ - ▼ -FastAPI · Uvicorn - │ - ├── SQLite · Tortoise ORM - ├── Local / S3 / OneDrive / WebDAV / OpenDAL - └── Vue 3 · Vite frontend -``` - -| 层级 | 技术 | -| --- | --- | -| API | FastAPI · Pydantic · Uvicorn | -| 数据 | SQLite · Tortoise ORM | -| 异步 I/O | aiofiles · aiohttp · aioboto3 | -| 前端 | Vue 3 · TypeScript · Vite · Tailwind CSS | -| 交付 | Docker · GitHub Actions · VitePress | - -## 本地开发 - -```bash -# 后端 -pip install -r requirements.txt -python main.py - -# 测试 -python -m pytest tests -``` - -前端在独立仓库 [FileCodeBoxFronted](https://github.com/vastsa/FileCodeBoxFronted): - -```bash -pnpm install -pnpm dev -``` - -## 常见问题 - -
-如何备份或迁移? - -停止服务后备份整个 `data` 目录。它包含数据库、运行配置和本地存储文件。 - -
- -
-如何调整上传大小? - -在管理后台修改上传限制。如果前面还有 Nginx、CDN 或网关,也需要同步调整其请求体限制。 - -
- -
-支持哪些存储? - -内置支持本地、S3、OneDrive、WebDAV 与 OpenDAL。详细参数见[存储配置](https://fcb-docs.aiuo.net/guide/storage)。 - -
+- [快速开始](https://fcb-docs.aiuo.net/guide/getting-started) · 部署、初始化与升级 +- [存储配置](https://fcb-docs.aiuo.net/guide/storage) · 本地与对象存储 +- [安全设置](https://fcb-docs.aiuo.net/guide/security) · 限流、会话与访问保护 +- [API 文档](https://fcb-docs.aiuo.net/api/) · 上传、取件与管理接口 +- [前端源码](https://github.com/vastsa/FileCodeBoxFronted) · 当前 2024 主题 ## 参与项目 -Issue、功能建议与 Pull Request 都很欢迎。提交代码前请使用清晰的 Conventional Commit: - -```text -fix: 修复文件下载问题 -feat: 增加新的存储适配器 -``` - -- [提交 Issue](https://github.com/vastsa/FileCodeBox/issues/new/choose) -- [查看贡献指南](https://fcb-docs.aiuo.net/contributing) -- [查看版本记录](https://fcb-docs.aiuo.net/changelog) -- [加入 QQ 群:739673698](https://qm.qq.com/q/PemPzhdEIM) - -## 许可证 - -FileCodeBox 基于 [LGPL-3.0](./LICENSE) 发布。使用本项目时请遵守所在地法律法规,并保留项目地址与版权信息。 +欢迎 [提交 Issue](https://github.com/vastsa/FileCodeBox/issues/new/choose) 或 Pull Request。项目基于 [LGPL-3.0](./LICENSE) 发布。
-如果 FileCodeBox 对你有帮助,欢迎点亮一个 [Star](https://github.com/vastsa/FileCodeBox/stargazers)。 - -Made by [vastsa](https://github.com/vastsa) +**如果 FileCodeBox 对你有帮助,欢迎点亮一个 Star。**
diff --git a/readme_en.md b/readme_en.md index a426fa1..8ff319b 100644 --- a/readme_en.md +++ b/readme_en.md @@ -1,273 +1,81 @@
-FileCodeBox +FileCodeBox # FileCodeBox -**A self-hosted file locker that works out of the box** +### Share files like picking up a package -Share files and text anonymously. No account required—just enter a passcode. +A lightweight, modern, self-hosted file sharing service. No account required—upload, share the passcode, and retrieve. -[Live Demo](https://share.lanol.cn) · [Documentation](https://fcb-docs.aiuo.net/en/) · [Quick Start](#quick-start) · [简体中文](./readme.md) +[Live Demo](https://share.lanol.cn) · [Documentation](https://fcb-docs.aiuo.net/en/) · [简体中文](./readme.md) -[![Release](https://img.shields.io/github/v/release/vastsa/FileCodeBox?style=for-the-badge&color=6366F1)](https://github.com/vastsa/FileCodeBox/releases/latest) -[![Docker Pulls](https://img.shields.io/docker/pulls/lanol/filecodebox?style=for-the-badge&logo=docker&color=0EA5E9)](https://hub.docker.com/r/lanol/filecodebox) -[![License](https://img.shields.io/github/license/vastsa/FileCodeBox?style=for-the-badge&color=22C55E)](./LICENSE) -[![Stars](https://img.shields.io/github/stars/vastsa/FileCodeBox?style=for-the-badge&logo=github&color=F59E0B)](https://github.com/vastsa/FileCodeBox/stargazers) +[![Release](https://img.shields.io/github/v/release/vastsa/FileCodeBox?style=flat-square&color=111111)](https://github.com/vastsa/FileCodeBox/releases/latest) +[![Docker Pulls](https://img.shields.io/docker/pulls/lanol/filecodebox?style=flat-square&logo=docker&color=111111)](https://hub.docker.com/r/lanol/filecodebox) +[![Stars](https://img.shields.io/github/stars/vastsa/FileCodeBox?style=flat-square&logo=github&color=111111)](https://github.com/vastsa/FileCodeBox/stargazers) +[![License](https://img.shields.io/github/license/vastsa/FileCodeBox?style=flat-square&color=111111)](./LICENSE) + +
+ +FileCodeBox retrieval screen
+## Start with one command + ```bash docker run -d --restart unless-stopped -p 12345:12345 -v ./data:/app/data --name filecodebox lanol/filecodebox:2.5.0 # x-release-please-version ``` +Open `http://localhost:12345` and complete first-run setup. Pin a version in production; `latest` tracks the newest stable release. + +## Simple, yet capable + + + + + + + +
Share instantly
Files and text in one flow, with drag, paste, batch, and chunked uploads.
Expire on your terms
Expire by time or retrieval count, keep forever, and clean up automatically.
Own your data
Local, S3, OneDrive, WebDAV, and OpenDAL storage on infrastructure you control.
+ +## From sharing to administration + + + + + + +
File sharing screenAdmin dashboard
+ +

+ Mobile retrieval +    + Mobile sharing +    + Mobile administration +

+
- Open http://localhost:12345, complete first-run setup, and start sharing. + +`FastAPI` `Vue 3` `SQLite` `Docker` `S3` `WebDAV` `Dark Mode` +
-
+## Learn more -

- FileCodeBox dark retrieval screen -

- -## Why FileCodeBox - - - - - - - -
- -### Effortless sharing - -No account system. Upload content, get a passcode, and let the recipient download the file or read the text. - - - -### Self-hosting first - -Run everything in one Docker container. Your data and configuration stay on infrastructure you control. - - - -### Built for real workloads - -Batch, chunked, and presigned uploads with expiration policies, capacity limits, an admin console, and multiple storage backends. - -
- -## Highlights - -| Sharing | Administration & security | Storage & delivery | -| --- | --- | --- | -| Unified file and text sharing | Secure first-run setup | Local filesystem | -| Drag, paste, and batch upload | Admin sessions and access control | S3-compatible storage | -| Random or custom passcodes | Upload and passcode rate limits | OneDrive and WebDAV | -| Time, count, or permanent expiry | Automatic cleanup and quotas | OpenDAL integrations | -| Chunked upload and resume | File and storage health views | Multi-architecture Docker images | -| Responsive UI and dark mode | Chinese and English admin UI | Reverse-proxy friendly | - -## Product Preview - - - - - - - - - - -
FileCodeBox file sharingFileCodeBox admin dashboard
A focused flow for sending files and textA dashboard built around file health and storage policy
- -
-See more screens -
- - - - - - - - - -
File managementSystem settings
Admin loginMobile file management
-
- -

- Mobile retrieval -   - Mobile sharing -   - Mobile admin -

- -> The active theme lives in [FileCodeBoxFronted](https://github.com/vastsa/FileCodeBoxFronted). Image builds automatically use the latest commit from its default branch. - -## Quick Start - -### Docker Compose - -```yaml -services: - filecodebox: - image: lanol/filecodebox:2.5.0 # x-release-please-version - container_name: filecodebox - restart: unless-stopped - ports: - - "12345:12345" - volumes: - - ./data:/app/data -``` - -```bash -docker compose up -d -``` - -Pin a version in production for reliable rollbacks. `latest` tracks the newest stable release; `edge-*` identifies development images from `master`. - -### Run from source - -```bash -git clone https://github.com/vastsa/FileCodeBox.git -cd FileCodeBox -pip install -r requirements.txt -python main.py -``` - -The default URL is `http://localhost:12345`. Follow the first-run flow to create the administrator password. - -### Reverse proxy - -
-Nginx example - -```nginx -location / { - proxy_pass http://127.0.0.1:12345; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - client_max_body_size 100m; -} -``` - -
- -## How It Works - -| Action | Flow | -| --- | --- | -| Share files | Select or drop files → choose expiry → receive a passcode | -| Share text | Enter text → choose expiry → receive a passcode | -| Retrieve content | Enter a passcode → read text or download files | -| Manage the service | Open `/#/admin` → inspect files, metrics, and settings | - -Uploads also work from the command line: - -```bash -curl -X POST "http://localhost:12345/share/file/" \ - -F "file=@/path/to/file.txt" \ - -F "expire_value=1" \ - -F "expire_style=day" -``` - -For complete API, chunk upload, and storage configuration details, see: - -- [Getting Started](https://fcb-docs.aiuo.net/en/guide/getting-started) -- [Uploads and Chunks](https://fcb-docs.aiuo.net/en/guide/upload) -- [Storage](https://fcb-docs.aiuo.net/en/guide/storage) -- [Security](https://fcb-docs.aiuo.net/en/guide/security) -- [API Reference](https://fcb-docs.aiuo.net/en/api/) - -## Architecture - -```text -Browser / CLI - │ - ▼ -FastAPI · Uvicorn - │ - ├── SQLite · Tortoise ORM - ├── Local / S3 / OneDrive / WebDAV / OpenDAL - └── Vue 3 · Vite frontend -``` - -| Layer | Technology | -| --- | --- | -| API | FastAPI · Pydantic · Uvicorn | -| Data | SQLite · Tortoise ORM | -| Async I/O | aiofiles · aiohttp · aioboto3 | -| Frontend | Vue 3 · TypeScript · Vite · Tailwind CSS | -| Delivery | Docker · GitHub Actions · VitePress | - -## Development - -```bash -# Backend -pip install -r requirements.txt -python main.py - -# Tests -python -m pytest tests -``` - -The frontend is maintained in [FileCodeBoxFronted](https://github.com/vastsa/FileCodeBoxFronted): - -```bash -pnpm install -pnpm dev -``` - -## FAQ - -
-How do I back up or migrate the service? - -Stop the service and back up the entire `data` directory. It contains the database, runtime configuration, and locally stored files. - -
- -
-How do I change the upload size? - -Update the upload limit in the admin console. If you use Nginx, a CDN, or another gateway, update its request body limit as well. - -
- -
-Which storage backends are supported? - -Local, S3, OneDrive, WebDAV, and OpenDAL are built in. See the [storage guide](https://fcb-docs.aiuo.net/en/guide/storage) for configuration details. - -
+- [Getting started](https://fcb-docs.aiuo.net/en/guide/getting-started) · deployment, setup, and upgrades +- [Storage](https://fcb-docs.aiuo.net/en/guide/storage) · local and object storage +- [Security](https://fcb-docs.aiuo.net/en/guide/security) · rate limits, sessions, and access protection +- [API reference](https://fcb-docs.aiuo.net/en/api/) · upload, retrieval, and administration +- [Frontend source](https://github.com/vastsa/FileCodeBoxFronted) · the active 2024 theme ## Contributing -Issues, feature ideas, and pull requests are welcome. Use clear Conventional Commits when contributing code: - -```text -fix: resolve file download issue -feat: add a storage adapter -``` - -- [Open an issue](https://github.com/vastsa/FileCodeBox/issues/new/choose) -- [Read the contribution guide](https://fcb-docs.aiuo.net/en/contributing) -- [Browse the changelog](https://fcb-docs.aiuo.net/en/changelog) - -## License - -FileCodeBox is released under [LGPL-3.0](./LICENSE). Use it in accordance with applicable laws and retain the project URL and copyright notice. +[Issues](https://github.com/vastsa/FileCodeBox/issues/new/choose) and pull requests are welcome. FileCodeBox is released under [LGPL-3.0](./LICENSE).
-If FileCodeBox helps you, consider leaving a [Star](https://github.com/vastsa/FileCodeBox/stargazers). - -Made by [vastsa](https://github.com/vastsa) +**If FileCodeBox helps you, consider leaving a Star.**