FileSync is a lightweight multi-user file service. Each user gets a private upload space with a dashboard and API access. I built it because I wanted a simple file locker that didn’t require signing up for a cloud service or configuring S3 buckets.

Tech Stack

FastAPI · Python · JWT · Bcrypt · JSON Storage

Live Demo

https://filesync-foa8.onrender.com/

Source Code

https://github.com/SAJIBxD/FileSync

Core Functionality

Create a user, log in, upload files, open/download/delete them. That’s the core loop.

The auth is two-pronged:

  1. JWT sessions — short-lived tokens for the browser dashboard. Login, get a token, do your thing.
  2. API tokens — long-lived tokens for scripts and automation. Rotate them when needed.

Passwords are hashed with bcrypt (after a SHA-256 pre-hash). User data lives in a JSON file — not production-grade, but fine for personal use.

Each user gets a 100 MB quota. The upload service sanitizes filenames, blocks path traversal tricks, and auto-renames collisions (file_1, file_2, etc.) so nothing gets silently overwritten.

Two Upload Modes

  • Session/JWT upload (/{username}/upload) — for normal signed-in usage via the browser
  • API token upload (/api/upload) — for scripts and automation. Great for piping output from a cron job or a local backup script

The frontend is intentionally simple — server-rendered templates with just enough behavior to feel smooth (login persistence via localStorage, one-click open/delete, paste-text-as-file, API token display and rotation).

What I Focused On

  • Auth that’s straightforward but not stupid. No over-engineered OAuth flows for a personal file server.
  • File-system safety — unsafe names, path traversal, overwrite collisions. All the things that go wrong when you let people upload arbitrary files.
  • Dual access model: browser users get a dashboard, script users get a token. No extra complexity for either path.

What I’d Add Next

  • Replace the JSON file storage with SQLite or a real database (JSON is fragile at scale)
  • Per-file size limits and MIME-type validation
  • Token revocation or expiry policies
  • Tests for auth and file edge cases (this is the kind of project where bugs are silent until they bite you)