7737ed90c7453598c8c83c301d99bb984e8dfc3b
Backend: - Add owner_id to Folder entity + FolderDto (DB user_id column) - Add list_folders_by_owner to FolderRepository trait + PG impl - Add list_folders_for_owner to FolderUseCase + FolderService - Rewrite FolderHandler: all endpoints now scope by AuthUser - Remove dead handler methods (list_folders_inner, list_folders_for_user, is_user_home_folder, folder_belongs_to_user) - Add ownership check in get_folder (returns 404 on mismatch) Batch operations: - Add trash_service + zip_service to BatchOperationService - New methods: trash_files, trash_folders, move_folders, download_zip - New handlers: trash_batch, move_folders_batch, download_batch - New routes: POST /api/batch/trash, /api/batch/folders/move, /api/batch/download Frontend: - Replace findUserHomeFolder (~130 lines) with resolveHomeFolder (~35 lines) - Remove client-side folder filtering in loadFiles (backend now scopes) - Rewrite batchDelete: N requests -> 1 POST /api/batch/trash - Rewrite batchMove: N requests -> 2 POST max (files + folders) - Rewrite batchDownload: N requests -> 1 POST /api/batch/download (ZIP) - Search moved to backend, share system uses backend API - Dark mode fixes, frontend audit improvements
A fast, simple alternative to NextCloud
NextCloud was too slow on my home server. So I built OxiCloud: a file storage system written in Rust that runs on minimal hardware and stays out of your way.
Why OxiCloud?
| Feature | What you get |
|---|---|
| Low resources | Runs on 512MB RAM. No PHP, no bloat. |
| Fast | Rust with LTO optimization. Sub-second responses. |
| Clean UI | Works on desktop and mobile. No clutter. |
| Easy setup | One binary, one database, done. |
| Multi-language | English, Spanish and Persian out of the box. |
Quick Start
You need Rust 1.70+, Cargo, and PostgreSQL 13+.
git clone https://github.com/DioCrafts/oxicloud.git
cd oxicloud
# Set up your database connection
echo "DATABASE_URL=postgres://username:password@localhost/oxicloud" > .env
# Build and run
cargo build --release
cargo run --bin migrate --features migrations
cargo run --release
Open http://localhost:8085 in your browser.
Docker (alternative)
docker compose up -d
That's it. The app runs on port 8086.
Architecture
OxiCloud uses Clean Architecture with four layers:
┌─────────────────────────────────────────┐
│ Interfaces │ API routes, handlers │
├─────────────────────────────────────────┤
│ Application │ Use cases, services │
├─────────────────────────────────────────┤
│ Domain │ Business logic │
├─────────────────────────────────────────┤
│ Infrastructure│ Database, filesystem │
└─────────────────────────────────────────┘
Each layer only talks to the one below it. You can swap out the database or add new API endpoints without touching business logic.
Development
cargo build # Build
cargo run # Run locally
cargo test # Run tests
cargo clippy # Lint
cargo fmt # Format
# For debugging
RUST_LOG=debug cargo run
Current Features
- File upload, download, and organization
- Folder management with drag-and-drop
- Trash bin with restore functionality
- User authentication with JWT
- Personal folders per user
- File deduplication
- Write-behind cache for fast uploads
- Search across files and folders
- Favorites and recent files
- Responsive grid/list views
What's Next
I'm working on these when I have time:
- File sharing via links
- WebDAV for desktop sync
- Basic versioning
- Mobile app improvements
Check TODO-LIST.md for the full list.
Contributing
The project is early stage. There's plenty to improve.
Read CONTRIBUTING.md before submitting a PR. Follow the Code of Conduct.
License
MIT. See LICENSE.
Star History
Questions? Open an issue. Want to help? PRs welcome.
Languages
Rust
63.5%
Hurl
10.2%
TypeScript
8.5%
Svelte
8.2%
Shell
3.8%
Other
5.6%
