A flexible and extensible form builder package that supports dynamic form creation, validation, and submission handling.
$ dotnet add package DynamicFormBuilder.DomainA flexible and powerful .NET 9 package for building dynamic forms with rich validation and customization options.
The solution follows Clean Architecture principles with the following projects:
git clone https://github.com/yourusername/form-builder-package.git
cd form-builder-package
dotnet restore
appsettings.json:{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=FormBuilder;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
cd DynamicFormBuilder.Api
dotnet ef database update
<PackageReference Include="DynamicFormBuilder.Core" Version="1.0.0" />
<PackageReference Include="DynamicFormBuilder.EntityFrameworkCore" Version="1.0.0" />
Program.cs:services.AddDynamicFormBuilder(options => {
options.UseConnectionString("DefaultConnection");
options.UsePermissions(PermissionScheme.Simple);
});
<PackageReference Include="DynamicFormBuilder.UI" Version="1.0.0" />
<DynamicFormDesigner FormId="@formId" />
<DynamicFormRenderer FormId="@formId" />
The API is documented using Swagger/OpenAPI. When running in development mode, access the Swagger UI at:
https://localhost:5001/swagger
The solution includes comprehensive tests:
dotnet test
Includes:
This project is licensed under the MIT License - see the LICENSE file for details.