For a university lab's equipment ledger, the hardest part when we took over wasn't features — it was accounts.
How It Was Before
Forty-plus instruments spread across three rooms. The ledger system held 60-plus accounts — one per instructor, one per graduate student — with passwords stored locally as MD5. Students graduated, advisors moved groups; accounts were never deleted and passwords were forgotten. The admin's method was "whoever forgets gets a reset" — twenty-odd resets a semester.
Worse, some accounts were lent to outsiders — and when something went wrong, the logs pointed to no one.
Switching to LDAP
The university already had LDAP in place, with the student/staff ID as the unique identifier. Our changes were actually modest:
Login stopped querying the local users table; instead, the student/staff ID and password bind against LDAP, and on success the identity comes back via ou and group, mapped to the system's three roles: admin, supervising instructor, student. Locally we store only the ID, name, role, and last-login time — no passwords.
After this step, account creation and deletion belong to the university — deactivated on graduation, nothing to sync on our side. Password-reset tickets essentially disappeared.
One pitfall: our initial LDAP filter matched on cn, and two students shared a name — both bound successfully, but the wrong attributes came back. Switching to the unique uid fixed it.
Booking Conflicts
Another high-frequency problem in the ledger was equipment booking. The check for "is this slot taken" lived in the front end: two people opened the same day at the same time, both saw it free, both submitted successfully.
We added a unique index on (device_id, slot_start) to the bookings table — the database blocks duplicates directly, and the backend catches the conflict and returns "just booked by someone else." The front-end check remains, only to make the message arrive faster; we no longer trust it.
How the Inventory Gets Counted
Each instrument carries a QR code; scanning opens the detail page showing the custodian, last calibration date, and current status. During stocktaking the admin scans each one with a phone; the system records scan time and location, then exports an Excel. The first count covered 43 units — 3 of them marked "in use" in the ledger had actually moved to another room long ago.
Visiting the school that autumn, one fluorescent tube flickered in the lab corridor. The equipment manager went down the row scanning each unit with her phone, and when she finished she said it was much faster than checking against a notebook.

