Skip to content
SHIFTby Guruge
All work

Web Application 2026

Guruge Cinnamon Production Tracker

A custom internal production system for recording daily cinnamon production, worker output and conversion data.

Year
2026
Status
Built
Platform
Web · API
Scope
Production tracking, Daily records, Conversion data, Admin workflows

Overview

A family-run cinnamon processing workshop kept its production in a handwritten record book. This system replaces it: one family member signs in, records how many finished sticks each worker produced that day, groups those days into bundles, weighs them, and settles each worker's payment from the weight that is actually payable.

Challenge

The numbers that matter keep moving. The rate for converting sticks to kilograms changes, market prices change, worker shares change, and cinnamon is weighed wet. A payment settled last month still has to read the same figure — and be explainable — after every one of those has moved.

Direction

Every figure is a snapshot. A daily record stores the conversion rate it was calculated against; a bundle snapshots its own; a settlement copies the weights, market price and worker share it was derived from. Nothing is recomputed on read, so a price change never rewrites history. Estimated, gross, wet-deduction and net weights are kept as four separate measurements and never added together.

From sticks to payment

  1. 01Daily sticksper worker, per day
  2. 02Bundleaccumulated days
  3. 03Gross kgwhat the scale read
  4. 04− Wet deductionabsolute, in kg
  5. 05Net kgthe payable weight
  6. 06× Market priceeffective-dated
  7. 07× Worker shareeffective-dated
  8. 08Paymentsettled and snapshotted

Estimated kilograms, derived from the stick count, sit beside the measured weights for comparison. Workers are paid on net weight only.

What was built

  • Land tracking with one active land at a time, so every stick traces back to where it grew
  • Daily production per worker, with one record per worker per day enforced by the database
  • Bundling of accumulated days, with the daily records kept as the audit layer beneath
  • Weighing of each physical bundle: gross weight, wet-weight deduction and net weight
  • Worker payment settlement from net weight, market price and worker share, snapshotted at settlement
  • Effective-dated conversion rates, market prices and worker shares
  • Reports, analytics by worker and land, and worker payment history
  • One-tap Excel export of the whole record or the current filter, ten sheets deep

Technology

  • Next.js
  • TypeScript
  • Tailwind CSS
  • FastAPI
  • SQLAlchemy 2
  • Alembic
  • PostgreSQL
  • pytest

Outcome

The record book became one system of record. Field entries, bundle weights and worker payments are the same records, and any settled payment can be traced from the sticks counted to the money paid.

Technical notes

  • Arithmetic

    Stick counts, weights and money use integer and NUMERIC columns with Decimal arithmetic — no floating point anywhere in the payment chain.

  • Integrity in the schema

    Net weight is held to gross minus deduction by a check constraint, a partial unique index keeps at most one land active, and a bundle can have at most one settlement, so a double tap on “Settle” is harmless.

  • History is never destroyed

    Deleting a bundle releases its days rather than deleting them. Workers are deactivated, not deleted, and lands with history are completed rather than removed.

Start a project

Want something like this?

Tell me about the business and what the site needs to do.