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.
Read the write-up

- 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
- 0:06Confirms 200 units for transfer to the SS trolley
- 0:15Reviews the tray's stage and quantity history
- 0:17Raises a stage-skip request with a reason
- 0:27Manager queue shows the pending skip request
- 0:38QA reviews movements, refusals, and requests in the audit trail
- (opens full size in a new tab)Sterile Tray Management

Operator batch view: recipe details, trays by stage, scanning, and outstanding work before closure. - (opens full size in a new tab)Sterile Tray Management

Permitted move: the scan identifies the next stage before the operator confirms the quantity. - (opens full size in a new tab)Sterile Tray Management

Out-of-sequence refusal: the missing stage is explicit, and an exception requires a manager-approved request. - (opens full size in a new tab)Sterile Tray Management

Manager approvals: requests are separated by who can decide them. This capture shows the empty queue. - (opens full size in a new tab)Sterile Tray Management

QA audit trail: who acted, what changed, and why a scan or movement was permitted or refused. - (opens full size in a new tab)Sterile Tray Management

Administration: access, approval routing, operating limits, and devices, separate from batch approvals.
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.
Server-side interlocks
A stage move cannot execute until the rules engine has validated it on the server.
One-time skip grants
An out-of-sequence move needs a Manager-approved skip request, valid for that one stage, once.
Quarantined offline events
Events captured offline are received and quarantined rather than discarded, then adjudicated by a Supervisor.
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

