Innovayse.StorageManager
2.0.8
dotnet add package Innovayse.StorageManager --version 2.0.8
NuGet\Install-Package Innovayse.StorageManager -Version 2.0.8
<PackageReference Include="Innovayse.StorageManager" Version="2.0.8" />
<PackageVersion Include="Innovayse.StorageManager" Version="2.0.8" />
<PackageReference Include="Innovayse.StorageManager" />
paket add Innovayse.StorageManager --version 2.0.8
#r "nuget: Innovayse.StorageManager, 2.0.8"
#:package Innovayse.StorageManager@2.0.8
#addin nuget:?package=Innovayse.StorageManager&version=2.0.8
#tool nuget:?package=Innovayse.StorageManager&version=2.0.8
StorageManager
A comprehensive .NET storage management solution with support for multiple storage providers, encryption, compression, and caching. Everything you need in one complete package.
๐ Quick Start
Installation
Install the complete StorageManager package:
dotnet add package Innovayse.StorageManager
Basic Usage
Console Application
using StorageManager.Core.Interfaces;
using StorageManager.Services;
using StorageManager.Providers.Local;
// Configure local storage
var options = new LocalStorageDriverOptions
{
RootPath = @"C:\MyStorage",
IsReadOnly = false
};
// Create storage manager
var storageManager = new DefaultStorageManager();
storageManager.RegisterDriver("local", new LocalStorageDriver(options));
await storageManager.SwitchDriverAsync("local");
// Use storage
await storageManager.UploadAsync("test.txt", "Hello World!"u8.ToArray());
var content = await storageManager.GetAsync("test.txt");
var files = await storageManager.ListAsync("/");
ASP.NET Core Application
using StorageManager.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Add StorageManager with all components
builder.Services.AddStorageManagerMinimal();
// Configure local storage
builder.Services.Configure<LocalStorageDriverOptions>(options =>
{
options.RootPath = @"C:\Storage";
options.IsReadOnly = false;
});
var app = builder.Build();
// Use in endpoints
app.MapPost("/upload", async (IFormFile file, IStorageManager storageManager) =>
{
using var stream = file.OpenReadStream();
var result = await storageManager.PutAsync(file.FileName, stream);
return Results.Ok(new { Path = result.Path, Size = result.Size });
});
app.MapGet("/files", async (IStorageManager storageManager) =>
{
var files = await storageManager.ListAsync("/");
return Results.Ok(files);
});
app.Run();
๐ฆ What's Included
Innovayse.StorageManager contains all components in one package:
Component | Description |
---|---|
๐๏ธ Core | Interfaces, models, enums, and base functionality |
โ๏ธ Services | Storage manager implementation and core services |
๐ Providers | All storage drivers (Local, Cloud, Database, Memory) |
๐ง Extensions | ASP.NET Core integration and dependency injection |
๐ Configuration | Settings, validation, and configuration models |
๐ ๏ธ Utilities | Helper classes and utility functions |
๐ Key Features
๐ Storage Providers
- Local File System - Fast local storage
- AWS S3 - Amazon Simple Storage Service
- Azure Blob Storage - Microsoft Azure cloud storage
- Google Cloud Storage - Google Cloud Platform storage
- SFTP - Secure File Transfer Protocol
- Database Storage - SQL Server, PostgreSQL, MySQL
- Redis - In-memory data structure store
- Memory - In-memory storage for testing
๐ Security
- AES-256 Encryption - Industry-standard encryption
- Configurable Keys - Custom encryption keys
- Secure Dependencies - No known vulnerabilities
โก Performance
- GZip Compression - Reduce storage space
- Intelligent Caching - Configurable caching strategies
- Async/Await Support - Non-blocking operations
- Streaming - Memory-efficient large file handling
- Batch Operations - Process multiple files efficiently
๐ Monitoring
- Health Checks - Built-in storage health monitoring
- Prometheus Metrics - Comprehensive metrics collection
- Logging - Structured logging with Microsoft.Extensions.Logging
- Performance Tracking - Operation timing and statistics
๐ง Integration
- ASP.NET Core Ready - Built-in dependency injection
- Configuration Support - appsettings.json integration
- Validation - Input validation and error handling
- Extensible - Easy to add custom providers
๐ Documentation
Getting Started
- Installation Guide - Detailed setup instructions
- Configuration - Provider configuration options
- Examples - Console and Web API examples
API Reference
- Core API - Complete API documentation
- Providers - Storage provider details
- Extensions - ASP.NET Core integration
Advanced Topics
- Architecture - System design and patterns
- Security - Security features and best practices
- Performance - Optimization guidelines
- Health Checks - Monitoring setup
Development
- Contributing - Development guidelines
- Docker - Containerization setup
- Testing - Testing strategies
๐ ๏ธ Advanced Usage
Encryption Example
// Store encrypted content
await storageManager.PutEncryptedAsync(
"sensitive-data.txt",
contentStream,
"my-secret-key"
);
// Retrieve and decrypt
var decryptedStream = await storageManager.GetDecryptedAsync(
"sensitive-data.txt",
"my-secret-key"
);
Compression Example
// Store compressed content
await storageManager.PutCompressedAsync(
"large-file.json",
contentStream,
compressionLevel: 6
);
// Retrieve and decompress
var decompressedStream = await storageManager.GetDecompressedAsync(
"large-file.json"
);
Multiple Providers
// Register multiple providers
storageManager.RegisterDriver("local", new LocalStorageDriver(localOptions));
storageManager.RegisterDriver("s3", new S3StorageDriver(s3Options));
storageManager.RegisterDriver("azure", new AzureBlobStorageDriver(azureOptions));
// Switch between providers
await storageManager.SwitchDriverAsync("s3");
await storageManager.UploadAsync("file.txt", content); // Saves to S3
await storageManager.SwitchDriverAsync("azure");
await storageManager.UploadAsync("file.txt", content); // Saves to Azure
Health Checks
// Check storage health
var healthStatus = await storageManager.HealthCheckAsync();
foreach (var (driver, isHealthy) in healthStatus)
{
Console.WriteLine($"{driver}: {(isHealthy ? "Healthy" : "Unhealthy")}");
}
// Get detailed statistics
var stats = await storageManager.GetStatisticsAsync();
Console.WriteLine($"Total files: {stats.TotalFiles}");
Console.WriteLine($"Total size: {stats.TotalSize} bytes");
๐ง Configuration
appsettings.json
{
"StorageManager": {
"DefaultDriver": "local",
"EnableCaching": true,
"CacheExpiration": "00:30:00",
"Drivers": {
"local": {
"Type": "Local",
"RootPath": "C:\\Storage",
"IsReadOnly": false
},
"s3": {
"Type": "S3",
"AccessKey": "your-access-key",
"SecretKey": "your-secret-key",
"BucketName": "your-bucket",
"Region": "us-west-2"
},
"azure": {
"Type": "AzureBlob",
"ConnectionString": "your-connection-string",
"ContainerName": "your-container"
}
}
}
}
Startup Configuration
// Configure from appsettings.json
builder.Services.Configure<StorageManagerConfiguration>(
builder.Configuration.GetSection("StorageManager")
);
// Add StorageManager
builder.Services.AddStorageManagerComplete();
// Or minimal setup
builder.Services.AddStorageManagerMinimal();
๐ฏ Requirements
- .NET 9.0 or later
- Visual Studio 2022 / VS Code / JetBrains Rider
- Docker (optional, for development environment)
๐ Project Status
โ Production Ready - Complete implementation with full testing
- โ All Core Features - Storage drivers, encryption, compression, caching
- โ Complete Testing - 222 tests passing across all providers
- โ All Storage Providers - Local, Cloud (AWS, Azure, Google), Database, Redis, SFTP, Memory
- โ Security Validated - No known vulnerabilities, secure dependencies
- โ Performance Optimized - Async operations, streaming, compression
- โ Production Deployments - Docker support, health checks, monitoring
- โ Comprehensive Documentation - API docs, examples, guides
๐๏ธ Project Structure
StorageManager/
โโโ ๐ docs/ # Complete documentation
โโโ ๐ป src/ # Source code
โ โโโ StorageManager/ # ๐ฆ Complete package (this)
โ โโโ StorageManager.Core/ # Core interfaces and models
โ โโโ StorageManager.Services/# Implementation services
โ โโโ StorageManager.Providers/ # Storage drivers
โ โโโ StorageManager.Extensions/ # ASP.NET Core integration
โ โโโ StorageManager.Configuration/ # Configuration models
โ โโโ StorageManager.Utilities/ # Helper utilities
โโโ ๐ฑ examples/ # Usage examples
โโโ ๐งช tests/ # Unit and integration tests
โโโ ๐ deployment/ # Docker configurations
โโโ ๐ ๏ธ tools/ # Development tools
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for:
- Development Setup - Local environment configuration
- Coding Standards - Code style and quality guidelines
- Pull Request Process - How to submit changes
- Issue Reporting - Bug reports and feature requests
๐ฅ Contributors
We thank all contributors who have helped make StorageManager better:
๐ Core Team
- Edgar Poghosyan - Project Creator & Lead Developer
- Hakob Vardanyan - Core Developer & Architecture
๐ How to Contribute
We welcome contributions of all kinds! Here are some ways you can help:
- ๐ Report Bugs - Found an issue? Let us know!
- ๐ก Suggest Features - Have an idea? Share it with us!
- ๐ Improve Documentation - Help make our docs better
- ๐งช Write Tests - Increase our test coverage
- ๐ง Submit Code - Fix bugs or add new features
See our Contributing Guide for detailed instructions.
๐ Performance
Benchmarks
Operation | Local | S3 | Azure | Memory |
---|---|---|---|---|
Upload (1MB) | ~5ms | ~150ms | ~120ms | ~1ms |
Download (1MB) | ~3ms | ~100ms | ~90ms | ~0.5ms |
List (1000 files) | ~10ms | ~200ms | ~180ms | ~2ms |
Optimizations
- Async Operations - Non-blocking I/O
- Streaming - Memory-efficient for large files
- Compression - Up to 70% size reduction
- Caching - Configurable cache strategies
- Connection Pooling - Efficient resource usage
๐ Links
- ๐ฆ NuGet Package: https://www.nuget.org/packages/Innovayse.StorageManager
- ๐ GitHub Repository: https://github.com/edgar2031/Storage-Manager
- ๐ Documentation: docs/
- ๐ก Examples: examples/
- ๐งช Tests: tests/
- ๐ Issues: https://github.com/edgar2031/Storage-Manager/issues
- ๐ฌ Discussions: https://github.com/edgar2031/Storage-Manager/discussions
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ก Need Help?
- ๐ Check the documentation
- ๐ป Browse examples
- ๐ Report issues
- ๐ฌ Start discussions
Built with โค๏ธ by Edgar Poghosyan and Hakob Vardanyan
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Innovayse.StorageManager.Configuration (>= 2.0.0)
- Innovayse.StorageManager.Core (>= 2.0.0)
- Innovayse.StorageManager.Extensions (>= 2.0.0)
- Innovayse.StorageManager.Providers (>= 2.0.0)
- Innovayse.StorageManager.Services (>= 2.0.0)
- Innovayse.StorageManager.Utilities (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
2.0.8 | 121 | 9/11/2025 |
Complete documentation overhaul with comprehensive guides, API reference, and examples. Updated for .NET 9 with all storage providers, security features, and performance optimizations. Includes Getting Started guide, API documentation, configuration examples, and troubleshooting guides.