PosInformatique.Foundations is a collection of small, focused .NET libraries that provide simple, reusable building blocks for your applications.
The goal is to avoid shipping a monolithic framework by creating modular NuGet packages, each addressing a single responsibility.
- Granular: each library is independent, lightweight, and minimal.
- Composable: you bring exactly the pieces you need, nothing more.
- Practical: packages can be foundational (value objects, abstractions, contracts) or technical utilities (helpers, validation rules, extensions).
- Consistent: all packages follow the same naming convention and version alignment.
- Standards-based: whenever possible, implementations follow well-known standards (e.g. RFC 5322 for email addresses, E.164 for phone numbers,...).
➡️ Each package has no strong dependency on another. You are free to pick only what you need.
➡️ These libraries are not structuring frameworks; they are small utilities meant to fill missing gaps in your applications.
You can install any package using the .NET CLI or NuGet Package Manager.
| Package | Description | NuGet | |
|---|---|---|---|
| PosInformatique.Foundations.EmailAddresses | Strongly-typed value object representing an email address with validation and normalization as RFC 5322 compliant. | ||
| PosInformatique.Foundations.EmailAddresses.EntityFramework | Entity Framework Core integration for the EmailAddress value object, including property configuration and value converter for seamless database persistence. |
||
| PosInformatique.Foundations.EmailAddresses.FluentValidation | FluentValidation integration for the EmailAddress value object, providing dedicated validators and rules to ensure RFC 5322 compliant email addresses. |
||
| PosInformatique.Foundations.EmailAddresses.Json | System.Text.Json converter for the EmailAddress value object, enabling seamless serialization and deserialization of RFC 5322 compliant email addresses. |
||
| PosInformatique.Foundations.Emailing | Template-based emailing infrastructure for .NET that lets you register strongly-typed email templates, create emails from models, and send them through pluggable providers. | ||
| PosInformatique.Foundations.Emailing.Azure | IEmailProvider implementation for PosInformatique.Foundations.Emailing using Azure Communication Service. |
||
| PosInformatique.Foundations.Emailing.Graph | IEmailProvider implementation for PosInformatique.Foundations.Emailing using Microsoft Graph API. |
||
| PosInformatique.Foundations.Emailing.Templates.Razor | Helpers to build EmailTemplate instances from Razor components for subject and HTML body, supporting strongly-typed models and reusable layouts. | ||
| PosInformatique.Foundations.MediaTypes | Immutable MimeType value object with well-known media types and helpers to map between media types and file extensions. |
||
| PosInformatique.Foundations.MediaTypes.EntityFramework | Entity Framework Core integration for the MimeType value object, including property configuration and value converter for seamless database persistence. |
||
| PosInformatique.Foundations.MediaTypes.Json | System.Text.Json converter for the MimeType value object, enabling seamless serialization and deserialization of MIME types within JSON documents. |
||
| PosInformatique.Foundations.People | Strongly-typed value objects for first and last names with validation and normalization. | ||
| PosInformatique.Foundations.People.DataAnnotations | DataAnnotations attributes for FirstName and LastName value objects. |
||
| PosInformatique.Foundations.People.EntityFramework | Entity Framework Core integration for FirstName and LastName value objects, providing fluent property configuration and value converters. |
||
| PosInformatique.Foundations.People.FluentAssertions | FluentAssertions extensions for FirstName and LastName to avoid ambiguity and provide Should().Be(string) assertions (case-sensitive on normalized values). |
||
| PosInformatique.Foundations.People.FluentValidation | FluentValidation extensions for FirstName and LastName value objects. |
||
| PosInformatique.Foundations.People.Json | System.Text.Json converters for FirstName and LastName, with validation and easy registration via AddPeopleConverters(). |
||
| PosInformatique.Foundations.PhoneNumbers | Strongly-typed value object representing a phone number in E.164 format, with parsing (including region-aware local numbers), validation, comparison, and formatting helpers. | ||
| PosInformatique.Foundations.PhoneNumbers.EntityFramework | Entity Framework Core integration for the PhoneNumber value object, mapping it to a SQL PhoneNumber column type backed by VARCHAR(16) using a dedicated value converter. |
||
| PosInformatique.Foundations.PhoneNumbers.FluentValidation | FluentValidation integration for the PhoneNumber value object, providing dedicated validators and rules to ensure E.164 compliant phone numbers. |
||
| PosInformatique.Foundations.PhoneNumbers.Json | System.Text.Json converter for the PhoneNumber value object, enabling seamless serialization and deserialization of E.164 compliant phone numbers. |
||
| PosInformatique.Foundations.Text.Templating | Abstractions for text templating, including the TextTemplate<TModel> base class and ITextTemplateRenderContext interface, to be used by concrete templating engine implementations such as Razor-based text templates. |
||
| PosInformatique.Foundations.Text.Templating.Razor | Razor-based text templating using Blazor components, allowing generation of text from Razor views with a strongly-typed Model parameter and full dependency injection integration. | ||
| PosInformatique.Foundations.Text.Templating.Scriban | Scriban-based text templating with mustache-style syntax, allowing generation of text from templates using a strongly-typed model and automatic property exposure. |
Note: Most of the packages are completely independent. You install only what you need.
- Avoid reinventing common value objects and utilities.
- Apply standards-based implementations (RFC, E.164, ...).
- Improve consistency across your projects.
- Get lightweight, modular libraries tailored to single responsibilities.
- Add missing building blocks to your projects without introducing a heavyweight framework.
All PosInformatique.Foundations packages are designed to be compatible with .NET 8.0, .NET 9.0 and .NET 10.0.
To maximize backward compatibility with existing projects, dependencies on external libraries (such as Microsoft.Graph, etc.)
intentionally target relatively old versions. This avoids forcing you to update your entire solution to the
latest versions used internally by PosInformatique.Foundations.
Important: It is the responsibility of the application developer to explicitly reference and update any transitive dependencies in their own project if they want to use newer versions. See NuGet dependency resolution and transitive dependencies in Visual Studio for more details.
The PosInformatique.Foundations.Emailing.Graph package depends on Microsoft.Graph 5.89.0 for backward compatibility with a wide range of existing projects.
If your application requires a newer version, you can simply add an explicit reference in your project, for example:
<ItemGroup>
<PackageReference Include="PosInformatique.Foundations.Emailing.Graph" Version="x.y.z" />
<PackageReference Include="Microsoft.Graph" Version="5.96.0" />
</ItemGroup>In this case, your project will use Microsoft.Graph 5.96.0 while still consuming PosInformatique.Foundations.Emailing.Graph. This is recommended, especially to benefit from the latest security updates and bug fixes of the underlying dependencies.
Licensed under the MIT License.