A Python-based developer tool that captures snapshots of uploaded files and compares them to detect added, modified, and removed files. The project includes a Streamlit web UI for easy interaction and supports both individual file uploads and ZIP folder uploads.
This project was developed as part of an On-the-Job Training (OJT) program to understand file system behavior, hashing, and UI integration using Streamlit.
π Live App: https://snapshot-difference-kgankzlgova2faayonisbx.streamlit.app
- Upload individual files or a ZIP folder
- Stores file metadata (file path + MD5 hash) in a JSON file
- Helps track file-level changes across snapshot versions
- Download snapshots as JSON for permanent storage
- Import previously saved snapshots
Compares Snapshot A and Snapshot B to detect:
- π’ Added Files β Present in Snapshot B but not in Snapshot A
- π‘ Modified Files β File content changed (detected via MD5 hash)
- π΄ Removed Files β Present in Snapshot A but missing in Snapshot B
- π Line-by-Line Diff β For text files, shows exactly which lines changed
A clean and simple browser-based interface that allows users to:
- Upload files or ZIP folder β Generate a snapshot
- Select two snapshots β Compare and view differences
- View added, modified, and removed files clearly
- Download and import snapshots for permanent storage
Displays all snapshots in a structured table with columns:
- Snapshot Name
- Date & Time
- Number of files in the snapshot
- Download button (β¬οΈ)
- Delete button (ποΈ)
The sidebar shows real-time statistics:
- πΎ Total snapshots saved
- π Total files tracked
- π Last snapshot date
Directly upload two versions of the same file to:
- Check if files are identical or modified
- View MD5 hash and file size comparison
- See line-by-line diff for text files
FILE-SYSTEM-SNAPSHOT-DIFFERENCE/
β
βββ folder/ # Sample folder for testing
β
βββ snapshots/ # Auto-generated snapshot JSON files
β
βββ src/
β βββ diff.py # Snapshot comparison logic
β βββ file_compare.py # File comparison logic
β βββ main.py # CLI text-based menu interface
β βββ snapshot.py # Snapshot generation logic
β
βββ app.py # Streamlit UI entry point
βββ LICENSE
βββ README.md
βββ requirements.txt
- Python 3
- Streamlit
- JSON
- Hashlib (MD5)
- Zipfile
- OS Module
pip install -r requirements.txtstreamlit run app.py- Go to Take Snapshot section
- Choose upload mode: Individual Files or ZIP Folder
- Upload your files
- Enter a snapshot name
- Click πΎ Save Snapshot
- Go to Compare Snapshots section
- Select Snapshot A (older) and Snapshot B (newer)
- Click π Compare
- The UI displays:
- Added files
- Modified files (with line-by-line diff for text files)
- Removed files
- Go to Compare Files section
- Upload the Old File and New File
- Click π Compare Files
- View status, MD5 hash, size difference, and line diff
- Go to Snapshot History section
- Download snapshots as JSON (β¬οΈ) for permanent storage
- Delete snapshots (ποΈ) when no longer needed
- Import previously downloaded snapshots
Added Files
new_feature.py
Modified Files
README.mdapp.py
Removed Files
old_script.py
This OJT project is designed to help learners understand:
- How file systems store and update data
- How hashing helps detect content changes
- How to build real-world developer tools
- How to integrate backend logic with a Streamlit web UI
- How to design clean, professional, and scalable project architecture
- Snapshot versioning and tagging
- Export diff results as PDF/CSV reports
- UI filters and search for large snapshot histories
- Support for ignore rules (e.g. skip
.pycfiles)
β If you found this project useful, consider starring the repository!