โ† All projects

2023โ€“26 ยท Solo build

An agent portal

From a printed Excel form to a custom portal.

  • Blazor
  • MudBlazor
  • ASP.NET Core
  • SQL Server

The problem

problem.exe

Every agent filled in a printed Excel form by hand and typed in product codes one by one. For documents and reports, they had to call the office. Not exactly independent.

hello, office?

The solution

A custom portal that works directly on the ERP database: orders, catalog, prices, reports and documents in one place. Each agent sees only what's relevant to them.

  1. 01

    Orders and catalog

    Search the catalog by code or description, check availability and add the item straight to the order. Save it as a draft and finish it later, then follow its status: sent, processing, fulfilled.

  2. 02

    The right price, right away

    Pick the customer and the whole cart switches to their price list. Line discounts, shipping, early-payment discount and VAT update as you go.

  3. 03

    Reports and documents

    Compare two periods by customer or brand, see unfulfilled orders and browse the document history by customer, type, period or item. And up-to-date documentation is always there.

  4. 04

    Everyone's in the loop

    Every order sent becomes a PDF summary emailed to the office, with the agent cc'd. Issues are reported from the portal and go straight to the office.

The numbers

Active users
11
Orders sent
6,031
Customers served
279
Excel forms
0

from February 2024 to October 2026

How it's built

Architecture

  1. ERP

    SQL Server, pricing functions

  2. ASP.NET Core API

    In a Docker container

  3. Portal

    Blazor WebAssembly and MudBlazor

Documents, attachments and catalogue photos come from server folders, mounted read-only in the container.

Release
From a Git tag through GitHub Actions: tests first, then the Docker image and a Docker Compose restart on the server.
Tests
xUnit on endpoint permissions, per-agent filters, orders, email and file paths, plus the order totals.
PDF
Every order's summary is a PDF, attached to the email for the office with the agent in copy.
  • Prices from the ERP

    Per-customer price lists and discounts are worked out by SQL table-valued functions in the ERP's database, not by the portal. On save, the server rereads every row's price and discounts from there: no price comes from the browser.

  • Everyone's own data

    Every endpoint takes the agent from the session, not the request: customers, orders, documents and reports are filtered on the server. An agent sees their own customers and their sub-agents': every new query has to go through that filter.

  • Draft, then send

    An order stays a draft, the only state that can be edited, until the agent sends it. On send, the server recalculates the totals, marks it sent and then mails the PDF: if the email fails, the order stays sent.

  • Secrets out of the repo

    The portal runs in Docker Compose as a non-root user, with the server folders mounted read-only. Passwords and keys arrive as Docker secrets written by the deploy: the repo's configuration holds none of them.

Independent, at last.

Got a mess like this?