02 / 05CASE STUDY

Dian Brata Medika.

Web App · Healthcare · Back End Developer

A drug-inventory system for an independent pharmacy — built so stock rotates itself, oldest and nearest-expiry first.

Back End Developer
ROLE
Apotek Dian Brata Medika, Purbalingga
CLIENT
Jan — Jun 2025
PERIOD
Web · VPS
PLATFORM
(A) — OVERVIEW

Medicines were tracked by hand, so expired batches stayed on the shelf and stock counts drifted. The pharmacy needed stock that knows which batch must leave first.

The system covers the pharmacy workflow end to end: product and batch management, FIFO and FEFO stock rotation, expiry control, batch-level sales transactions, user management and a public landing page. The system is registered as copyright (HKI).

(B) — KEY FEATURES

What it does

07
  1. 01

    Dashboard

    Stock, sales and expiry at a glance.

  2. 02

    Product & Batch Management

    Every medicine tracked per batch, with its own quantity and expiry date.

  3. 03

    FIFO Rotation

    The oldest stock is always dispensed first.

  4. 04

    FEFO Expiry Control

    Batches closest to expiry leave the shelf before the rest.

  5. 05

    Batch Transactions

    Sales deduct stock across batches in one safe transaction.

  6. 06

    User Management

    Manage staff accounts and their access.

  7. 07

    Landing Page

    A public page introducing the pharmacy and its services.

(C) — ENGINEERING

Under the hood

FIFO

+ FEFO stock algorithms

Two rotation rules combined: first-in-first-out for stock age, first-expired-first-out for medicine safety.

ACID

Prisma database transactions

Batch medicine transactions run inside Prisma transactions, so partial updates never reach the database.

HKI

Registered copyright

The system is officially registered as intellectual property with DJKI.

VPS

Self-managed deployment

Deployed and maintained on a VPS in production.

(D) — TECH STACK

Built with

ReactNode.jsExpress.jsPrismaREST APIMySQLVPSGit
NEXT — 03Amuts