E-magrad (E-ⵎⴰⴳⵔⴰⴷ) — meaning "Electronic Archive" in Tamazight — is a high-performance file storage service built with FastAPI. It provides intelligent image caching, organized storage, and fast retrieval for a distributed ecosystem.
# **Emagrad** 📂
### *The Archive — File Storage Service*
---
## 📖 **Overview**
**Emagrad** (ⴰⵎⴰⴳⵔⴰⴷ) — meaning "The Archive" in Tamazight — is a high-performance file storage service built with **FastAPI**. It provides intelligent image caching, organized storage, and fast retrieval for a distributed ecosystem.
---
## ✨ **Core Features**
| Feature | Description |
|---------|-------------|
| **Smart Upload** | Organize files by owner and product ID |
| **Intelligent Caching** | Auto-generate 300x300 JPEG thumbnails |
| **Optimized Retrieval** | Serve compressed images for faster loading |
| **Flexible Storage** | Support for any file type (images, documents, etc.) |
| **Clean Architecture** | Well-organized directory structure |
| **Docker Ready** | Easy containerized deployment |
---
## 🗄️ **Storage Architecture**
```
┌─────────────────────────────────────────────────────────────┐
│ EMAGRAD STORAGE │
├─────────────────────────────────────────────────────────────┤
│ │
│ /app/uploads/ │
│ └── {owner_id}/ │
│ └── {product_id}/ │
│ └── original_files/ │
│ ├── image_001.jpg │
│ ├── image_002.png │
│ └── document.pdf │
│ │
│ /app/cache/ │
│ └── {owner_id}/ │
│ └── {product_id}/ │
│ └── compressed_files/ │
│ ├── image_001_300x300.jpg │
│ ├── image_002_300x300.jpg │
│ …