All projects

Nectum

A modular Rust ERP connecting sales, inventory, and accounting.

PlatformsIn development

Enterprise resource planning system with inventory, sales, purchasing, and accounting modules. Pairs a Rust API with a React interface and TypeScript client, preserving tenant context across all operations.

The problem

Orders, inventory stock, and double-entry bookkeeping must stay synchronized while strictly isolating data and access permissions between companies.

The solution

Modular monolith organized in Rust crates using Axum and SQLx. PostgreSQL enforces Row-Level Security (RLS) within tenant-scoped transactions. Modules link stock reservations, dispatches, and journal entries; React interacts with the API through a typed TypeScript SDK.

From sales order to journal entry

The sales cycle coordinates documents, stock reservations, and inventory movements. Automated journal entries are posted when company ledger accounts are configured.

  1. Sales orderCustomer · products · warehouse
  2. ConfirmationStock reservation
  3. DispatchInventory release
  4. BookkeepingIf accounts configured
Order dispatch and automated ledger entry share an atomic database transaction. Entries are posted when accounting accounts are configured.
  1. Create sales order

    React · TypeScript SDK · Rust

    The order aggregates customer details, products, quantities, and target warehouse. The Rust API validates input and calculates line item totals.

  2. Confirm and reserve

    SQLx · PostgreSQL

    Order confirmation reserves available inventory and validates current warehouse balances within an atomic transaction.

  3. Dispatch and log movements

    Inventory · stock movements

    Order dispatch fulfills reserved stock, registers physical warehouse movement logs, and advances the sales order status.

  4. Post to general ledger

    Double-entry · tenant context

    If company accounts are configured, the system generates double-entry journal records within the dispatch transaction under tenant context.

Traceable inventory

Reservations and movement records maintain complete visibility into how sales activity affects warehouse stock.

Accounting ledger entries

Automated journal entries connect commercial transactions directly to the balance sheet and profit-and-loss reports.

Key technical challenges

Preserving tenant context across every operation

Transactions set tenant configuration before querying or modifying records. PostgreSQL RLS policies evaluate this context to restrict access strictly to each company’s rows.

Coordinating inventory and accounting

Order confirmation reserves stock, and order dispatch deducts inventory while logging movements. When accounts are configured, dispatch generates the corresponding accounting journal entry within the exact same database transaction.

Core capabilities

  • Multi-warehouse inventory, movements, and stock reservations.
  • Sales and purchase orders, customer and supplier management.
  • Double-entry bookkeeping, collections, payments, and financial reports.
  • Company data isolation and role-based access control (RBAC).
  • TypeScript client SDK, OpenAPI documentation, and Docker deployment.

How it works

Sales, inventory, purchasing, and accounting share an API with tenant-isolated data.

Select a part of the architecture map to learn about its role.

Typed UI & Client SDK

The interface uses Nectum’s TypeScript client to query and manage modules. The SDK centralizes API requests and session token refresh.

API & Permissions

Axum exposes HTTP routes on Tokio. Authentication, role-based access control, and tenant context govern every request, documented via OpenAPI.

Tenant-Scoped Data

SQLx opens transactions initialized with company context. PostgreSQL Row-Level Security policies restrict queries and mutations to that tenant.

Connected Modules

Each business domain lives in an isolated crate. Orders reserve stock; dispatches deduct inventory and post journal entries when accounts exist.

Looking for someone like this?

Let's talk about your engineering team and the software you need to build.

Email me