Skip to content

MARYAM-memo/DuplicateFileDetector

Repository files navigation

🔒 FileGuard - Duplicate File Detection System

An intelligent file management system with automatic duplicate detection using SHA-256 hashing. Even if you rename a file, the system knows it's a duplicate!


Video

fileguard.mp4

💡 Business Problem

Many businesses suffer from duplicated file uploads, which leads to:

  • Wasted storage
  • Increased costs
  • Data inconsistency

🚀 Solution

FileGuard detects duplicate files using SHA-256 hashing, ensuring that even if a file is renamed, it won't be uploaded twice.

🎯 Value

  • Saves storage costs
  • Improves data integrity
  • Prevents human errors during uploads

✨ Features

Feature Description
📁 Folder Management Full CRUD operations for organizing files
📄 File Management Upload, view
🔍 Smart Duplicate Detection Detects duplicates even with different filenames and different folder
📊 Analytics Dashboard Real-time statistics and file distribution insights
🛡️ Upload Attempts Log Tracks all rejected duplicate attempts
Client-Side Hashing Early duplicate detection before server upload
🎨 Modern UI Clean, responsive interface with RTL support

🎯 The Problem & Solution

The Problem

You have 1000+ files. Some are duplicates with different names:

  • Report_Final.pdf
  • Report_Final_Copy.pdf
  • Report_Final_Final.pdf

Same content, different names = Wasted storage

The Solution

SHA-256 Hash Fingerprinting

File A: "Report_Final.pdf" → SHA-256 → "a3f5b2c8d9e1..." File B: "Report_Copy.pdf" → SHA-256 → "a3f5b2c8d9e1..." ⚠️ DUPLICATE!

Even if the filename changes, the hash stays identical for identical content.


🏗️ Architecture

DFD/
├── 📁 DFD.MVC/                 # Web Application (Presentation)
│   ├── Controllers/
│   ├── Views/ (Razor + Vanilla JS)
│   └── wwwroot/
├── 📁 DFD.Application/          # ViewModels, Services, DTOs
├── 📁 DFD.Domain/               # Entities, Interfaces, Enums
├── 📁 DFD.Infrastructure/       # Data Access, Repositories, Unit of Work
└── 📁 Shared/                # Shared Functions

Patterns Used:

  • ✅ Repository Pattern
  • ✅ Unit of Work
  • ✅ Clean Architecture
  • ✅ Dependency Injection
  • ✅ Async/Await Throughout

🛠️ Tech Stack

Layer Technology
Backend ASP.NET Core 10
ORM Entity Framework Core 10
Database PostgreSQL
Frontend Razor Views, Vanilla JavaScript
Styling Custom CSS (No frameworks)
Icons Font Awesome 6
Hashing SHA-256 (Client + Server)

🚀 Getting Started

Installation

# 1. Clone the repository
git clone https://github.com/yourusername/FileGuard.git
cd FileGuard

# 2. Restore NuGet packages
dotnet restore

# 3. Update database
dotnet ef database update --project DFD.Infrastructure --startup-project DFD.MVC

# 4. Run the application
dotnet run --project DFD.MVC

# Run
dotnet run
Page Preview
Dashboard Dashboard
Upload with Duplicate Detection Files_Upload1
File Management Files
Upload Attempts Log UploadAttempts

💼 Use Case

This system is ideal for:

  • Companies handling large file uploads
  • Document management systems
  • Cloud storage solutions

📩 Need a similar system?

I can build a custom version tailored to your business needs. Feel free to reach out via LinkedIn or email.

👩‍💻 Developer

[Marim Mohamed] — .NET Backend Developer

⭐ If you found this project helpful, don't forget to give it a star!

About

نظام إدارة ملفات ذكي مع كشف تلقائي للملفات المكررة باستخدام SHA-256 Hash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors