Enterprise ERP

The internal operations app behind peakpk.store, order intake, fulfilment, inventory, team roles and reminders in one place. Built so the business runs on something other than a WhatsApp thread and a spreadsheet, with the rules that matter enforced in the database rather than in the UI.

The product mark, taken from the app's own sidebar.
The product mark, taken from the app's own sidebar.
Admin dashboard: low-stock banner, KPI tiles, orders per week, revenue over time and status breakdown.
Admin dashboard: low-stock banner, KPI tiles, orders per week, revenue over time and status breakdown.
The branded login.
The branded login.
Orders: Strava and model links, inline status, financials and designer assignment on one row.
Orders: Strava and model links, inline status, financials and designer assignment on one row.
The status pipeline, and which role may make each transition.
The status pipeline, and which role may make each transition.
Order intake: structured fields alongside a freeform details box.
Order intake: structured fields alongside a freeform details box.
Inventory: stock against thresholds, and filament by colour in kilograms.
Inventory: stock against thresholds, and filament by colour in kilograms.
The auto-decrement trigger, including the check that stops an order deducting stock twice.
The auto-decrement trigger, including the check that stops an order deducting stock twice.
Team and roles. The two email addresses are redacted.
Team and roles. The two email addresses are redacted.
What each role can reach, and where it is enforced.
What each role can reach, and where it is enforced.
Notes.
Notes.
Reminders.
Reminders.
Request flow from browser to database, and the security boundary at each layer.
Request flow from browser to database, and the security boundary at each layer.

Why it exists

Orders arrived over WhatsApp and Shopify, each carrying a Strava link, a 3D model, a payment state and a designer to assign. Tracking that across a chat thread and a spreadsheet does not survive growth, and nothing in it could answer what is low on stock or what is still unpaid without someone reading every row.

Built around the order

The orders table is the spine: customer, Strava activity link, 3D model link, inline status, the financial columns (due, paid, balance), the assigned designer and a fulfil action, all on one row. Intake is a single form that accepts the messy reality, with a freeform details field beside the structured ones, because customers do not write to a schema.

The status pipeline is the product

An order moves pending → in progress → model made → printed → shipped → delivered, with a revise branch back to the designer. Who may make each transition is not a UI concern: a Postgres trigger allows a designer exactly two of them and blocks the rest, so the rule holds whoever is calling and from wherever.

Stock that decrements itself, once

Crossing into fulfilment deducts a frame, a packaging unit and a flyer. The hard part is doing it exactly once, the same trigger checks whether the previous status was already in the fulfilment set and skips the deduction if so, so moving printed → shipped → delivered cannot double-charge the inventory. The subtraction floors at zero rather than going negative.

Two roles, one database

Admins see every row and every financial column. Designers see only orders assigned to them, with the money columns nulled out in the view itself, Row-Level Security does the filtering, so there is no client-side check to forget. The derived low-stock banner on the dashboard follows from the same data rather than from anyone remembering to update it.

Highlights

Real data from an early-stage business: the revenue figures read zero because the app was captured before it had order history, not because the chart is a mock. The two email addresses on the team screen are redacted here.

More Development