Synergy.Admin 1.1.3

dotnet add package Synergy.Admin --version 1.1.3
                    
NuGet\Install-Package Synergy.Admin -Version 1.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Synergy.Admin" Version="1.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Synergy.Admin" Version="1.1.3" />
                    
Directory.Packages.props
<PackageReference Include="Synergy.Admin" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Synergy.Admin --version 1.1.3
                    
#r "nuget: Synergy.Admin, 1.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Synergy.Admin@1.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Synergy.Admin&version=1.1.3
                    
Install as a Cake Addin
#tool nuget:?package=Synergy.Admin&version=1.1.3
                    
Install as a Cake Tool

Synergy.Admin

A lightweight .NET library for Admin management (Modules, Menus, and Pages) using DDD, Event Sourcing with Marten DB, and Kafka messaging.

Features

  • Module Management: Create, update, delete, and query modules
  • Menu Management: Create, update, delete, and query menus with module associations
  • Page Management: Create, update, delete, and query pages
  • Event Sourcing: Full event sourcing with Marten DB
  • Kafka Integration: Optional Kafka messaging for distributed systems
  • Auto-Configuration: Zero changes required to your Program.cs

Installation

dotnet add package Synergy.Admin

Configuration

The package automatically configures itself using your project's appsettings.json. No changes to Program.cs are required!

Required Configuration

Add the following to your appsettings.json:

{
  "ConnectionStrings": {
    "DefaultConnection": "Host=localhost;Port=5432;Database=mydb;Username=postgres;Password=yourpassword"
  },
  "Kafka": {
    "BootstrapServers": "localhost:9092"
  }
}

Optional: Extended Configuration

For more control, you can use the SynergyAdmin section:

{
  "SynergyAdmin": {
    "ConnectionString": "Host=localhost;Port=5432;Database=mydb;Username=postgres;Password=yourpassword",
    "EnableKafka": true,
    "Kafka": {
      "BootstrapServers": "localhost:9092"
    },
    "EnableKeycloak": false,
    "Keycloak": {
      "BaseUrl": "https://your-keycloak-server/",
      "Realm": "your-realm",
      "ClientId": "your-client-id",
      "ClientSecret": "your-client-secret"
    }
  }
}

Configuration Options

Option Description Default
ConnectionString PostgreSQL connection string Falls back to ConnectionStrings:DefaultConnection
EnableKafka Enable/disable Kafka messaging true
Kafka:BootstrapServers Kafka server address Falls back to Kafka:BootstrapServers
EnableKeycloak Enable/disable Keycloak authentication false

How It Works

The package uses ASP.NET Core's IHostingStartup feature to automatically configure services when your application starts. This means:

  1. ✅ Your appsettings.json configuration is used
  2. ✅ No modifications to Program.cs required
  3. ✅ Controllers are automatically registered
  4. ✅ MediatR handlers are automatically discovered
  5. ✅ Marten DB projections are configured
  6. ✅ Kafka producers/consumers are set up (if enabled)

API Endpoints

Once installed, the following endpoints are available:

Modules

  • POST /api/Module/Create - Create a new module
  • PUT /api/Module/Update - Update an existing module
  • DELETE /api/Module/Delete - Delete a module
  • GET /api/Module/GetSingle - Get a single module by ID
  • GET /api/Module/GetList - Get list of modules
  • POST /api/Menu/Create - Create a new menu
  • PUT /api/Menu/Update - Update an existing menu
  • DELETE /api/Menu/Delete - Delete a menu
  • GET /api/Menu/GetSingle - Get a single menu by ID
  • GET /api/Menu/GetList - Get list of menus

Pages

  • POST /api/Pages/Create - Create a new page
  • PUT /api/Pages/Update - Update an existing page
  • DELETE /api/Pages/Delete - Delete a page
  • GET /api/Pages/GetSingle - Get a single page by ID
  • GET /api/Pages/GetList - Get list of pages

Manual Configuration (Optional)

If you prefer to manually configure the services (instead of auto-configuration), you can disable the hosting startup and call the extension method directly:

1. Disable Auto-Configuration

Set the environment variable:

ASPNETCORE_PREVENTHOSTINGSTARTUP=true

Or in launchSettings.json:

{
  "profiles": {
    "YourProject": {
      "environmentVariables": {
        "ASPNETCORE_PREVENTHOSTINGSTARTUP": "true"
      }
    }
  }
}

2. Manual Setup in Program.cs

using Synergy.Admin.Infrastructure.Configuration;

var builder = WebApplication.CreateBuilder(args);

// Add Synergy Admin services manually
builder.Services.AddSynergyAdmin(builder.Configuration);

// ... rest of your configuration

Requirements

  • .NET 8.0 or later
  • PostgreSQL database
  • Kafka (optional, for messaging)

Dependencies

  • Marten (Event Sourcing & Document DB)
  • MassTransit (Messaging)
  • MediatR (CQRS)
  • FluentValidation
  • Serilog (Logging)

License

Copyright © 2025 Synergy Team

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.3 275 12/14/2025
1.1.2 123 12/12/2025
1.1.1 441 12/10/2025
1.1.0 427 12/10/2025
1.0.9 434 12/10/2025
1.0.8 429 12/10/2025
1.0.7 358 12/8/2025
1.0.6 347 12/8/2025
1.0.5 297 12/7/2025
1.0.4 220 12/7/2025
1.0.3 111 12/6/2025
1.0.2 111 12/6/2025
1.0.1 115 12/6/2025
1.0.0 122 12/6/2025