DEV Community

Cover image for I Built an Open-Source Platform Foundation for Accounting-Centric Business Apps
NGB Platform
NGB Platform

Posted on

I Built an Open-Source Platform Foundation for Accounting-Centric Business Apps

The problem I kept running into

Every serious line-of-business project I worked on eventually forced me to solve the same hard problems from scratch.

Not the fun architectural problems.

The tedious, load-bearing ones that every business system needs but most general-purpose frameworks deliberately do not provide:

  • A document model with lifecycle, posting, and reversal
  • An accounting engine with real ledger semantics
  • Operational registers for stock, balances, and settlements
  • Reference registers for prices, rates, and effective facts
  • An audit log that explains what happened and why
  • Metadata-driven UI so forms are not hardcoded screen by screen
  • A clean way to build multiple vertical solutions on one shared core

The first time you build these things, you think:

OK, that was hard, but now I know how.

The second time, you think:

I should have kept that code from the last project.

The third time, you think:

There has to be a better way.

That is the problem I wanted to solve.

Two common options — and a missing third path

In practice, teams usually end up choosing between two imperfect options.

Option 1: Generic web frameworks

ASP.NET Core is excellent.

But it deliberately stays out of your business domain. It gives you HTTP, routing, middleware, dependency injection, authentication integration, and hosting primitives.

That is exactly what a general-purpose framework should do.

But it also means every serious business application team eventually has to design its own document lifecycle, posting model, audit trail, reporting approach, and business state tracking.

Option 2: Large ERP products

SAP, Oracle, Dynamics, and similar systems have solved many of these problems.

But they solve them inside a product.

Customization can be difficult. Vendor lock-in is real. The cost and complexity can be high. And for many teams, the problem is not “we need to install an ERP.”

The problem is:

We need to build a business application, but we do not want to rebuild the same accounting and workflow foundation again.

The missing option: a reusable platform foundation

This is what I set out to build.

Not another generic web framework.

Not a full ERP replacement.

But a reusable open-source foundation for accounting-centric business applications.

What I built — NGB Platform

NGB Platform is an open-source platform foundation for accounting-centric business applications, built on .NET 10 and PostgreSQL.

The goal is to handle the hard, load-bearing concerns at the architecture level, so teams can focus on their vertical domain instead of rebuilding infrastructure on every project.

Core architecture

At the center is NGB.Runtime — the orchestration layer for document workflow, posting, reporting, validation, and response shaping.

Specialized engines handle specific concerns:

  • NGB.Accounting — ledger semantics, posting flows, debit/credit effects, and financial reporting
  • NGB.OperationalRegisters — movement-based state tracking such as stock levels, settlement balances, and operational balances
  • NGB.ReferenceRegisters — effective fact tracking such as prices, rates, terms, and other point-in-time facts
  • Business AuditLog — append-only history of what happened, who did it, and what effects were produced

Everything persists through NGB.PostgreSql into PostgreSQL, which acts as the authoritative system of record.

Authentication is handled by Keycloak.

Background jobs are handled by Hangfire.

The frontend is built with Vue 3 + Vite + Tailwind CSS, using a shared metadata-driven UI workspace.

The whole platform can run locally with Docker Compose.

Key design decisions

Append-only effects instead of silent mutation

Every business action produces explicit, durable effects.

Reversals are new records, not deletions.

That means the system can explain what happened, when it happened, who triggered it, and how it affected accounting, operational registers, reference registers, and audit history.

The goal is not just to store data.

The goal is to preserve business meaning.

Metadata-driven documents and UI

Documents, catalogs, forms, lists, actions, and UI behavior are described as metadata.

The frontend does not need a custom hardcoded form for every business document.

This makes it possible to build new vertical solutions on the same runtime without rewriting the whole application layer each time.

Hosts compose, libraries execute

API hosts, background job hosts, and watchdog hosts are thin composition roots.

Business logic lives in runtime services, engines, providers, and vertical modules — not scattered across controllers or HTTP handlers.

That separation has been one of the most important architectural decisions in the project.

Three live vertical demos

To prove that the same platform core can support different business domains, I built three vertical solutions.

Property Management

Leases, tenants, rent charges, receivables, payments, credit memos, allocations, maintenance requests, work orders, and accounting reports.

Trade

Products, inventory, purchase orders, sales orders, invoices, stock movements, supplier accounts, customer accounts, and trade-focused reporting.

Agency Billing

Clients, contracts, service delivery, billing runs, revenue recognition, and agency financial reporting.

All three share the same runtime, accounting engine, reporting pipeline, PostgreSQL provider, and Vue UI framework.

Demo login works for all three demo environments:

  • Email: alex.carter@demo.ngbplatform.com
  • Password: DemoAdmin!2026

Demo environments:

Tech stack

  • Backend: .NET 10, C#
  • Database: PostgreSQL
  • Authentication: Keycloak
  • Background jobs: Hangfire
  • Migrations: Evolve
  • Frontend: Vue 3, Vite, Tailwind CSS
  • Local development: Docker Compose
  • License: Apache 2.0

Getting started

git clone https://github.com/ngbplatform/NGB.git
cd NGB
docker compose -f docker-compose.ab.yml \
  --env-file .env.ab up --build
Enter fullscreen mode Exit fullscreen mode

Full documentation:

https://docs.ngbplatform.com

GitHub repository:

https://github.com/ngbplatform/NGB

What I would love feedback on

If you have built serious line-of-business software on .NET, I would genuinely love your feedback.

In particular:

  • Does this architecture make sense to you?
  • What would you do differently?
  • Which part would you want to see explained in more detail?
  • Is there a vertical use case you would like to see covered?

NGB Platform is open source under the Apache 2.0 license.

Version v1.0.0 has just been released.

Stars are welcome, but architecture feedback is even more valuable.

Top comments (0)