Cloud Computing Capstone Project — Academic Version 1.0
A modular Python application that simulates an enterprise document storage platform.
Upload, organise, search, analyse, and optionally sync files to Azure Blob Storage — all from a clean CLI interface.
| Feature | Description |
|---|---|
| 📤 File Upload | Validate, deduplicate (SHA-256), auto-categorise, and store files |
| 🔍 Search | Filter by name, category, extension, date range, or size |
| 📥 Download | Retrieve files by ID with optional Azure fallback |
| 🗑️ Delete | Soft delete (recoverable) or hard delete |
| ♻️ Restore | Reverse any soft delete |
| 🗂️ Organise | Auto-scan and relocate misplaced files |
| 📊 Analytics | Totals, averages, distributions, upload timeline |
| 📄 HTML Report | Self-contained dark-themed report with 4 embedded charts |
| ☁️ Azure Sync | Upload/download via Azure Blob Storage (optional) |
| 📧 Email Report | Send generated report via SMTP (optional) |
cd /path/to/cap2python -m venv .venv
source .venv/bin/activate # Linux / macOS
.venv\Scripts\activate # Windowspip install -r requirements.txtcp .env.example .env
# Edit .env if needed (all defaults work for local mode)python run_manager.pycap2/
├── cloud_manager/ # Core Python package
│ ├── __init__.py
│ ├── logger.py # Rotating file + console logger
│ ├── utils.py # Helpers: UUID, checksum, size, category map
│ ├── database.py # SQLite CRUD layer
│ ├── uploader.py # File upload pipeline
│ ├── organizer.py # Storage organisation
│ ├── search.py # Search engine (tabulate output)
│ ├── downloader.py # File retrieval
│ ├── deleter.py # Soft/hard delete + restore
│ ├── analytics.py # Storage metrics
│ ├── charts.py # Matplotlib chart generators
│ ├── report_generator.py # HTML report orchestrator
│ ├── azure_storage.py # Azure Blob Storage integration
│ └── emailer.py # SMTP email delivery
│
├── templates/
│ └── report_template.html # Jinja2 dark-themed HTML template
│
├── tests/
│ ├── test_database.py
│ ├── test_uploader.py
│ ├── test_search.py
│ └── test_reports.py
│
├── data/ # SQLite DB + CSV exports (auto-created)
├── storage/ # Managed file storage (auto-created)
├── reports/ # HTML report + charts (auto-created)
├── logs/ # Rotating application logs (auto-created)
│
├── run_manager.py # CLI entry point
├── requirements.txt
├── .env.example
└── .gitignore
CREATE TABLE files (
file_id TEXT PRIMARY KEY, -- UUID hex (32 chars)
file_name TEXT NOT NULL,
category TEXT NOT NULL, -- Documents, Images, Videos, …
extension TEXT NOT NULL, -- lowercase, no dot
file_size INTEGER NOT NULL, -- bytes
checksum TEXT NOT NULL, -- SHA-256 hex digest
storage_path TEXT NOT NULL, -- absolute path on disk
upload_date TEXT NOT NULL, -- ISO-8601
modified_date TEXT NOT NULL, -- ISO-8601
status TEXT NOT NULL -- 'active' | 'deleted'
);| Category | Extensions |
|---|---|
| Documents | pdf, doc, docx, txt, odt, rtf, md, ppt, pptx |
| Images | jpg, jpeg, png, gif, bmp, svg, webp, tiff |
| Videos | mp4, avi, mov, mkv, wmv, flv, webm |
| Spreadsheets | xls, xlsx, csv, ods, tsv |
| Archives | zip, tar, gz, bz2, rar, 7z, xz |
| Projects | py, js, ts, html, css, json, yaml, sh, java, go |
| Others | Everything else |
| Variable | Default | Description |
|---|---|---|
STORAGE_PATH |
storage/ |
Local storage root directory |
DB_PATH |
data/files.db |
SQLite database path |
REPORT_PATH |
reports/ |
Report output directory |
UPLOAD_TO_AZURE |
false |
Enable Azure Blob sync |
AZURE_STORAGE_CONNECTION_STRING |
(empty) | Azure connection string |
AZURE_CONTAINER_NAME |
cloud-file-manager |
Blob container name |
SEND_EMAIL |
false |
Enable email report delivery |
SMTP_HOST |
smtp.gmail.com |
SMTP server host |
SMTP_PORT |
587 |
SMTP server port |
SMTP_USER |
(empty) | Sender email address |
SMTP_PASS |
(empty) | SMTP password / app password |
EMAIL_RECIPIENT |
(empty) | Report destination email |
LOG_LEVEL |
INFO |
Logging level |
LOG_PATH |
logs/manager.log |
Log file path |
pytest tests/ -vExpected output: all tests pass (no Azure credentials required).
After running the system and generating a report:
data/files.db— SQLite databasedata/metadata.csv— full file catalogue exportreports/report.html— self-contained HTML analytics reportreports/storage_summary.csv— high-level stats CSVreports/charts/category_distribution.pngreports/charts/storage_usage.pngreports/charts/file_types.pngreports/charts/upload_history.pnglogs/manager.log— rotating application log
Academic use only. Cloud Computing Capstone Project.