Works

Nota Kue

Matius2 min read
Nota Kue

Overview

Nota Kue is a PO management system for a small dry cookie business. One supplier, Florence, sells to several resellers, and each reseller sells on to their own customers at their own price.

The Problem

When one supplier works with many resellers, the numbers get messy fast. Everyone has a different selling price and a different margin, and the supplier still needs to know exactly how much each reseller owes per batch. Tracking that by hand works until the first wrong total.

Core Concept

There are two roles:

  • Admin (the supplier) manages products and sets the base price, which is the supplier's own price.

  • Seller (the reseller) sets their own selling price per product, takes orders from customers, and tracks what they owe.

How It Works

  1. The admin opens a new PO.

  2. Each seller enters orders from their customers against that PO.

  3. Confirmed orders are totaled automatically per seller.

  4. The admin sees a recap per PO and per seller.

  5. Once a seller has paid, either side can mark the transfer as done.

One Detail I Like: Price Snapshots

Prices change, but old orders shouldn't. So every order item stores a snapshot of the price at the time the order was made. Updating a product's price later never rewrites history.

The amount a seller owes is calculated on the fly from confirmed orders (base price × quantity), so there's no separate number to keep in sync.

What I Did

  • Designed the database and the pricing model

  • Built authentication with role-based access, so admins and sellers only see their own area

  • Built the admin and seller dashboards

  • Set up deployment, including separate database connections for the app and for migrations

Impact

Nota Kue is in active use with 4 sellers. The busiest PO so far had 13 orders, and each one rolls up into the recap on its own. No spreadsheet, no manual totals.

It's a small scale for now, but it's real use, and it's exactly the kind of workload the system was built for.

Key Takeaways

  • Modeling money data so history stays correct

  • Role-based routing with middleware

  • Working with serverless Postgres, especially why the app and migrations need different connection strings

Share