Repository navigation
System Architecture & Security Model
AlphaDrive is architected around the principles of simplicity, zero external dependencies, minimal memory footprint, and defense-in-depth security.
AlphaDrive embeds all HTML templates, stylesheets, scripts, and vector icons directly into the Go executable via embed.FS. Deploying or upgrading AlphaDrive requires swapping a single binary.
Instead of requiring MySQL or PostgreSQL containers:
- Uses modern pure-Go SQLite with Write-Ahead Logging (WAL).
- Full ACID transactional guarantees with high concurrent read throughput.
- Foreign keys and automatic database schema migrations on boot.
Uploaded files are never saved with user-supplied filenames on the host filesystem:
- Each uploaded file is hashed and assigned a secure UUID/hash storage key.
- Stored in sharded directories (
objects/ab/abcdef...). - Eliminates path traversal vulnerabilities, shell injection, and filename encoding issues.
- Argon2id Password Hashing: State-of-the-art password hashing with high memory-hardness protection against GPU/ASIC cracking.
-
Double-Submit CSRF Protection: All state-modifying requests (
POST,PUT,DELETE) require a matchingX-CSRF-Tokenheader. -
Least-Privilege Systemd Sandboxing: Runs as an unprivileged system user with
ProtectSystem=strict,ProtectHome=true, andNoNewPrivileges=true. - Timing-Safe Authentication: Constant-time token comparisons to mitigate side-channel timing attacks.
-
Secure HTTP Headers: Automatic
X-Content-Type-Options: nosniff,X-Frame-Options: SAMEORIGIN, andReferrer-Policy: strict-origin-when-cross-origin.
Lightweight. Self-hosted. Yours.
Documentation · GitHub · Releases · Contribute · MIT License
Self-hosted file storage built for simplicity, speed, and control.
© 2026 AlphaDrive contributors. Built for people who want their files to stay theirs.