PROJECT 29 • DAY 9 OF 90 • STORAGE SAFETY ENGINE

FILEGUARD
STORAGE MANAGER.

A disaster-recovery-grade Windows duplicate detector and storage analyzer pairing 3-stage cryptographic SHA-256 pruning with 64-bit dHash perceptual image comparison, an explainable Retained-Copy Selection Advisor, and 100% reversible UUID quarantine with Ctrl+Z undo.

Python 3.10+Tkinter / ttk64-Bit dHash3-Stage SHA-256UUID Quarantine38/38 Pytest
FileGuard Preview
PRUNING FUNNEL
3-Stage + dHash
RECOVERY & QA
Ctrl+Z • 38/38 Tests
3 Stages
Size -> 4KB -> 64KB SHA-256
64-Bit dHash
Hamming Visual Photo Match
Ctrl+Z Undo
UUID Reversible Quarantine
38 / 38
Pytest Tests Passed
01 / Overview

RECLAIM DISK SPACE WITHOUT DESTRUCTIVE BLACK-BOX DELETION.

Naive cleaners freeze RAM on multi-GB files or permanently erase last surviving copies. FileGuard streams chunked hashes, guards protected system folders, and keeps at least one master copy locked.

01

3-Stage Pruning Funnel

Stage 1 exact size clustering -> Stage 2 4KB fast pre-hash -> Stage 3 streaming 64KB SHA-256 content digests.

02

64-Bit dHash Photo Similarity

Detects resized, re-saved, or cropped near-duplicate photos via grayscale difference hashes and Hamming distance.

03

Retained-Copy Safety Block

Explainable Selection Advisor marks oldest/shallowest/cleanest master copy and physically blocks deleting 100% of a cluster.

04

Reversible UUID Quarantine

Moves redundant copies into an isolated UUID vault with manifest metadata; press Ctrl+Z for 1-click conflict-safe restoration.

05

Protected OS Path Guards

Blocks destructive scans or quarantines inside C:\Windows, Program Files, and core system hierarchies.

06

Non-Double-Counting Analyzer

Accurate directory tree size attribution avoiding nested child-folder double-counting while logging storage trends in SQLite WAL.

02 / Architecture

HOW IT WORKS.

Worker threads stream 3-stage hashes and dHash signatures into WAL SQLite while enforcing Retained-Copy & OS guard invariants.

STAGE 01

Protected Guard

Block OS paths & index folder sizes.

→
STAGE 02

Stage 1 & 2

Exact size cluster -> 4KB quick pre-hash.

→
STAGE 03

Stage 3 / dHash

64KB SHA-256 + 64-bit Hamming match.

→
STAGE 04

Advisor Lock

Pin master Retained Copy per cluster.

→
STAGE 05

UUID Vault

Reversible quarantine + Ctrl+Z restore.

03 / Screenshots

APPLICATION SCREENSHOTS.

Live screens captured from the running application. Click any image to view full size, or follow setup instructions in the GitHub repository.

04 / Technical Details

SAFETY INVARIANTS & HASHING PERFORMANCE.

Key modules, rules, safety checks, and automated test results documented in the repository.

Safety / Hashing Control Implementation Guarantee
3-Stage Pruning Byte Size -> 4 KB Pre-Hash -> 64 KB SHA-256 Zero whole-file RAM spikes
Perceptual Photos 64-bit grayscale dHash + Hamming cutoff Catches resized/recompressed clones
Retained-Copy Rule Hard UI + backend check per cluster Cannot erase every copy accidentally
Recovery & Pytest UUID quarantine manifest + Ctrl+Z + SQLite 38 / 38 Passed (100%)
05 / Tech Stack

CORE TECHNOLOGIES.

Frameworks, databases, visualization tools, and testing libraries used in FileGuard.

DESKTOP UI
Tkinter / ttk • Multi-Threaded
EXACT HASHING
3-Stage 64KB Chunked SHA-256
VISUAL MATCHING
64-Bit dHash + Hamming Distance
DISASTER RECOVERY
UUID Quarantine + Ctrl+Z Undo
DATABASE & EXE
SQLite WAL • PyInstaller .exe
VERIFICATION
Pytest (38/38 Passed)
06 / Next Steps

FUTURE ENHANCEMENTS.

Upcoming improvements planned for FileGuard.

USN Journal incremental change monitoring for instantaneous NTFS rescans.
Audio fingerprinting comparison for lossless FLAC vs MP3 duplicates.
Scheduled auto-purge policy for aged (>30 days) quarantined bundles.
Network SMB/NAS share dedup throttling slider.
Interactive treemap sunburst storage explorer widget.
Signed CSV/PDF IT storage reclaim audit certificates.
OPEN-SOURCE PROJECT • GITHUB.COM/RAGURAMRRP

EXPLORE SOURCE & DOCS.

View the complete codebase, sample datasets, quick-launch scripts, and automated test suites on GitHub.