BaseForge.Infrastructure
0.6.2-beta
See the version list below for details.
dotnet add package BaseForge.Infrastructure --version 0.6.2-beta
NuGet\Install-Package BaseForge.Infrastructure -Version 0.6.2-beta
<PackageReference Include="BaseForge.Infrastructure" Version="0.6.2-beta" />
<PackageVersion Include="BaseForge.Infrastructure" Version="0.6.2-beta" />
<PackageReference Include="BaseForge.Infrastructure" />
paket add BaseForge.Infrastructure --version 0.6.2-beta
#r "nuget: BaseForge.Infrastructure, 0.6.2-beta"
#:package BaseForge.Infrastructure@0.6.2-beta
#addin nuget:?package=BaseForge.Infrastructure&version=0.6.2-beta&prerelease
#tool nuget:?package=BaseForge.Infrastructure&version=0.6.2-beta&prerelease
BaseForge
Forge .NET microservices from a spec.
BaseForge is an opinionated base library and visual code generator for .NET 10 microservices. Describe your entities in YAML — or click them together in the browser-based Designer — and get clean, production-ready services with CQRS, authentication, gRPC, events, logging and Docker already wired.
📖 Documentation: https://dropdeart.github.io/BaseForge/ · 🇹🇷 Türkçe README
Why BaseForge?
Every microservice needs the same plumbing — layering, CQRS, repositories, audit fields, soft delete, error handling, auth, inter-service calls, messaging, logging, health checks, Docker files. BaseForge makes those decisions once, documents why, and ships them as:
- A library —
builder.Services.AddBaseForge(...)gives you all of it in one line. It's a library, not a framework: every behavior can be overridden. - A generator — the
baseforgeCLI and its Designer turn a spec into plain, readable C# (controllers, handlers, EF Core entities, DTOs, protos, Dockerfile) that you own.
Features
- 🎨 Visual Designer — entities, relations, access rules and Identity in the browser, with a live ER diagram; generate, build and run with one click
- 🧱 Clean Architecture + CQRS on MediatR, repositories, audit fields, soft delete
- 🗄️ EF Core 10 + Dapper — LINQ for writes, raw SQL for heavy reads, one shared connection
- 🔐 Central Identity (OpenIddict + ASP.NET Identity) — OAuth2/OIDC, social logins, roles, ownership rules, user profile fields
- 🔌 gRPC between services with generated protos, clients and servers
- 📨 RabbitMQ events with a transactional outbox, inbox idempotency and dead-letter queues
- 🔭 Observability — Serilog + Grafana Loki, correlation ids across HTTP → gRPC → RabbitMQ,
/healtheverywhere - 🏢 Multi-tenancy, append-only entities, enums, JSONB, list filters, YARP gateway
Quick start
# 1. Install the CLI
dotnet tool install -g BaseForge.CodeGen --prerelease
# 2. Open the Designer in a workspace folder
mkdir my-platform && cd my-platform
baseforge new orders
The Designer opens at http://localhost:3500. Add entities, press Generate + Build, then Run — your service is up at http://localhost:8080/scalar/v1.
Prefer YAML? Write a spec and generate from the terminal:
# orders.yaml
service: orders
database: orders_db
entities:
Order:
props:
Status: { type: enum, values: [Draft, Paid], default: Draft }
Total: decimal
BuyerId: guid
ownerField: BuyerId
access:
list: [Admin, owner]
publishes: [created]
baseforge new-service --spec orders.yaml
Using the library directly
dotnet add package BaseForge.API --prerelease
builder.AddBaseForgeLogging("orders");
builder.Services.AddBaseForge(options =>
{
options.UsePostgreSQL<OrdersDbContext>(connectionString);
options.EnableCQRS(typeof(Program).Assembly);
options.EnableAuditLog();
});
var app = builder.Build();
app.UseBaseForge();
Packages
| Package | Description |
|---|---|
BaseForge.Core |
Interfaces and entity bases only (no external dependencies) |
BaseForge.Infrastructure |
EF Core repositories, Dapper query helpers, DbContext base, RabbitMQ event bus, outbox/inbox |
BaseForge.API |
Controller base, middleware, AddBaseForge() / UseBaseForge(), JWT, logging, health checks |
BaseForge.Tools |
Developer tools: DBML ER diagram generation from an EF Core model |
BaseForge.CodeGen |
The baseforge .NET tool — code generator + Designer |
Tech stack
.NET 10 · ASP.NET Core · EF Core 10 · Dapper · MediatR · PostgreSQL · gRPC · RabbitMQ · OpenIddict · YARP · Serilog · Grafana Loki · Docker
Documentation
| Getting Started | Install, generate and run your first service |
| Designer | A tour of the visual editor |
| Service Spec | Every YAML option explained |
| Identity & Authorization | Central auth, roles, ownership, profile fields |
| Deploying to Production | Docker, reverse proxy, HTTPS, checklist |
| Architecture Decisions | What was decided and why |
Repository layout
src/
BaseForge.Core/ → entity bases, interfaces, CQRS contracts, exceptions
BaseForge.Infrastructure/ → EF Core repository, Dapper helpers, messaging, DI extensions
BaseForge.API/ → BaseController, middleware, AddBaseForge()
BaseForge.CodeGen/ → baseforge CLI: code generator + Designer host
BaseForge.Designer.Web/ → Designer UI (React + Vite + TypeScript)
BaseForge.Tools/ → DBML ER diagram generator
services/ → Identity reference service + sample generated services
samples/ → example specs (blog, orders, auth, …)
docs/ → documentation site (VitePress, English + Turkish)
tests/
Development
dotnet build # the whole solution
dotnet test # tests
To refresh your globally installed baseforge tool from local source (this is not an official release):
.\scripts\update-cli.ps1 # full build (including the Designer / Identity UIs)
.\scripts\update-cli.ps1 -SkipWebBuild # CLI / codegen only
To work on the documentation site:
cd docs
npm install
npm run dev
Official releases are published to nuget.org by .github/workflows/publish.yml when a GitHub Release is created.
License
| 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
- BaseForge.Core (>= 0.6.2-beta)
- Dapper (>= 2.1.79)
- Microsoft.EntityFrameworkCore (>= 10.0.9)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.9)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.2)
- RabbitMQ.Client (>= 7.2.1)
- Serilog (>= 4.2.0)
- System.Linq.Dynamic.Core (>= 1.6.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on BaseForge.Infrastructure:
| Package | Downloads |
|---|---|
|
BaseForge.API
BaseForge API katmanı: BaseController, exception/auth/logging middleware ve AddBaseForge() DI extension'ları. Core ve Infrastructure'a bağımlıdır. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.6-beta | 58 | 11/10/2026 |
| 0.6.5-beta | 130 | 11/4/2026 |
| 0.6.4-beta | 54 | 11/4/2026 |
| 0.6.3-beta | 72 | 11/4/2026 |
| 0.6.2-beta | 74 | 9/27/2026 |
| 0.6.0-beta | 80 | 9/26/2026 |
| 0.4.1-beta | 276 | 7/17/2026 |
| 0.4.0-beta | 87 | 7/17/2026 |
| 0.3.2-beta | 96 | 7/13/2026 |
| 0.2.3-alpha | 93 | 7/5/2026 |
| 0.2.2-alpha | 99 | 6/29/2026 |
| 0.2.1-alpha | 120 | 6/26/2026 |
| 0.2.0-alpha | 98 | 6/25/2026 |
| 0.1.0-alpha | 85 | 6/24/2026 |