Egov.Fod.ServiceComponents
10.0.5
Prefix Reserved
dotnet add package Egov.Fod.ServiceComponents --version 10.0.5
NuGet\Install-Package Egov.Fod.ServiceComponents -Version 10.0.5
<PackageReference Include="Egov.Fod.ServiceComponents" Version="10.0.5" />
<PackageVersion Include="Egov.Fod.ServiceComponents" Version="10.0.5" />
<PackageReference Include="Egov.Fod.ServiceComponents" />
paket add Egov.Fod.ServiceComponents --version 10.0.5
#r "nuget: Egov.Fod.ServiceComponents, 10.0.5"
#:package Egov.Fod.ServiceComponents@10.0.5
#addin nuget:?package=Egov.Fod.ServiceComponents&version=10.0.5
#tool nuget:?package=Egov.Fod.ServiceComponents&version=10.0.5
Fod.ServiceComponents
Blazor component library for FOD public service request workflows. Provides reusable wizard orchestration, requestor/beneficiary data collection, apostillation, delivery, payment, and document attachment components.
Features
- Wizard orchestration — Step-based workflow engine with validation, save, and navigation
- Requestor & Beneficiary — Data collection components for natural/legal persons
- Apostillation — Country selection, pricing, date calculation, and availability checks with built-in caching
- Attachments — Document upload and management components
- Delivery & Reception — Delivery method selection and reception mode handling
- Payment — Payment integration components
- Confirmation — Order summary and confirmation step
- Error handling — Resilient error handler with privacy filtering, queuing, and tracking
- Localization — Built-in support for Romanian (
ro) and Russian (ru)
Installation
dotnet add package Egov.FOD.ServiceComponents
Or via the NuGet Package Manager:
Install-Package Egov.FOD.ServiceComponents
Static Assets Setup
When importing this library into another project, you must add the required static asset references to your app's host file (App.razor, _Host.cshtml, or index.html).
Add the following inside <head>:
<link rel="stylesheet" href="_content/Egov.Fod.ServiceComponents/Egov.Fod.ServiceComponents.bundle.scp.css" />
<link rel="stylesheet" href="_content/Egov.FOD.UIComponents/Egov.FOD.UIComponents.bundle.scp.css" />
Add the following before </body>:
<script src="_content/Egov.FOD.UIComponents/js/fod-file-upload.js"></script>
Note: The
government-logo.svgis served from_content/Egov.FOD.UIComponents/assets/logos/government-logo.svg. Make sureapp.UseStaticFiles()andapp.MapRazorComponents()(orapp.UseBlazorFrameworkFiles()) are configured in yourProgram.csso that static web assets from NuGet packages are served correctly.
Configuration
Register services in your Program.cs:
using Fod.ServiceComponents.Services;
builder.Services.AddApostillationServices();
builder.Services.AddMemoryCache();
Usage
Create a Wizard Step
public class RequestorStep : WizardStepBase
{
public override string StepId => "requestor";
public override string StepTitle => "Requestor Information";
public override async Task<ValidationResult> ValidateAsync()
{
var result = new ValidationResult();
if (string.IsNullOrEmpty(Model.Name))
result.AddError("Name", "Name is required");
return result;
}
public override async Task<SaveResult> SaveAsync()
{
return SaveResult.Successful(Model);
}
}
Configure Wizard Steps
var steps = new List<WizardStep>
{
new() { StepId = "requestor", Title = "Requestor", ComponentType = typeof(RequestorStep), Order = 1 },
new() { StepId = "beneficiary", Title = "Beneficiary", ComponentType = typeof(BeneficiaryStep), Order = 2 },
new() { StepId = "attachments", Title = "Documents", ComponentType = typeof(AttachmentsStep), Order = 3, IsOptional = true }
};
Use Cached Apostillation Service
// The CachedApostillationService wraps any IApostillationService with memory caching
builder.Services.AddSingleton<IApostillationService, CachedApostillationService>();
// Inject and use
@inject IApostillationService ApostillationService
var countries = await ApostillationService.GetCountriesAsync();
Key Interfaces
| Interface | Purpose |
|---|---|
IWizardStep |
Contract for wizard step components |
WizardStepBase |
Optional base class with common functionality |
ValidationResult |
Validation outcome with error collection |
SaveResult |
Save operation outcome with data/errors |
Project Structure
Fod.ServiceComponents/ # Main Razor class library
Fod.ServiceComponents.Tests/ # Unit tests (xUnit + bUnit + Moq)
Fod.Services/ # Service endpoints
Build & Test
# Restore
dotnet restore Fod.ServiceComponents.slnx
# Build
dotnet build Fod.ServiceComponents.slnx
# Run tests
dotnet test Fod.ServiceComponents.slnx
# Pack for NuGet
dotnet pack Fod.ServiceComponents/Fod.ServiceComponents.csproj -c Release
# Format code
dotnet format Fod.ServiceComponents.slnx
Requirements
- .NET 10
- Blazor
- Egov.Fod.ServiceModels
- Egov.FOD.UIComponents
Contributing
See CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License — see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Egov.Fod.ServiceModels (>= 10.0.2)
- Egov.FOD.UIComponents (>= 10.3.9)
- Microsoft.AspNetCore.Components.Authorization (>= 10.0.9)
- Microsoft.AspNetCore.Components.Web (>= 10.0.9)
- Microsoft.Extensions.Caching.Memory (>= 10.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.