Appearance
HVC Storage
- Project:
hvc-storage
Overview
hvc-storage is a class library that abstracts object storage across Azure Blob, MinIO / S3, and the local file system. It is used by hvc-api and hvc-services for saving and reading user media, tenant logos, session files, and recordings. Object names are derived from ids using a Hashids-based provider, so files are stored under short opaque names.
It is packed and published as the NuGet package hvc.storage (GeneratePackageOnBuild).
Tech Stack
- Target: .NET 6 (class library)
Azure.Storage.Blobs,Minio,Hashids.net.
Core pieces
| File | Role |
|---|---|
Contracts/IHvcFileSystem.cs | The file-system contract: saveFile, readFile, deleteFile + IHashProvider, IConfigProvider |
HvcStorageFactory.cs | Builds the right IHvcFileSystem from config |
AzureBlobFileSystem.cs | Azure Blob implementation |
MinioFileSystem.cs | MinIO / S3 implementation |
LocalFileSystem.cs | Local-disk implementation |
SimpleAzureBlobFileSystem.cs | A simpler blob wrapper (also copied into other projects) |
HvcHashProvider.cs | Hashids-based file-name generation |
Mime.cs | Extension → MIME-type dictionary |
Config/StorageConfig.cs | Storage configuration |
Storage factory
csharp
var store = await factory.getClientStore(); // returns IHvcFileSystem for the active store typeHelper methods derive well-known names:
getSessionName(id)— session filesgetUserProfileFilename(userId)— user profile picturesgetTenantLogoFilename(tenantId)— tenant logos
Pages
| Page | What it covers |
|---|---|
| Configuration & Providers | Store types and how they are selected |
| Usage | How consumers use the library |
Related
- HVC Services — uses this for tenant storage + recordings.
- Api — media/file uploads go through this abstraction.
- HVC Shared — the sibling shared library.