APS Modular Structure
Modular organization of the APS platform: breakdown into functional modules, dependencies and responsibilities.
Overviewβ
The APS architecture is organized into distinct modules grouped by functional domain. This modular organization provides several advantages:
- Separation of responsibilities: Each module has a clear functional scope
- Reusability: Modules can be used in different contexts (Web, Studio, Agents)
- Maintainability: Isolated modifications without global impact
- Testability: Targeted unit tests per module
Main Modulesβ
Kernelβ
Namespace: Avanteam.Kernel.*
Folder: /Kernel/
The Kernel constitutes the technical foundation of the application. It contains no business logic and provides cross-cutting services used by all other modules.
Sub-modules:
Kernel: Kernel core (configuration, logging, mail)Kernel.DependencyInjection: Dependency injection infrastructureKernel.Configuration: Configuration reading and managementKernel.Data: Data access abstractionKernel.Parameters: Application parameters managementKernel.AspNetCore: Extensions for ASP.NET CoreKernel.Web: Extensions for ASP.NET FrameworkKernel.Office: Office integration (Word, Excel)Kernel.MicrosoftGraph: Microsoft Graph integration
Dependencies: None (base module)
Responsibilities:
- Centralized configuration (.ini files, appsettings.json)
- Logging (NLog)
- Email sending
- Database abstraction
- Background services (background tasks)
Directoryβ
Namespace: Avanteam.Directory.*
Folder: /Directory/
The Directory module manages everything related to directory, users and authentication.
Sub-modules:
Directory: Directory module coreDirectory.Api: Module public APIDirectory.Identity: Identity model (users, roles, resources)Directory.Authentication: Authentication mechanismsDirectory.Authentication.AspNetCore: ASP.NET Core authenticationDirectory.Authentication.Cookies: Cookie authenticationDirectory.Authentication.Saml2: SAML authentication
Directory.Authorization: Authorization managementDirectory.Synchronization: Active Directory / LDAP synchronizationDirectory.Repository: Directory data accessDirectory.Web: Web extensions for directoryDirectory.UI: UI components for directory
Dependencies: Kernel
Responsibilities:
- User, group, resource management
- Authentication (Forms, Windows, SAML, OAuth)
- Authorization and security policies
- Synchronization with external directories (AD, LDAP)
- Delegation management
Applicationβ
Namespace: Avanteam.Application.*
Folder: /Application/
The Application module contains the core business logic of the platform.
Sub-modules:
Application: Application module coreApplication.Api: Module public APIApplication.Agents: Agent system (scheduled tasks)Application.Archives: Archive managementApplication.Log: Business loggingApplication.Modules: Specific business modulesApplication.Repository: Business data accessApplication.Repository.EFCore: Entity Framework Core implementationApplication.Repository.EFCore.SqlServer: SQL Server providerApplication.Repository.EFCore.Oracle: Oracle provider
Application.Web: Web extensionsApplication.WebControls: Reusable web controls
Dependencies: Kernel, Directory
Responsibilities:
- Document and metadata management
- Form and schema management
- View and query management
- Agents and scheduled tasks
- Document archiving
- Business logs and audit
ApplicationPoolβ
Namespace: Avanteam.Application.Pool.*
Folder: /ApplicationPool/
The ApplicationPool module manages the application pool concept and multi-tenancy.
Sub-modules:
ApplicationPool: Pool coreApplicationPool.Api: Pool APIApplicationPool.Repository: Pool data access
Dependencies: Kernel, Directory, Application
Responsibilities:
- Application profile management
- Multi-tenant configuration
- Data isolation per application
Workflowβ
Namespace: Avanteam.Workflow.*
Folder: /Workflow/
The Workflow module provides the platform's workflow engine.
Sub-modules:
Workflow: Workflow engine coreWorkflow.ComponentModel: Workflow component modelWorkflow.Runtime: Workflow executionWorkflow.DataSource: Workflow data access
Dependencies: Kernel, Directory, Documents
Responsibilities:
- Business process definition
- Workflow instance execution
- State and transition management
- Automatic actions and notifications
Formularsβ
Namespace: Avanteam.Formulars.*
Folder: /Formulars/
The Formulars module manages form design and rendering.
Sub-modules:
Formulars: Forms coreFormulars.Designer: Form editorFormulars.Schema: Form schemasFormulars.UI: Form UI rendering
Dependencies: Kernel, Application
Responsibilities:
- Form schema definition
- Dynamic form rendering
- Data validation
- Custom field types
Viewsβ
Namespace: Avanteam.Views.*
Folder: /Views/
The Views module manages tabular data display and queries.
Dependencies: Kernel, Application
Responsibilities:
- SQL/Entity query execution
- Data filtering and sorting
- Export to Excel/CSV
- User-customized views
Documentsβ
Namespace: Avanteam.Documents.*
Folder: /Documents/
The Documents module manages documents and attachments.
Dependencies: Kernel
Responsibilities:
- File storage
- Version management
- PDF conversion
- Check-in/Check-out
Studioβ
Namespace: Avanteam.Studio.*
Folder: /Studio/
The Studio module contains the desktop configuration tool (WinForms).
Sub-modules:
Studio.Main: Main applicationStudio.Core: Studio coreStudio.Security: Studio securityStudio.Modules.*: Configuration modulesStudio.Modules.Formulars: Form configurationStudio.Modules.Parameters: Parameter configurationStudio.Modules.Views: View configurationStudio.Modules.Workflow: Workflow configuration
Dependencies: Kernel, Directory, Application, all business modules
Responsibilities:
- Form modeling
- Workflow editing
- View configuration
- Application parameter management
Webβ
Namespace: Avanteam.Web.*
Folder: /Web/
The Web module contains the web applications.
Sub-modules:
Web.Model: Main web application (ASP.NET Framework 4.8)Web.Root: New application (ASP.NET Core - in development)
Dependencies: All modules
Responsibilities:
- Web user interface
- REST API
- SignalR (real-time)
- Session management
Additional Modulesβ
Localisation: Multilingual management
Remoting: Inter-process communication
Reporting: Report generation
Search: Full-text search
SharePoint: SharePoint integration
Exchange: Exchange integration
GraphBuilder: Visual graph construction
Navigators: Visual navigation
Project Organizationβ
Each module follows a standardized structure:
Module/
βββ Abstractions/ # Interfaces and abstractions
βββ Api/ # Module public API
βββ DependencyInjection/ # DI configuration
βββ Repository/ # Data access
βββ Src/ # Main implementation
βββ UnitTests/ # Unit tests
βββ Web/ # Web extensions (if applicable)
Naming Patternβ
- Project:
{Module}.{SubModule} - Namespace:
Avanteam.{Module}.{SubModule} - Assembly:
Avanteam.{Module}.{SubModule}.dll
Example: Application.Repository.EFCore.SqlServer
Dependency Graphβ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Studio β
β (Configuration) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββββββββββ
β Web.Model β
β (Web Application) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β β β
βββββββββΌβββββ ββββΌβββββββββ ββΌβββββββββββββββ
β Workflow β βApplicationβ βApplicationPoolβ
ββββββββ¬ββββββ ββββ¬βββββββββ ββ¬βββββββββββββββ
β β β
ββββββββ¬ββββ΄βββββββββββββ
β
ββββββββΌβββββββ
β Directory β
ββββββββ¬βββββββ
β
ββββββββΌβββββββ
β Kernel β
βββββββββββββββ
Versioning Strategyβ
- All projects share the same version number
- Version defined in
Directory.Build.propsat the root - Format:
{Year}.{Month}.{Build}.{Revision} - Example:
2023.1.0.0
<PropertyGroup>
<Version Condition="'$(VERSION)' == ''">1.0.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</PropertyGroup>
Dependency Managementβ
Internal Dependenciesβ
Dependencies between APS modules are done via ProjectReference:
<ItemGroup>
<ProjectReference Include="..\..\Kernel\Src\Kernel.csproj" />
<ProjectReference Include="..\..\Directory\Src\Directory.csproj" />
</ItemGroup>
External Dependenciesβ
External NuGet packages are centralized and managed consistently:
- Entity Framework Core
- AutoMapper
- NLog
- DevExpress (UI components)
- Microsoft.Extensions.*
Dependency Rulesβ
- Kernel depends on nothing: Autonomous base module
- No circular dependencies: Acyclic graph
- Separated abstractions: Interfaces in
*.Abstractionsmodules - Isolated public API: Contracts in
*.Apimodules
Extension and Customizationβ
Plugin Systemβ
The architecture supports extension via the AddStartupExtensions system:
apsAppBuilder.AddStartupExtensions("MyModule");
This method automatically searches for and executes all classes implementing IStartupExtension in the module's assemblies.
Custom Modulesβ
To create a custom module:
- Create the standard folder structure
- Implement a
Startupclass with extension method - Register services via
IServiceCollection - Reference dependent modules
- Call the extension method in the entry point
Compilation and Buildβ
Global Configurationβ
The Directory.Build.props file at the root defines common parameters:
- Target Framework (.NET Framework 4.8)
- Output paths (Build/Debug or Build/Release)
- Warnings and code analysis
- Assembly metadata
Build Scriptsβ
- npm scripts: Frontend compilation (webpack, gulp)
- MSBuild: .NET compilation
- Publish: Publishing to IIS server
Best Practicesβ
Code Organizationβ
- One file per class
- Namespaces consistent with folder structure
- Interfaces in
Abstractionsprojects - Implementation in
Srcprojects
Service Registrationβ
Each module exposes a fluent extension method:
public static IApsAppBuilder AddMyModule(
this IApsAppBuilder builder)
{
AddServices(builder.Services);
return builder.AddStartupExtensions("MyModule");
}
Unit Testsβ
Each module has its corresponding UnitTests project with the same structure.