PeakDrive is a private team drive system built with .NET 8 WebAPI and React (Vite).
It is designed for internal organizations where accounts are created only by administrators (no public registration).
- Files are stored directly on server-side storage
- Metadata and permissions are managed in PostgreSQL
- Admin-only user creation (no open signup)
- Secure authentication with JWT
- Folder and file management system
- Upload, download, and preview support
- Public share links via token
- Built-in Health Check diagnostics
- Clean separation between backend API and frontend UI
flowchart TD
UI[Frontend UI<br/>React + Vite + Tailwind] -->|HTTP Requests| API[Backend API<br/>ASP.NET Core WebAPI]
API -->|Metadata| DB[(PostgreSQL Database)]
API -->|Files Stored| ST[Server Storage<br/>storage/ folder]
API -->|Public Share Links| Share[Token Share Endpoint]
- ASP.NET Core 8 WebAPI
- Entity Framework Core
- PostgreSQL (Npgsql Provider)
- JWT Authentication
- Swagger Documentation
- React + Vite
- Tailwind CSS
- Axios
- React Router
- FontAwesome
- React Three Fiber
peakdrive/
βββ ditDriveAPI/ # Backend (.NET 8 API)
βββ frontend/ # Frontend (React + Vite)PeakDrive supports configuration via:
β
appsettings.json
β
Environment Variables (recommended for production)
Main config file:
ditDriveAPI/appsettings.json
| Key | Description |
|---|---|
Jwt:Key |
Secret key for token signing |
Jwt:Issuer |
Token issuer name |
Jwt:Audience |
Token audience |
ConnectionStrings:Default |
PostgreSQL connection string |
Storage:RootPath |
Root folder for file storage |
Share:BaseUrl |
Base URL for public share links |
Jwt__Key=SUPER_SECRET_KEY
Jwt__Issuer=PeakDrive
Jwt__Audience=PeakDriveUsers
ConnectionStrings__Default=Host=...;Database=...;Username=...;Password=...
Storage__RootPath=storage/
Share__BaseUrl=https://your-domain.com
Seed__MasterEmail=root@767
Seed__MasterPassword=765β
Double underscore (__) maps to nested JSON keys automatically in ASP.NET Core.
If database is empty, PeakDrive can auto-create a Master Admin account:
Seed__MasterEmail=admin@peakdrive.local
Seed__MasterPassword=strongpasswordIf not provided, seeding is skipped automatically.
cd ditDriveAPI
dotnet tool restore
dotnet ef database update
dotnet runBackend runs at:
http://localhost:5133
cd frontend
npm install
npm run devFrontend runs at:
http://localhost:5173
During development:
/api/s/storage
β forwarded to backend:
http://localhost:5133
POST /api/auth/login
POST /api/admin/create-userPOST /api/admin/create-adminGET /api/admin/list-users
POST /api/foldersGET /api/folders/{id}
POST /api/files/upload?folderId=XGET /api/files/view/{fileId}GET /api/files/download/{fileId}
POST /api/share/{fileId}GET /s/{token}
PeakDrive provides built-in diagnostics:
GET /health(lightweight)GET /health/full(API + DB + Storage)
Example:
curl -i http://localhost:5133/health/fullcd frontend
npm run buildOutput:
frontend/dist/
Recommended production routing (Nginx):
/apiβ backend service/storageβ backend static serving/β React frontend build
This project is licensed under the MIT License
Maintained by DitDev
See LICENSE for details.