# Storage Service

> A .NET 10 microservice for file storage management supporting MinIO and Aliyun OSS.

## Documentation

> **EN**: [English Documentation](docs/en/README.md)  
> **VI**: [Tài liệu Tiếng Việt](docs/vi/README.md)

## Quick Links

- 📖 [Architecture](docs/en/ARCHITECTURE.md) | [Kiến trúc](docs/vi/ARCHITECTURE.md)
- 🚀 [Quick Start](docs/en/README.md#quick-start)
- 🔧 [Configuration](docs/en/README.md#configuration)
- 📡 [API Endpoints](docs/en/README.md#api-endpoints)

## Features

- **Multi-provider Storage**: MinIO (S3-compatible) and Aliyun OSS
- **Runtime Provider Switching**: Switch providers via environment variable
- **Complete File CRUD**: Upload, download, delete, list files
- **Pre-signed URLs**: Secure time-limited download/upload URLs
- **User Quotas**: Storage capacity and file count limits
- **Folder Management**: Logical folder organization (database-based)
- **File Versioning**: Track and restore file versions
- **File Sharing**: Share links with password, expiration, download limits
- **Inter-service Auth**: JWT validation via IAM Service

## Tech Stack

- .NET 10
- PostgreSQL
- MinIO / Aliyun OSS
- Redis (caching)
- RabbitMQ (events)

## Quick Start

```bash
cd services/storage-service-net

# Run with Docker
docker-compose up -d

# Or run locally
dotnet run --project src/StorageService.API
```

Access: http://localhost:5002/swagger

## Project Structure

```
services/storage-service-net/
├── src/
│   ├── StorageService.API/           # Controllers, Commands, Queries
│   ├── StorageService.Domain/        # Entities, Repository interfaces
│   └── StorageService.Infrastructure/# Providers, DbContext, Repositories
├── tests/
│   ├── StorageService.UnitTests/
│   └── StorageService.FunctionalTests/
├── docs/
│   ├── en/                           # English documentation
│   └── vi/                           # Vietnamese documentation
└── README.md
```

## License

MIT
