A modern, high-performance, self-hosted team cloud drive built with Golang, SQLite, and ReactJS. Designed for engineering teams to share code projects, folders, assets, and documents with granular collaboration permissions, public sharing links, an Admin Panel, a User Profile Manager, a sleek Dark Theme, and full Mobile Optimization.
- High-contrast, developer-first dark mode (
slate-950/slate-900) across all pages, modals, sidebars, lightboxes, and code previewers. - Glowing accents, subtle gradient touches, and custom dark scrollbars.
- Off-Canvas Slide-Out Navigation: On screens
< 768px, the sidebar turns into a smooth slide-out drawer with a backdrop overlay and close button. - Mobile Hamburger Header: One-tap access to menu and team switcher.
- Collapsible Search: Expandable search input that fits on phone screens without crowding buttons.
- Touch-Friendly Interaction: Single-tap navigation for opening folders and previewing files on touchscreen devices.
- Responsive 2-Column Grid: Tighter mobile grid layout (
grid-cols-2) and compact list views. - Responsive Modals: Modals fit mobile viewports with scrollable containers and touch-friendly controls.
- Admin-Governed Access: All newly registered accounts are set to
pendingstatus by default. - No Unapproved Access: Users cannot sign in until an administrator reviews and approves their account.
- Pending Review Screen: When a new user registers, they are presented with a clear review confirmation stating that an administrator must manually verify the account.
- Approval Actions in Admin Panel:
- Pending Review Metric & Alert: Shows how many user applications need administrator action.
- Quick 1-Click Approve / Reject: Approve or reject accounts with dedicated buttons directly from the Users table.
- Status Filter: Easily filter between All, Pending, Approved, and Rejected users.
- Clean Authentication: Removed pre-filled demo accounts and auto-switching; login fields are blank by default for authentic user authentication.
- Accessible directly at
http://localhost:8080/admin(or via the Sidebar/Navbar for Admin accounts). - System Metrics: Real-time overview of total users, pending approvals, total files, total storage consumed, and active share links.
- User Management & Per-User Profiles:
- View all registered team members in a searchable table.
- Approve or reject pending user applications.
- Edit any user's profile: Display Name, Email, System Role (
adminvsmember), and Approval Status (approved,pending,rejected). - Adjust storage quota limits per user (e.g., 10 GB, 25 GB, 50 GB, 100 GB).
- Admin password override / reset.
- Delete user accounts with automatic disk and database cleanup.
- Audit & Activity Logs:
- Live table of system events: Logins, Uploads, Downloads, Deletions, Shares, Password Changes, and Administrative Approvals/Rejections.
- Filter logs by action type or search by keyword.
- Clear logs action.
- System Settings:
- Platform / Workspace Name customization.
- Default storage quota for newly registered users.
- Max upload file size limit.
- Toggle public self-registration on/off.
- Toggle public share link generation on/off.
- Accessible from the Sidebar or Profile dropdown ("My Profile & Settings").
- Personal Information: Edit display name and choose custom avatar accent colors.
- Account Security: Change account password with current-password verification.
- Storage Breakdown: Visual storage meter and breakdown across file types (code, documents, images, videos, audio, archives).
- Recursive Directory Upload: Drag & drop or pick entire directories / code projects (
webkitdirectory). EleDrive preserves nested subdirectories and files automatically. - On-The-Fly ZIP Download: Download entire folders or codebases as a single
.ziparchive at any depth. - Code & Syntax Live Preview: Instant in-browser viewer for code files (
.go,.js,.jsx,.ts,.tsx,.py,.json,.sql,.html,.css,.md,.env, etc.) with line numbers. - Media Lightbox: Stream videos, listen to audio, preview images, and view PDFs directly in the browser.
- Granular Access Controls:
- Can Edit & Upload: Teammates can view, download, rename, and upload files directly into the shared folder.
- Viewer: Read-only access to view and download files.
- Shared With Me View: Dedicated view listing all folders and files shared with the current user.
- User Search: Easily find team members by name or email when sharing.
- Upload & View Permission: External collaborators and clients can upload files directly into your shared drive folder without needing an account!
- Password Protection: Secure sensitive shares with optional password encryption.
- Expiration Dates: Set share links to expire after 7, 30, 90 days, or never.
- Direct ZIP Downloads: Anyone with the link can download the whole project as a ZIP.
EleDrive ships with no hardcoded or default accounts:
- Open the application in your browser (
http://localhost:8080). - Navigate to the Register page (
/register). - The first user to register is automatically assigned as the Workspace Owner (
ownerrole) with an active, approved status. - Subsequent users register as standard team members (
memberrole) inpendingstatus, requiring manual approval by the Owner or an Administrator in the Admin Panel (/admin).
- Backend: Golang (
go1.24+)- Router:
go-chi/chi/v5 - Authentication: JWT (
golang-jwt/jwt/v5) +bcrypt - Database: Pure Go SQLite (
modernc.org/sqlite) with WAL mode - Storage Engine: Local filesystem storage with automatic MIME detection and on-the-fly streaming ZIP compression (
archive/zip)
- Router:
- Database: SQLite (
data/eledrive.db)- Relational schema:
users,folders,files,shares,share_links,activity_logs,system_settings
- Relational schema:
- Frontend: React 19 + Vite + Tailwind CSS + Lucide Icons + Axios
- Built as a single-page application served directly by the Go binary.
eledrive/
βββ config/ # Server configuration and environment variable loading
βββ database/ # Databases, storage assets, and hierarchical logs (git-ignored)
β βββ account.db # Users, permissions, settings, and activity logs
β βββ drive.db # Folders, files, shares, and public link tokens
β βββ uploads/ # Physical files stored on disk
β βββ logs/ # Hierarchical logs (<date>/<time>/ folders)
βββ db/ # Dual SQLite schema initialization and migration logic
βββ handlers/ # HTTP handlers
β βββ admin.go # Admin stats, user management, audit logs, and settings
β βββ auth.go # User registration, login, and team lookup
β βββ files.go # File CRUD, preview, and download
β βββ folders.go # Folder CRUD, ZIP generation, and star/trash
β βββ profile.go # User profile and password updates
β βββ public_share.go # Token-based public sharing and guest uploads
β βββ shares.go # Team direct sharing and permissions
β βββ stats.go # User metrics, recent, starred, and trash lists
β βββ upload.go # Recursive folder and multi-file uploads
βββ middleware/ # JWT authentication and CORS middleware
βββ models/ # Go data structs
βββ storage/ # File storage service and ZIP streaming
βββ utils/ # JSON responses and MIME detection helpers
βββ frontend/ # React 19 + Vite SPA
β βββ dist/ # Production frontend build (served by backend)
β βββ src/
β βββ api/ # Axios API client
β βββ components/ # Sidebar, Navbar, FileCard, Breadcrumbs, and Modals
β βββ context/ # AuthContext (state & session management)
β βββ pages/ # Drive, Shared, Recent, Starred, Trash, Admin, Profile
β βββ utils/ # Formatters (bytes, dates, icons)
βββ main.go # Entrypoint, route mounting, and SPA fallback
βββ build.sh # Full automated build & compile script (flags: -f, -b, -c)
βββ Makefile # Standard build commands (make build, make run, etc.)
βββ start.sh # Startup script (checks build & runs server)
βββ .gitignore # Complete ignore rules for Go, Node, Vite, and SQLite
βββ README.md
EleDrive includes an automated build script (build.sh) and a Makefile:
# Build both frontend and backend (recommended)
./build.sh
# Clean previous builds and rebuild from scratch
./build.sh --clean
# Build only the frontend
./build.sh --frontend-only
# Compile only the Go backend
./build.sh --backend-onlymake build # Compile frontend and backend
make frontend # Build React Vite bundle
make backend # Compile Go binary (eledrive-app)
make run # Build and start server
make clean # Remove build outputEleDrive features a strict 3-tier hierarchy:
| Role | Authority | Key Capabilities |
|---|---|---|
owner |
Supreme Authority | Full system control. Exclusively authorized to assign or revoke Administrator privileges. Cannot be deleted or downgraded. Exactly one account can be Owner at a time. |
admin |
Operational Authority | Accesses the Admin Console (/admin) to approve new users, adjust storage quotas, manage system settings, and review audit logs. Cannot promote/demote other admins or edit the Owner. |
member |
Standard Team User | Personal cloud drive, upload folders/projects, share with teammates, download ZIP archives. |
Ownership transfers and Owner credential resets are executed via the server-side CLI script to guarantee that the Owner account cannot be compromised or reset by administrators:
# 1. Interactive menu (change password, transfer ownership, create owner, list accounts)
./ownership.sh
# 2. Change the Workspace Owner password directly
./ownership.sh --password
# 3. Transfer ownership to a specific teammate (by username or email)
./ownership.sh alex@eledrive.local
# or
./ownership.sh alexNote: When ownership is transferred, the previous Owner is automatically reassigned to Administrator, and the new Owner is marked as approved.
The start.sh script automatically checks and builds the frontend bundle, compiles the Go backend, and runs the application:
chmod +x start.sh
./start.shAfter building with ./build.sh (or make build):
./eledrive-appThen open your browser at http://localhost:8080.
To access the Admin Console directly: http://localhost:8080/admin.
POST /api/auth/register- Create a new team user accountPOST /api/auth/login- Authenticate and receive JWT tokenGET /api/auth/me- Get current authenticated user profilePUT /api/user/profile- Update display name and avatar colorPUT /api/user/password- Change account password
GET /api/folders?parent_id={id}- Retrieve folder contents and path breadcrumbsPOST /api/folders- Create a new folderPUT /api/folders/{id}- Rename folderPOST /api/folders/{id}/move- Move folder to target parentPOST /api/folders/{id}/star- Toggle starred stateDELETE /api/folders/{id}- Move folder to trashPOST /api/folders/{id}/restore- Restore folder from trashDELETE /api/folders/{id}/permanent- Permanently delete folderGET /api/folders/{id}/download- Download entire folder hierarchy as.zipPOST /api/upload- Upload multiple files or full folder projectsGET /api/files/search?q={query}&type={type}- Search files and foldersGET /api/files/{id}/preview- Get code/text preview contentGET /api/files/{id}/download?inline={0|1}- Stream or download file
POST /api/shares- Share folder/file with a teammateGET /api/shares- List items shared with current userDELETE /api/shares/{id}- Revoke team member sharePOST /api/share-links- Generate public link (supports guest upload permission)GET /api/public/share/{token}- View shared folder/file metadataGET /api/public/share/{token}/download- Download shared item or folder ZIPPOST /api/public/share/{token}/upload- Upload files into shared folder as guest
GET /api/admin/stats- Platform storage and activity metricsGET /api/admin/users- List all users with storage limits and usagePUT /api/admin/users/{id}- Update user profile, role, quota, or reset passwordDELETE /api/admin/users/{id}- Delete user account and disk storageGET /api/admin/logs?action={action}&q={query}- Filter system audit logsDELETE /api/admin/logs- Clear activity logsGET /api/admin/settings- View platform settingsPUT /api/admin/settings- Update platform settings
EleDrive can be configured using environment variables:
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Port for the HTTP server |
DATABASE_DIR |
database |
Root directory for databases, uploads, and logs |
ACCOUNT_DB_PATH |
database/account.db |
Path to the user accounts & settings SQLite database |
DRIVE_DB_PATH |
database/drive.db |
Path to the files & folders SQLite database |
STORAGE_DIR |
database/uploads |
Path to directory where files are stored |
LOGS_DIR |
database/logs |
Path to directory where dated/timed logs are stored |
JWT_SECRET |
eledrive-secret-key-... |
Secret key used for signing JWT tokens |
MAX_UPLOAD_SIZE_MB |
1024 (1 GB) |
Maximum allowed file upload size in MB |