{"id":46937544,"url":"https://github.com/rilltome/peakdrive","last_synced_at":"2026-03-11T06:01:56.247Z","repository":{"id":336701310,"uuid":"1150554231","full_name":"rillToMe/PeakDrive","owner":"rillToMe","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-05T18:09:37.000Z","size":994,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-06T03:58:43.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rillToMe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-05T12:19:32.000Z","updated_at":"2026-02-05T18:07:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rillToMe/PeakDrive","commit_stats":null,"previous_names":["rilltome/peakdrive"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rillToMe/PeakDrive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rillToMe%2FPeakDrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rillToMe%2FPeakDrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rillToMe%2FPeakDrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rillToMe%2FPeakDrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rillToMe","download_url":"https://codeload.github.com/rillToMe/PeakDrive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rillToMe%2FPeakDrive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30372535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-11T06:01:52.484Z","updated_at":"2026-03-11T06:01:56.242Z","avatar_url":"https://github.com/rillToMe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PeakDrive 🚀\n\n![.NET](https://img.shields.io/badge/.NET-8.0-purple)\n![React](https://img.shields.io/badge/React-Vite-blue)\n![PostgreSQL](https://img.shields.io/badge/Database-PostgreSQL-316192)\n![License](https://img.shields.io/badge/License-MIT-green)\n![Status](https://img.shields.io/badge/Project-Active-success)\n\n**PeakDrive** is a private team drive system built with **.NET 8 WebAPI** and **React (Vite)**.\n\nIt is designed for internal organizations where accounts are created only by administrators (no public registration).\n\n- Files are stored directly on server-side storage  \n- Metadata and permissions are managed in **PostgreSQL**\n\n---\n\n## ✨ Features\n\n- Admin-only user creation (no open signup)\n- Secure authentication with JWT\n- Folder and file management system\n- Upload, download, and preview support\n- Public share links via token\n- Built-in Health Check diagnostics\n- Clean separation between backend API and frontend UI\n\n---\n\n## 🏗 Architecture Overview\n\n```mermaid\nflowchart TD\n\n    UI[Frontend UI\u003cbr/\u003eReact + Vite + Tailwind] --\u003e|HTTP Requests| API[Backend API\u003cbr/\u003eASP.NET Core WebAPI]\n\n    API --\u003e|Metadata| DB[(PostgreSQL Database)]\n    API --\u003e|Files Stored| ST[Server Storage\u003cbr/\u003estorage/ folder]\n\n    API --\u003e|Public Share Links| Share[Token Share Endpoint]\n```\n\n---\n\n## 🛠 Tech Stack\n\n### Backend\n- ASP.NET Core 8 WebAPI  \n- Entity Framework Core  \n- PostgreSQL (Npgsql Provider)  \n- JWT Authentication  \n- Swagger Documentation  \n\n### Frontend\n- React + Vite  \n- Tailwind CSS  \n- Axios  \n- React Router  \n- FontAwesome  \n- React Three Fiber  \n\n---\n\n## 📂 Project Structure\n\n```txt\npeakdrive/\n├── ditDriveAPI/     # Backend (.NET 8 API)\n└── frontend/        # Frontend (React + Vite)\n```\n\n---\n\n## ⚙️ Backend Setup\n\n### Configuration Sources\n\nPeakDrive supports configuration via:\n\n✅ `appsettings.json`  \n✅ Environment Variables (recommended for production)\n\nMain config file:\n\n```\nditDriveAPI/appsettings.json\n```\n\n---\n\n### Required Config Keys\n\n| Key | Description |\n|-----|------------|\n| `Jwt:Key` | Secret key for token signing |\n| `Jwt:Issuer` | Token issuer name |\n| `Jwt:Audience` | Token audience |\n| `ConnectionStrings:Default` | PostgreSQL connection string |\n| `Storage:RootPath` | Root folder for file storage |\n| `Share:BaseUrl` | Base URL for public share links |\n\n---\n\n### Environment Variable Example (Production)\n\n```env\nJwt__Key=SUPER_SECRET_KEY\nJwt__Issuer=PeakDrive\nJwt__Audience=PeakDriveUsers\n\nConnectionStrings__Default=Host=...;Database=...;Username=...;Password=...\n\nStorage__RootPath=storage/\nShare__BaseUrl=https://your-domain.com\n\nSeed__MasterEmail=root@767\nSeed__MasterPassword=765\n```\n\n✅ Double underscore (`__`) maps to nested JSON keys automatically in ASP.NET Core.\n\n---\n\n### Master Admin Seeding (Optional)\n\nIf database is empty, PeakDrive can auto-create a Master Admin account:\n\n```env\nSeed__MasterEmail=admin@peakdrive.local\nSeed__MasterPassword=strongpassword\n```\n\nIf not provided, seeding is skipped automatically.\n\n---\n\n### Run Backend\n\n```bash\ncd ditDriveAPI\n\ndotnet tool restore\ndotnet ef database update\ndotnet run\n```\n\nBackend runs at:\n\n```\nhttp://localhost:5133\n```\n\n---\n\n## 🎨 Frontend Setup\n\n### Install \u0026 Run\n\n```bash\ncd frontend\n\nnpm install\nnpm run dev\n```\n\nFrontend runs at:\n\n```\nhttp://localhost:5173\n```\n\n---\n\n### Dev Proxy Routing\n\nDuring development:\n\n- `/api`\n- `/s`\n- `/storage`\n\n→ forwarded to backend:\n\n```\nhttp://localhost:5133\n```\n\n---\n\n## 🔑 Main API Endpoints\n\n### Authentication\n- `POST /api/auth/login`\n\n### Admin Management\n- `POST /api/admin/create-user`\n- `POST /api/admin/create-admin`\n- `GET  /api/admin/list-users`\n\n### Folder Management\n- `POST /api/folders`\n- `GET  /api/folders/{id}`\n\n### File Management\n- `POST /api/files/upload?folderId=X`\n- `GET  /api/files/view/{fileId}`\n- `GET  /api/files/download/{fileId}`\n\n### File Sharing\n- `POST /api/share/{fileId}`\n- `GET  /s/{token}`\n\n---\n\n## ✅ Health Check Module\n\nPeakDrive provides built-in diagnostics:\n\n- `GET /health` (lightweight)\n- `GET /health/full` (API + DB + Storage)\n\nExample:\n\n```bash\ncurl -i http://localhost:5133/health/full\n```\n\n---\n\n## 📦 Build Frontend (Production)\n\n```bash\ncd frontend\nnpm run build\n```\n\nOutput:\n\n```\nfrontend/dist/\n```\n\n---\n\n## 🚀 Deployment Overview\n\nRecommended production routing (Nginx):\n\n- `/api` → backend service\n- `/storage` → backend static serving\n- `/` → React frontend build\n\n---\n\n## 📜 License\n\nThis project is licensed under the **MIT License**  \nMaintained by **DitDev**\n\nSee `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frilltome%2Fpeakdrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frilltome%2Fpeakdrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frilltome%2Fpeakdrive/lists"}