docs: simplify project readme
This commit is contained in:
1 parent
a30e52ba9d
commit
fe1a7727f7
2 files changed
+108
-493
No files matched your search
+54
-246
@@ -1,273 +1,81 @@
|
||||
<div align="center">
|
||||
|
||||
<img src="./docs/public/logo_small.png" alt="FileCodeBox" width="112" />
|
||||
<img src="./docs/public/logo_small.png" alt="FileCodeBox" width="96" />
|
||||
|
||||
# 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)
|
||||
|
||||
[](https://github.com/vastsa/FileCodeBox/releases/latest)
|
||||
[](https://hub.docker.com/r/lanol/filecodebox)
|
||||
[](./LICENSE)
|
||||
[](https://github.com/vastsa/FileCodeBox/stargazers)
|
||||
[](https://github.com/vastsa/FileCodeBox/releases/latest)
|
||||
[](https://hub.docker.com/r/lanol/filecodebox)
|
||||
[](https://github.com/vastsa/FileCodeBox/stargazers)
|
||||
[](./LICENSE)
|
||||
|
||||
<br />
|
||||
|
||||
<img src="./.github/images/readme/retrieve-dark.png" alt="FileCodeBox retrieval screen" width="860" />
|
||||
|
||||
</div>
|
||||
|
||||
## 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
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="33%" valign="top"><b>Share instantly</b><br /><sub>Files and text in one flow, with drag, paste, batch, and chunked uploads.</sub></td>
|
||||
<td width="33%" valign="top"><b>Expire on your terms</b><br /><sub>Expire by time or retrieval count, keep forever, and clean up automatically.</sub></td>
|
||||
<td width="33%" valign="top"><b>Own your data</b><br /><sub>Local, S3, OneDrive, WebDAV, and OpenDAL storage on infrastructure you control.</sub></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## From sharing to administration
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="50%"><img src="./.github/images/readme/send.png" alt="File sharing screen" /></td>
|
||||
<td width="50%"><img src="./.github/images/readme/dashboard.png" alt="Admin dashboard" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p align="center">
|
||||
<img src="./.github/images/readme/mobile-retrieve.png" alt="Mobile retrieval" width="29%" />
|
||||
|
||||
<img src="./.github/images/readme/mobile-send.png" alt="Mobile sharing" width="29%" />
|
||||
|
||||
<img src="./.github/images/readme/mobile-files.png" alt="Mobile administration" width="29%" />
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<sub>Open <code>http://localhost:12345</code>, complete first-run setup, and start sharing.</sub>
|
||||
|
||||
`FastAPI` `Vue 3` `SQLite` `Docker` `S3` `WebDAV` `Dark Mode`
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
## Learn more
|
||||
|
||||
<p align="center">
|
||||
<img src="./.github/images/readme/retrieve-dark.png" alt="FileCodeBox dark retrieval screen" width="880" />
|
||||
</p>
|
||||
|
||||
## Why FileCodeBox
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="33%" valign="top">
|
||||
|
||||
### Effortless sharing
|
||||
|
||||
No account system. Upload content, get a passcode, and let the recipient download the file or read the text.
|
||||
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
|
||||
### Self-hosting first
|
||||
|
||||
Run everything in one Docker container. Your data and configuration stay on infrastructure you control.
|
||||
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
|
||||
### Built for real workloads
|
||||
|
||||
Batch, chunked, and presigned uploads with expiration policies, capacity limits, an admin console, and multiple storage backends.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 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
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="50%"><img src="./.github/images/readme/send.png" alt="FileCodeBox file sharing" /></td>
|
||||
<td width="50%"><img src="./.github/images/readme/dashboard.png" alt="FileCodeBox admin dashboard" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><sub>A focused flow for sending files and text</sub></td>
|
||||
<td align="center"><sub>A dashboard built around file health and storage policy</sub></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<details>
|
||||
<summary><b>See more screens</b></summary>
|
||||
<br />
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="./.github/images/readme/files.png" alt="File management" /></td>
|
||||
<td><img src="./.github/images/readme/settings.png" alt="System settings" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="./.github/images/readme/login.png" alt="Admin login" /></td>
|
||||
<td><img src="./.github/images/readme/mobile-files.png" alt="Mobile file management" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</details>
|
||||
|
||||
<p align="center">
|
||||
<img src="./.github/images/readme/mobile-retrieve.png" alt="Mobile retrieval" width="30%" />
|
||||
|
||||
<img src="./.github/images/readme/mobile-send.png" alt="Mobile sharing" width="30%" />
|
||||
|
||||
<img src="./.github/images/readme/mobile-files.png" alt="Mobile admin" width="30%" />
|
||||
</p>
|
||||
|
||||
> 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
|
||||
|
||||
<details>
|
||||
<summary><b>Nginx example</b></summary>
|
||||
|
||||
```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;
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## 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
|
||||
|
||||
<details>
|
||||
<summary><b>How do I back up or migrate the service?</b></summary>
|
||||
|
||||
Stop the service and back up the entire `data` directory. It contains the database, runtime configuration, and locally stored files.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>How do I change the upload size?</b></summary>
|
||||
|
||||
Update the upload limit in the admin console. If you use Nginx, a CDN, or another gateway, update its request body limit as well.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Which storage backends are supported?</b></summary>
|
||||
|
||||
Local, S3, OneDrive, WebDAV, and OpenDAL are built in. See the [storage guide](https://fcb-docs.aiuo.net/en/guide/storage) for configuration details.
|
||||
|
||||
</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).
|
||||
|
||||
<div align="center">
|
||||
|
||||
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.**
|
||||
|
||||
</div>
|
||||
Reference in new issue
Block a user