Hakan Sevimoğlu Hakan SevimoğluFreelance Developer · 18 yrs
Manufacturing · Workplace safety · Kiosk

Brisa PPE Virtual Store: One Entitlement Engine for Vending Machines and Storekeepers

At Brisa, personal protective equipment (PPE) is issued both by vending machines and by storekeepers. This case study explains how both channels were brought onto one database and one set of entitlement rules.

Short answerBrisa PPE Virtual Store is a card-based PPE issuing system built by Hakan Sevimoğlu with PHP and MySQL, running on the plant's internal network. Employees scan their card at a touchscreen kiosk, the system calculates department and person-level entitlements per period, gets approval from the central vending API and decrements stock. It runs as two installations: headquarters and the Aksaray plant.

Written by Hakan Sevimoğlu · Last updated:

Project context

Brisa's production areas issued PPE through workplace-safety vending machines. Bulky items, sized safety shoes and workwear, and shift-start bulk handouts did not fit the machines and were handled by storekeepers without any entitlement check, so audits could not prove who received what.

The goal was to move the machine's check onto the storekeeper's screen and merge both channels into one entitlement account: gloves from the machine in the morning and a helmet from the store at noon must count against the same entitlement.

Architecture and data flow

  1. Kiosk: a full-screen touch interface reads the employee number from the card reader.
  2. Employee and entitlement lookup: card blocking is checked, person and department limits are loaded, consumption in the current period is calculated.
  3. Basket: items beyond the remaining entitlement cannot be added; quantities are re-validated on the server.
  4. Approval: the request goes to the central vending API, which answers APPROVED, DENIED or FAIL.
  5. Record: approved issues are written with employee, product, slot, machine and time; stock is decremented and the result is reported back.

The admin panel runs as a JavaScript SPA on a single PHP router and shares the MySQL schema with the CodeIgniter-based vending admin.

Engineering challenges and solutions

Period-based entitlement engine

Entitlements are defined per department and per employee as daily, weekly, monthly, yearly or two-yearly. The two-year period is a rolling 24-month window, not calendar years. The same period logic is resolved identically in the admin panel, the kiosk summary and the central approval side; otherwise the panel and the machine would decide differently.

Unlimited entitlement versus blocking

The authorization flag in the database meant "unlimited entitlement", not "inactive employee"; the only real block was card blocking. Kiosk and panel were aligned with that meaning: unlimited employees get a badge and no limits, regular employees are stopped the moment an item would exceed their remaining entitlement.

Two plants, one codebase

Headquarters and Aksaray run the same product, but Aksaray applies a department-name filter so it only sees its own staff, including for administrators. Features built at one site (signed custody documents, definition lists, password change) are ported to the other to keep both installations in sync.

Technician scope and custody documents

Technicians only see the machines and departments assigned to them; the scope comes from a user-department table, falling back to the department's machine authorization. Signed custody forms are uploaded as PDF or image to the employee record and open in one click during audits.

The resulting system

The storekeeper hands out the item, but the system makes the decision: no issue without a card scan, no item without entitlement, every item recorded. Because vending and virtual store share the same employee, product, entitlement and stock tables, an employee whose entitlement ran out at the machine cannot get the same item from the store. Bulk department assignment, low-stock lists and per-employee consumption reports come from the admin panel.

Technology stack

PHPMySQLPDOCodeIgniterJavaScript SPAKart okuyucuDokunmatik kioskREST API

Related product and service

Go to the product page: Brisa PPE Virtual Store

Frequently asked questions

Does the system depend on the internet?

No. It runs on a server inside the plant network; kiosk, admin panel and vending approval service communicate over the same internal network.

Are the vending software and the virtual store separate programs?

No. Both use the same MySQL database and entitlement tables, so every issue counts against the same entitlement regardless of channel.

Can the same system be deployed in another plant?

Yes. Plant filters and entitlement periods are configuration; in multi-plant setups each plant manages its own staff and headquarters sees all of them.

More case studies

WhatsAppFree Quote