Lightweight, self-hosted file sharing service. Upload a file, get a short link, share it. Files expire automatically — by time, by download count, or both.
Live: https://share-it.site/
- Drag & drop upload with short share links (
/{id}) - Optional client-side AES-256-GCM encryption (Web Crypto API) — key never leaves the browser, delivered either in the URL fragment or derived from a PIN via PBKDF2 (100k iterations, SHA-256)
- Expiration by time (up to 365 days) and/or max download count ("burn after N downloads")
- SHA-256 checksum per file for integrity verification
- Owner management page (
/manage/{id}?token=...) with secret-token delete - Server-side storage quota and max file size limits
- Background scheduler purges expired files from DB and disk
Frontend — Angular 22 (standalone components), TypeScript 6, SCSS, RxJS, Web Crypto API, fflate; Vitest for tests.
Backend — Python + FastAPI, Uvicorn, SQLAlchemy 2 (SQLite), Pydantic 2, APScheduler for cleanup, aiofiles for streaming uploads; pytest for tests.
Infra — Apache serving the Angular bundle, FastAPI behind a systemd service, deployed to a VPS by GitHub Actions on push to main.
backend/ FastAPI app — main.py (routes), models.py, storage.py, cleanup.py, config.yaml
frontend/ Angular app — components (home, share, manage), api + crypto services
.github/ CI/CD pipeline (deploy.yml)
Backend (http://localhost:8000, docs at /docs):
cd backend
python -m venv venv
venv/Scripts/activate # Linux/macOS: source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadFrontend (http://localhost:4200):
cd frontend
npm ci
npm start| Method | Endpoint | Purpose |
|---|---|---|
GET |
/api/status |
Storage usage, limits, default expiration |
GET |
/api/stats/public |
Total uploads, bytes shared, downloads |
POST |
/api/upload |
Upload file + expiration/encryption options |
GET |
/api/files/{id} |
File metadata |
GET |
/api/files/{id}/download |
Download (increments count, burns if limit hit) |
DELETE |
/api/files/{id}?token= |
Delete with owner secret token |
backend/config.yaml:
storage:
folder_path: "./uploads"
max_reserved_space_gb: 100.0
max_file_size_mb: 100000.0
default_expiration_days: 30
cleanup_interval_minutes: 60