Skip to content

yucezis/FileUploadSystem-Dotnet-React

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

FileUploadSystem

A modern document management platform with versioning and secure file sharing.
Built with .NET 9 Web API + React (Vite) + MinIO + Hangfire.


Features

  • JWT Authentication — Secure authentication for registered users
  • Cloud Storage with MinIO — Open-source alternative to Azure Blob Storage
  • Chunked Upload — Upload large files in parts without overloading the server
  • File Versioning — Old versions are never deleted, they are archived
  • Secure Sharing Links — UUID-based download links accessible without authentication
  • Background Jobs (Hangfire) — Thumbnail generation, temporary file cleanup
  • Dashboard — File listing, search, and preview

Architecture

This project follows Clean Architecture (Onion) principles, split into 4 layers:

FileUploadSystem/
├── FileUploadSystem.API/            # Controllers, Middleware, Program.cs
├── FileUploadSystem.Application/    # Interfaces, CQRS Commands/Queries
├── FileUploadSystem.Domain/         # Entities (User, Document, DocumentVersion, SharedLink)
└── FileUploadSystem.Infrastructure/ # EF Core, MinIO, Hangfire implementations

Layer dependencies

API → Application → Domain
API → Infrastructure → Application

Domain knows nothing about any other layer. Infrastructure implements the interfaces defined by Application.


Database Schema

Users
  └── Documents (1-N)
        └── DocumentVersions (1-N)
        └── SharedLinks (1-N)
Table Description
Users Authentication credentials
Documents Metadata for uploaded files
DocumentVersions Different versions of the same file
SharedLinks UUID-based public access links

Tech Stack

Layer Technology
Backend .NET 8, ASP.NET Core Web API
ORM Entity Framework Core, SQL Server
Storage MinIO (Docker)
Background Jobs Hangfire
Authentication JWT Bearer Token
Validation FluentValidation
Frontend React 18, Vite, Axios

Setup

Prerequisites

1. Start MinIO with Docker

docker run -p 9000:9000 -p 9001:9001 \
  -e "MINIO_ROOT_USER=admin" \
  -e "MINIO_ROOT_PASSWORD=password123" \
  quay.io/minio/minio server /data --console-address ":9001"

Access the MinIO dashboard at http://localhost:9001.

2. Configure appsettings.json

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=FileUploadSystem;Trusted_Connection=True;"
  },
  "Jwt": {
    "SecretKey": "your-secret-key-here",
    "Issuer": "FileUploadSystem",
    "ExpiryInMinutes": 60
  },
  "MinIO": {
    "Endpoint": "localhost:9000",
    "AccessKey": "admin",
    "SecretKey": "password123",
    "BucketName": "file-upload-system"
  }
}

3. Apply database migrations

cd FileUploadSystem.API
dotnet ef database update

4. Run the API

dotnet run --project FileUploadSystem.API

Access Swagger at https://localhost:7xxx/swagger.

5. Run the React frontend

cd client
npm install
npm run dev

API Endpoints

Auth

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Login, returns JWT token

Files

Method Endpoint Description
POST /api/files/upload Upload a single file
POST /api/files/upload/chunk Chunked upload
GET /api/files List user's files
GET /api/files/{id} Get file details
DELETE /api/files/{id} Delete a file

Sharing

Method Endpoint Description
POST /api/files/{id}/share Create a sharing link
GET /api/share/{token} Download file via token (no auth required)

🗺️ Roadmap

  • Phase 1 — Core architecture and database
  • Phase 2 — MinIO integration and basic upload
  • Phase 3 — Chunked upload and Hangfire background jobs
  • Phase 4 — React UI (drag & drop, progress bar, dashboard)
  • Phase 5 — Versioning, sharing links, global exception handling

Topics Covered

This project covers the following backend concepts:

  • Clean Architecture / Onion Architecture
  • JWT Authentication & Authorization
  • Entity Framework Core (Code-First, Migrations, Relationships)
  • Repository Pattern & Dependency Injection
  • MinIO / Azure Blob Storage integration
  • Chunked file uploading
  • Background Jobs with Hangfire
  • FluentValidation
  • Global Exception Handling Middleware
  • File versioning logic
  • UUID-based secure sharing links

MIT

About

Enterprise-grade File Management System developed on .NET Clean Architecture. Features large file chunking to prevent memory leaks, MinIO object storage integration, and Hangfire background jobs for asynchronous tasks. Designed for high performance and secure link sharing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages