Find. Analyze. Clean. Recover.
SMARTFIE is a full-stack, web-based file management and storage optimization system. It scans folders, detects exact duplicate files using SHA-256 hashing, calculates wasted storage, and gives users full control over cleanup β with built-in backup and undo support.
Whether files have different names or live in different folders, SMARTFIE identifies them as duplicates the moment their content matches.
Built incrementally β every feature is planned, implemented, tested, and documented before moving to the next stage.
- Status
- Tech Stack
- Features
- Project Structure
- Development Progress
- How It Works
- API Endpoints
- Getting Started
- Testing
- What I've Learned
- Current Status
- License
π‘ In Development
The core backend, database, duplicate detection, React dashboard, file classification, cleanup, recovery, dark mode, and documentation features have all been implemented. Additional testing and final documentation are in progress.
| Layer | Technology |
|---|---|
| π Backend | Python + FastAPI |
| ποΈ Database | SQLite + SQLAlchemy |
| π Hashing | SHA-256 |
| βοΈ Frontend | React + CSS |
| π API Communication | Axios |
| π» Dev Environment | VS Code |
| π§ Version Control | Git + GitHub |
| π Folder scanning | π Recursive file scanning | π Exact duplicate detection |
| π SHA-256 hashing | πΎ Wasted storage calculation | π Storage statistics dashboard |
| ποΈ Duplicate file grouping | ποΈ File type classification | πΌοΈ Duplicate image detection |
| βοΈ Individual file selection | βοΈ Select All / Deselect All | ποΈ Cleanup selected duplicates |
| β©οΈ Undo cleanup | π Storage recovery tracking | π Scan history |
| ποΈ SQLite storage | π Dark mode | π± Responsive dashboard |
SMARTFIE/
β
βββ README.md
β
βββ backend/
β βββ main.py
β βββ scanner.py
β βββ hasher.py
β βββ duplicate_finder.py
β βββ database.py
β βββ models.py
β βββ create_database.py
β βββ save_scan.py
β βββ check_database.py
β βββ scan_history.py
β βββ test_duplicates.py
β βββ test_hasher.py
β βββ test_scanner.py
β βββ TestFiles/
β
βββ frontend/
βββ src/
β βββ components/
β β βββ Dashboard.jsx
β β βββ Dashboard.css
β βββ api/
β β βββ api.js
β βββ assets/
β
βββ public/
βββ package.json
Stage 1 β Project Setup β
- Created project structure
- Created Python virtual environment
- Installed FastAPI and Uvicorn
- Created and tested the basic backend
Stage 2 β File Scanner β
- Built a recursive file scanner
- Scans folders and subfolders
- Collects file name, path, size, and extension
- Added file type classification
- Added folder validation and error handling
- Added
/scanAPI functionality
Stage 3 β Duplicate Detection β
- Implemented SHA-256 hashing
- Detects exact duplicate files
- Groups duplicate files together
- Calculates potentially wasted storage
- Added
/duplicatesAPI functionality - Added duplicate image detection during normal scanning
Stage 4 β SQLite Database & Scan History β
- Added SQLite database using SQLAlchemy
- Created Scan and File database models
- Stores scanned file metadata and SHA-256 hashes
- Maintains scan history
- Added
/historyAPI - Tested multiple scan records successfully
Stage 5 β React Dashboard β
- Built the SMARTFIE frontend dashboard
- Added sidebar navigation, Dashboard and History pages
- Connected frontend with backend APIs
- Storage overview: Files Scanned, Duplicate Groups, Wasted Storage, Storage Recovered
- Storage statistics + usage progress bars
- File type classification & duplicate group display
- Displays scanned folder path
- Responsive layout + dark mode
Stage 6 β Duplicate File Cleanup & Recovery β
- Displays duplicate files in groups (name, path, size)
- Individual file selection + Select All / Deselect All
- Clean Selected action with status messages
- Storage recovery tracking
- Backup before cleanup + Undo Cleanup functionality
- Cleanup-related history support
Stage 7 β Advanced Features π‘
Completed
- Improved cleanup safety
- File type grouping and filtering
- Duplicate image detection
- Cleanup Undo functionality
- Dark mode
Remaining
- Scan progress indicator
- Further error handling improvements
- Search and filtering
- Export scan reports
Stage 8 β Testing & Final Documentation π²
- Complete frontend testing
- Complete backend testing
- Test cleanup functionality thoroughly
- Improve error handling
- Finalize project documentation
- Prepare screenshots and project report
- Prepare final project demonstration
The SMARTFIE dashboard provides an overview of the latest scan, displaying total files scanned, duplicate groups, wasted storage, storage recovered, waste analysis, file type categories, duplicate file groups, and the scanned folder path.
Users provide a folder path, and SMARTFIE recursively scans that folder and its subfolders. For each file it collects the name, path, size, extension, type, and SHA-256 hash β then displays the results on the dashboard.
Each file's content is hashed using SHA-256. Files that produce the same hash are grouped as duplicates β regardless of file name or location.
photo1.png
photo1_copy.png
If both files contain exactly the same data, they produce the same hash and are flagged as duplicates.
Scanned files are automatically classified by extension into:
Images Β· Documents Β· Videos Β· Audio Β· Other
Duplicate groups show file name, path, and size. Users can select individual files, select/deselect all, and clean selected files β nothing is removed automatically, keeping cleanup fully user-controlled.
Before removing a file, SMARTFIE creates a backup copy, then removes the original and tracks recovered storage. The Undo Cleanup feature restores files from backup at any time.
Scan and cleanup activity is stored in the SQLite database, letting users review past operations at any time.
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check / root endpoint |
GET |
/scan |
Scan a folder for files |
GET |
/duplicates |
Detect duplicate files |
GET |
/history |
View scan history |
DELETE |
/cleanup |
Remove a selected duplicate file |
POST |
/undo-cleanup |
Restore files removed during cleanup |
Interactive API Docs: once the backend is running, Swagger UI is available at http://127.0.0.1:8000/docs
git clone https://github.com/aishwar-ya/SmartFile.git
cd SmartFilecd backend
# Create virtual environment
python -m venv venv
# Activate it
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install fastapi uvicorn sqlalchemy
# Start the backend
uvicorn main:app --reload- Backend runs at:
http://127.0.0.1:8000 - Swagger docs at:
http://127.0.0.1:8000/docs
Open a new terminal:
cd SmartFile/frontend
npm install
npm run devThen open the local URL shown in your terminal. π
The backend includes dedicated test files for core components:
backend/
βββ test_duplicates.py
βββ test_hasher.py
βββ test_scanner.py
A dedicated test folder supports duplicate detection and classification testing:
TestFiles/
βββ Images/
βββ Documents/
βββ Videos/
βββ Audio/
βββ Other/
|
Backend
|
Database
|
Frontend & Workflow
|
β Completed
Backend setup Β· Recursive scanning Β· SHA-256 hashing Β· Duplicate detection Β· Wasted storage calculation Β· SQLite integration Β· Scan history Β· React dashboard Β· Storage statistics Β· File classification Β· Duplicate image detection Β· Duplicate file interface Β· File selection Β· Select All / Deselect All Β· Cleanup interface Β· Cleanup backup Β· Undo cleanup Β· Storage recovery tracking Β· History interface Β· Dark mode Β· Responsive dashboard
π Next
- Scan progress indicator
- Additional error handling
- Search and filtering
- Export scan reports
- Additional testing
- Final documentation
- Project report
- Final presentation & demonstration
SMARTFIE is developed incrementally. Each major feature is planned β implemented β tested β improved β documented, keeping the project organized from start to finish.
This project is currently unlicensed. A license such as MIT may be added before public release.