Skip to content
Dhruvie.
All labs

Sterile Tray Management System

A prototype tray tracking system for sterile manufacturing, built around a pure Python rules engine, append-only audit records, and enterprise single sign-on.

Sterile Tray Management illustration
Client & domain
Amneal Pharmaceuticals
Sterile (parenteral) manufacturing
My role
System designer & developer
Year
2026
Status
Prototype

A prototype built to Amneal’s User Requirement Specification (URS), designed with FDA 21 CFR Part 11 requirements in mind. It is not a finished product and has not been formally validated; deployment, offline tablet capture, and validation protocols are not built yet.

01 / Overview

What it is

A tray tracking system for sterile (parenteral) manufacturing, prototyped against Amneal’s URS. It records where every tray of vials or bags is in its recipe, stops trays from skipping a stage, reconciles quantities at each move, and keeps an audit trail that cannot be edited after the fact. The prototype covers the URS workflow for five roles: Operator, Supervisor, Manager, QA, and Administrator.

Demo

In action

Sterile Tray Management
Prototype walkthrough: an operator confirms a tray's quantity and raises a stage-skip request, followed by the manager's approval queue and QA audit history.
  1. 0:06Confirms 200 units for transfer to the SS trolley
  2. 0:15Reviews the tray's stage and quantity history
  3. 0:17Raises a stage-skip request with a reason
  4. 0:27Manager queue shows the pending skip request
  5. 0:38QA reviews movements, refusals, and requests in the audit trail

02 / Purpose

Stage order and record integrity

In sterile production, an out-of-sequence move, an unauthorized sample, or an unrecorded hold can put a batch at risk:

  • Manual stage handoffs in the cleanroom are prone to human error
  • Editable records can be changed after the fact
  • Recipe exceptions and quarantines need fast, accountable supervisor decisions
  • Operators wearing sterile gloves struggle with dense desktop interfaces

03 / My role

Role and contributions

Scope
Requirements, system design, and prototype development
Worked with
Amneal business and IT teams
  • Met with Amneal’s business and IT teams to work through their URS.
  • Designed the system: rules engine, database design, roles, and identity integration.
  • Built the prototype’s Python rules engine, with every interlock backed by a test.
  • Implemented the append-only, hash-chained audit trail and Keycloak (OpenID Connect) sign-in standing in for Amneal’s Active Directory.

04 / Technical approach

Safety enforced by structure, not convention

A rules engine with no I/O
Business rules live in a pure Python package with no Django, database, or I/O. Import-linter contracts keep it that way, which makes it deterministic and straightforward to test, including with property-based tests (Hypothesis).
Append-only by permission
The application’s database role has UPDATE and DELETE revoked on the audit trail and tray movements, so history cannot be rewritten through the application.
Tamper evidence
Audit records are chained with SHA-256 hashes, and the chain can be verified in the database.
No local passwords
Authentication goes through OpenID Connect, so the application stores no credentials.
01

Server-side interlocks

A stage move cannot execute until the rules engine has validated it on the server.

02

One-time skip grants

An out-of-sequence move needs a Manager-approved skip request, valid for that one stage, once.

03

Quarantined offline events

Events captured offline are received and quarantined rather than discarded, then adjudicated by a Supervisor.

04

Requirements traceability

Requirements are traced from the URS to the design in a traceability matrix.

05 / Technologies

Stack

  • Python
  • Django
  • PostgreSQL
  • Celery
  • Redis
  • Keycloak / OpenID Connect
  • Next.js
  • Hypothesis

06 / Challenges

Engineering considerations

  • Making stage-order rules impossible to bypass from any entry point, not only the UI.
  • Making historical records tamper-evident at the database level.
  • Separating duties so decisions such as skips and closures sit with the right role.
  • Leaving genuinely open questions (such as tray split and merge arithmetic) refused rather than guessed.

07 / Outcome

Where it stands

This is a prototype, so there are no delivery outcomes to report yet.

08 / Related work

Keep exploring

Let’s work together.