Case study · SCusH

One system for the whole distribution business.

SCusH, short for Stock, Customer and Human resource, runs the day-to-day operations of a beverages distributor: recruitment, payroll, warehousing, sales accounting and cash, in one place.

  • In production since 2021
  • One app per business area
  • Real controls: locks, audit, approvals

Why it exists

From scattered tools to one source of truth.

  1. Problem

    Work lived in disconnected places

    Stock, customer records, payroll and policies were handled across separate tools. That meant duplicate entry, slow reports and constant reconciliation errors.

  2. Solution

    One platform, one app per business area

    Each part of the business got its own focused module on a shared database, with payroll, KPI tracking, documents, notifications and report emails automated.

  3. Impact

    Faster work, numbers you can trust

    Fewer bottlenecks, reports on time, and month-end figures that can't change behind anyone's back, so leadership decides on reliable data.

What's inside

Four areas, one system.

People & recruitment

  • Staff & payroll: employees, positions, payroll, permits, suspensions, welfare and statements
  • Recruitment: job postings, applications, interviews and guarantor documents
  • Users: profiles and invite-only registration

Stock & warehousing

  • Inventory: products, stock movements, stock counts and price history
  • Stores: warehouses, levies and renewals
  • Materials: internal requests and issuing, with approval

Finance & trade

  • Trade: daily and monthly trade, balance sheets and budgets
  • Cashflow: deposits, disbursements and bank transfers
  • Targets: sales targets, KPI budgets and monthly goals
  • Sales centres: the outlets sales are booked against

Customers & comms

  • Customers: records and approved credit
  • Comms: internal posts, projects, tasks and polls

The part I'm proudest of

Financial controls built into the data.

Accounting software is only trusted if the numbers can't quietly change. SCusH enforces that in the system itself, not by policy.

  • Locked periods

    Once a month is closed, it's locked, and the record keeps who locked it and when.

  • Audit trail

    Changes to trade records are logged with the user, the time and exactly what changed.

  • Separated approvals

    Cash disbursements, material requests, customer credit and document re-uploads each need someone to approve them.

  • Guarantees in the database

    An employee can't be paid twice for the same period. The database itself refuses it.

  • Session timeout

    Idle sessions sign out after ten minutes, because shared office computers are a real risk.

class Payroll(models.Model):
    staff = models.ForeignKey(Employee, ...)
    period = models.CharField(...)
    ...

    class Meta:
        constraints = [
            models.UniqueConstraint(
                fields=['staff', 'period'],
                name='unique_payroll_staff_period',
            )
        ]

# a second payroll run for the same person and
# month is rejected by PostgreSQL, not just the form

Under the hood

Built to be maintained for years.

Architecture

  • One Django app per business area, each with its own URLs, so changes stay contained.
  • Money is stored with its currency (django-money), never as bare numbers.
  • Background jobs handle notifications, emails and scheduled work through Celery.
  • PDF generation for payslips and reports.
  • Charts for trade, growth and monthly sales on the dashboard.
  • Media in Amazon S3, static files through WhiteNoise.
  • Documentation lives with the code and is published by the app itself.

Timeline

  1. 2021

    First version goes into production

  2. 2026

    Locked periods, audit log, the payroll guarantee and a new recruitment module

  3. Now

    Still in daily use, still evolving

Built with

  • Python
  • Django
  • PostgreSQL
  • Celery
  • RabbitMQ
  • django-money
  • Amazon S3
  • WhiteNoise
  • Bootstrap
  • Heroku

The dashboard illustration uses placeholder figures. No real company data is shown.