# havit/havitframework architecture

> Architecture diagram of the GitHub repository havit/havitframework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/havit/havitframework
- Repository: https://github.com/havit/havitframework

## Overview

This repository is a collection of Havit .NET libraries rather than one end-user application. The sampled runtime behavior centers on file storage: callers use a common API whose base class handles shared operations and encryption, with filesystem, Azure Files, and SFTP implementations. Separate branches provide MVC message storage/rendering, a WebForms messenger, and an EF Core repository-query contract. The README is empty, and only some source was sampled, so unsampled providers and integrations are included only where the tree supports them; uncertain relationships are omitted.

Main entry points: [`Havit.Services/FileStorage/FileStorageServiceBase.cs`](https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/FileStorageServiceBase.cs) (Shared operations), [`Havit.Services/FileStorage/IFileStorageService.cs`](https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/IFileStorageService.cs) (Storage API), [`Havit.Services.Azure/FileStorage/AzureFileStorageService.cs`](https://github.com/havit/havitframework/blob/master/Havit.Services.Azure/FileStorage/AzureFileStorageService.cs) (Azure Files store), [`Havit.Services.Sftp/FileStorage/SftpStorageService.cs`](https://github.com/havit/havitframework/blob/master/Havit.Services.Sftp/FileStorage/SftpStorageService.cs) (SFTP store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storage["File storage"]
  node_storage_api["Storage API"]
  node_storage_base["Shared operations"]
  node_encryption_options["Encryption options"]
  node_file_info["File metadata<br/>[FileInfo.cs]"]
  node_filesystem["Filesystem store"]
  node_azure_files["Azure Files store"]
  node_sftp["SFTP store"]
end

subgraph group_mvc["MVC messaging"]
  node_mvc_message["MVC message<br/>[Message.cs]"]
  node_session_storage["Session storage"]
end

subgraph group_webforms["WebForms messaging"]
  node_web_messenger["WebForms messenger<br/>[Messenger.cs]"]
end

subgraph group_efcore["EF Core patterns"]
  node_query_provider["Query provider contract"]
end

node_caller(("Storage caller"))
node_azure_service[("Azure Files")]
node_sftp_service[("SFTP server")]

node_caller -->|"uses"| node_storage_api
node_storage_base -->|"implements"| node_storage_api
node_storage_base -->|"uses"| node_encryption_options
node_storage_base -->|"copies through"| node_storage_api
node_azure_files -->|"extends"| node_storage_base
node_azure_files -->|"stores files"| node_azure_service
node_sftp -->|"extends"| node_storage_base
node_sftp -->|"stores files"| node_sftp_service
node_session_storage -->|"stores"| node_mvc_message
node_web_messenger -.->|"collects messages for"| node_caller

click node_storage_api "https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/IFileStorageService.cs"
click node_storage_base "https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/FileStorageServiceBase.cs"
click node_encryption_options "https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/EncryptionOptions.cs"
click node_file_info "https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/FileInfo.cs"
click node_filesystem "https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/FileSystemStorageService.cs"
click node_azure_files "https://github.com/havit/havitframework/blob/master/Havit.Services.Azure/FileStorage/AzureFileStorageService.cs"
click node_sftp "https://github.com/havit/havitframework/blob/master/Havit.Services.Sftp/FileStorage/SftpStorageService.cs"
click node_mvc_message "https://github.com/havit/havitframework/blob/master/Havit.AspNet.Mvc/Messenger/Message.cs"
click node_session_storage "https://github.com/havit/havitframework/blob/master/Havit.AspNet.Mvc/Messenger/Storages/SessionMessageStorage.cs"
click node_web_messenger "https://github.com/havit/havitframework/blob/master/Havit.Web/UI/WebControls/Messenger.cs"
click node_query_provider "https://github.com/havit/havitframework/blob/master/Havit.Data.EntityFrameworkCore.Patterns/Repositories/IRepositoryQueryProvider.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_storage_api,node_storage_base,node_encryption_options,node_file_info,node_filesystem,node_azure_files,node_sftp toneBlue
class node_mvc_message,node_session_storage,node_caller,node_azure_service,node_sftp_service toneAmber
class node_web_messenger toneMint
class node_query_provider toneRose
```

## Components

### File storage

- [Storage API](https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/IFileStorageService.cs): `Havit.Services/FileStorage/IFileStorageService.cs`
- [Shared operations](https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/FileStorageServiceBase.cs): `Havit.Services/FileStorage/FileStorageServiceBase.cs`
- [Encryption options](https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/EncryptionOptions.cs): `Havit.Services/FileStorage/EncryptionOptions.cs`
- [File metadata](https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/FileInfo.cs): `Havit.Services/FileStorage/FileInfo.cs`
- [Filesystem store](https://github.com/havit/havitframework/blob/master/Havit.Services/FileStorage/FileSystemStorageService.cs): `Havit.Services/FileStorage/FileSystemStorageService.cs`
- [Azure Files store](https://github.com/havit/havitframework/blob/master/Havit.Services.Azure/FileStorage/AzureFileStorageService.cs): `Havit.Services.Azure/FileStorage/AzureFileStorageService.cs`
- [SFTP store](https://github.com/havit/havitframework/blob/master/Havit.Services.Sftp/FileStorage/SftpStorageService.cs): `Havit.Services.Sftp/FileStorage/SftpStorageService.cs`

### MVC messaging

- [MVC message](https://github.com/havit/havitframework/blob/master/Havit.AspNet.Mvc/Messenger/Message.cs): `Havit.AspNet.Mvc/Messenger/Message.cs`
- [Session storage](https://github.com/havit/havitframework/blob/master/Havit.AspNet.Mvc/Messenger/Storages/SessionMessageStorage.cs): `Havit.AspNet.Mvc/Messenger/Storages/SessionMessageStorage.cs`

### WebForms messaging

- [WebForms messenger](https://github.com/havit/havitframework/blob/master/Havit.Web/UI/WebControls/Messenger.cs): `Havit.Web/UI/WebControls/Messenger.cs`

### EF Core patterns

- [Query provider contract](https://github.com/havit/havitframework/blob/master/Havit.Data.EntityFrameworkCore.Patterns/Repositories/IRepositoryQueryProvider.cs): `Havit.Data.EntityFrameworkCore.Patterns/Repositories/IRepositoryQueryProvider.cs`

### Other components

- **Storage caller**
- **Azure Files**
- **SFTP server**

## Connections

- Storage caller → Storage API: uses (evidence: `Havit.Services/FileStorage/IFileStorageService.cs`)
- Shared operations → Storage API: implements (evidence: `Havit.Services/FileStorage/FileStorageServiceBase.cs`)
- Shared operations → Encryption options: uses (evidence: `Havit.Services/FileStorage/FileStorageServiceBase.cs`)
- Shared operations → Storage API: copies through (evidence: `Havit.Services/FileStorage/FileStorageServiceBase.cs`)
- Azure Files store → Shared operations: extends (evidence: `Havit.Services.Azure/FileStorage/AzureFileStorageService.cs`)
- Azure Files store → Azure Files: stores files (evidence: `Havit.Services.Azure/FileStorage/AzureFileStorageService.cs`)
- SFTP store → Shared operations: extends (evidence: `Havit.Services.Sftp/FileStorage/SftpStorageService.cs`)
- SFTP store → SFTP server: stores files (evidence: `Havit.Services.Sftp/FileStorage/SftpStorageService.cs`)
- Session storage → MVC message: stores (evidence: `Havit.AspNet.Mvc/Messenger/Storages/SessionMessageStorage.cs`)
- WebForms messenger → Storage caller: collects messages for
