Skip to content

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

FileRole
Contracts/IHvcFileSystem.csThe file-system contract: saveFile, readFile, deleteFile + IHashProvider, IConfigProvider
HvcStorageFactory.csBuilds the right IHvcFileSystem from config
AzureBlobFileSystem.csAzure Blob implementation
MinioFileSystem.csMinIO / S3 implementation
LocalFileSystem.csLocal-disk implementation
SimpleAzureBlobFileSystem.csA simpler blob wrapper (also copied into other projects)
HvcHashProvider.csHashids-based file-name generation
Mime.csExtension → MIME-type dictionary
Config/StorageConfig.csStorage configuration

Storage factory

csharp
var store = await factory.getClientStore();   // returns IHvcFileSystem for the active store type

Helper methods derive well-known names:

  • getSessionName(id) — session files
  • getUserProfileFilename(userId) — user profile pictures
  • getTenantLogoFilename(tenantId) — tenant logos

Pages

PageWhat it covers
Configuration & ProvidersStore types and how they are selected
UsageHow consumers use the library
  • HVC Services — uses this for tenant storage + recordings.
  • Api — media/file uploads go through this abstraction.
  • HVC Shared — the sibling shared library.

Released under the MIT License.