Skip to content
OnlyProjects
BCA · Cloud ComputingFor educational purposes only
Code included

Containerised Billing & Inventory Platform with Backups and DR for a Pharmacy Chain (Docker, PHP/MySQL)

A two-branch pharmacy's billing app, containerised, monitored, backed up and restorable on a free-tier cloud VM — with the running cost tracked to the rupee

Mapped to your syllabusBCU SEP 2024 · 24BCAPJ Project · Semester 5

Overview

1 min read

ArogyaOps is a fifth-semester BCA project (BCU SEP 2024, slot 24BCAPJ, team of 3) that puts a small two-branch pharmacy's billing and inventory platform — ArogyaPOS — through everything that happens after the app is written: containerisation, deployment, monitoring, backup, disaster recovery and cost tracking. Most student projects die the day the demo laptop is switched off; this one is built to survive it.

The billing application itself is deliberately modest — PHP and MySQL, written in the Web Programming course's stack — so the project's real weight falls on the operations layer that the Cloud Computing course (24BCA62) is about. The whole stack (Nginx, PHP-FPM, MySQL) runs as a Docker Compose application on a free-tier cloud virtual machine (Oracle Cloud Always-Free, or any free-tier provider), configured entirely from one .env file and a version-controlled docker-compose.yml.

Around it, the team operates real reliability practice on student hardware: Prometheus and Grafana dashboards with alert rules for downtime and disk pressure (industry-standard extras, clearly labelled), nightly mysqldump backups that are compressed, checksummed and synced off-site with rclone, a written DR runbook proven by timed restore drills, and a cost worksheet that accounts for every rupee of running the service — free tier, egress, storage — month by month.

The viva story is concrete: here is the app, here is the graph showing last Tuesday's outage, here is the 14-minute restore that recovered it, and here is the bill: ₹0.

Relevant for
Karnataka
Level
Intermediate · 12 weeks · team of 3
Common at
Bengaluru City University, IGNOU, GGSIPU
Updated
Oct 2026

Syllabus alignment

BCU · SEP 2024

24BCAPJ · Project · Semester 5 · 6 credits · 150 = SEE 120 (writing 20 + demo 60 + viva 20 + report 20) + IA 30 (3 reviews × 10)

Subjects this project applies
  • 24BCA62 Cloud Computing (AWS/Azure/GCP)
  • 24BCA51 Web Programming (PHP/JavaScript)
  • MySQL (DBMS)
  • Unix / Shell Scripting
How it is evaluated

Team: individual or group ≤ 3

hardbound report; open-source / licensed tools must be acknowledged

Also fits: IGNOU BCA (revised) — BCSP-064 guidelines, GGSIPU 4-year BCA 2024.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

Small Indian businesses — pharmacies among the most demanding, because billing cannot pause — typically run billing software on individual PCs with no central view of stock, no backup that has ever been tested, no monitoring, and no idea of what their setup would cost to run properly in the cloud. When a disk fails or a PC is stolen, sales history and GST records go with it; when two branches work separately, the owner's stock decisions are guesses. Moving to paid SaaS solves availability but costs ₹500–2,000 every month and places data outside the owner's control.

What is missing is a demonstration, at student scale, that a small organisation can run its own service reliably: one application serving both branches from a central database, deployed as code, watched by real monitoring, backed up nightly with restores that are actually rehearsed and timed, and priced honestly — using only free tiers and open-source tools.

Synopsis

Abstract

ArogyaOps delivers ArogyaPOS, a PHP/MySQL billing and inventory platform for a fictional two-branch pharmacy (Arogya Medicals, Hubballi), not as a laptop demo but as an operated service: three containers behind Docker Compose on a free-tier cloud VM, Prometheus/Grafana monitoring with alert rules, nightly verified backups synced off-site, a disaster-recovery runbook validated by timed drills, and a monthly cost worksheet. Reliability, recoverability and cost are first-class deliverables alongside the application.

Introduction

A small pharmacy's billing system is invisible until it fails — at 9 p.m., when GST invoices must print and the counter is queued. Student projects answer 'does the app work?', but a real shop must answer 'does it work tomorrow, after a disk fills, an update breaks, or the VM is reclaimed?'. That question belongs to cloud operations — exactly what this slot's project should exercise.

Existing System

  • Two branches run separate billing apps on standalone PCs; stock is reconciled by phone every few days.
  • No central database: consolidated stock and sales need a branch visit.
  • No backups that anyone has actually restored; a failed disk means re-entering a month of sales.
  • No monitoring — outages are discovered by customers; no cost record — nobody knows what the 'free' setup really costs.
  • Typical small-business fixes (a hosted SaaS) cost ₹500–2,000 per month and store data outside the owner's control.

Proposed System

  • ArogyaPOS, a PHP/MySQL web app: GST-style invoicing, batch-and-expiry stock tracking per branch, low-stock alerts, day-close reports; a single central database with per-branch data.
  • Containerised deployment: Nginx, PHP-FPM and MySQL as three services in one docker-compose.yml with healthchecks, named volumes and environment-file configuration — the same file runs laptop and cloud.
  • Free-tier cloud deployment: Oracle Cloud Always-Free VM (or equivalent) behind HTTPS, redeployable from scratch in one script.
  • Monitoring (industry-standard extras): Prometheus exporters for host, MySQL and containers; Grafana dashboards; alert rules for downtime, disk above 80% and failed backups, delivered to a Telegram group.
  • Backup and DR: nightly mysqldump --single-transaction, gzip, SHA-256 checksum, rclone sync to free object storage with 30-day rotation; a DR runbook with RPO 24 h / RTO 30 min targets, proven by two timed restore drills.
  • Cost tracking: a monthly worksheet listing every resource (VM, storage, egress, domain) and its price, showing the true cost of the 'free' deployment.

Feasibility Study

  • Technical: Docker Desktop runs on an 8 GB laptop; the Always-Free VM (1–2 GB RAM) comfortably serves Nginx + PHP-FPM + MySQL at a two-branch shop's load, with the Prometheus and Grafana images alongside. Every component is free and open source.
  • Economic: Baseline cost ₹0/month on the free tier; the worksheet also prices a realistic paid fallback (≈₹400/month small VM + ₹60 object storage) so the owner sees the exit path.
  • Operational: Branch staff keep their current browser flow; the owner gets dashboards and alerts on a phone; every operation is documented so a non-author can run the restore.

Objectives

  1. 01Build a two-branch billing and inventory web application (PHP/MySQL) with GST-style invoices, batch-expiry stock and day-close reports.
  2. 02Containerise Nginx, PHP-FPM and MySQL into a reproducible Docker Compose application with healthchecks and environment-based configuration.
  3. 03Deploy the stack to a free-tier cloud VM behind HTTPS, redeployable from scratch by a single script held in version control.
  4. 04Stand up Prometheus and Grafana monitoring with alert rules for downtime, disk pressure and failed backups, routed to Telegram.
  5. 05Implement nightly, checksummed, off-site-synchronised MySQL backups with 30-day rotation and an automated restore-verification test.
  6. 06Author a disaster-recovery runbook with RPO 24 h / RTO 30 min targets and prove it with two timed restore drills.
  7. 07Maintain a month-by-month cost worksheet covering VM, storage, egress and domain, with a paid-tier fallback price.

Scope

In scope

  • One fictional organisation (Arogya Medicals, two branches) with roles: Owner, Branch Pharmacist, (read-only) Auditor.
  • Central MySQL database with per-branch stock and sales; consolidated owner dashboard.
  • Full operations layer: Compose deployment, monitoring, alerts, backups, restore drills, DR runbook, cost worksheet, ops log.
  • Deployment to one free-tier VM; laptop parity via the same Compose file.

Out of scope (v1)

  • Kubernetes, multi-VM clustering or high-availability replication — one VM plus proven restore is the honest student-scale answer.
  • Online payment gateway and e-invoice API integration.
  • Pharmacy-drug licensing/regulatory workflow.
  • Native mobile apps (the web app is responsive).

Methodology

The project runs an iterative, DevOps-flavoured model with a weekly ops log as a formal deliverable: every week ends with something deployed, measured or rehearsed, and the log (incidents, decisions, times) becomes report evidence.

PhaseWeeksActivitiesDeliverable
Requirements & app design1–2Interview-style study of pharmacy billing needs; ER diagram, DFDs, schema; UI wireframesSRS + design doc
Application build3–5ArogyaPOS modules (invoices, stock, reports, auth); PHPUnit tests for billing rulesWorking app (laptop)
Containerisation6Compose file with 3 services, healthchecks, volumes, .env config; parity test laptop ↔ ComposeOne-command deployment
Cloud deployment7Free-tier VM, HTTPS, firewall, deploy script, first ops-log entriesPublic-ish demo URL
Monitoring & alerts8Prometheus + Grafana + exporters; 4 alert rules; Telegram routing; load test with JMeter-liteLive dashboards
Backup & DR9–10Backup job, checksums, rclone sync, restore-verification test, two timed drills against RTODR runbook + drill log
Cost tracking & hardening11Cost worksheet, resource tuning (VM RAM), security checklist (updates, secrets, least privilege)Cost report
Testing, docs & viva12Full test-case run, report, PPT, demo rehearsal including a live restoreFinal submission

Testing approach: PHPUnit unit tests for billing and stock rules; black-box test cases for every screen; operations tests as scripts — verify-backup.sh (restore into a scratch DB and row-count/checksum compare), alert-injection tests (stop MySQL, assert the Telegram alert arrives within 5 minutes), and a chaos-lite test (docker kill the app container; healthcheck restarts it, the incident appears on the Grafana graph).

Architecture & tech stack

4 diagrams · 9 technologies · 3 min read

  • PHP
  • MySQL
  • Docker
  • Docker Compose
  • Nginx
  • Bash
  • Prometheus (industry-standard extra)
  • Grafana (industry-standard extra)
  • rclone (industry-standard extra)

The system has a single deployment unit — one VM, one Compose application — deliberately simple, because the reliability story rests on monitoring and restore, not on clustering.

  1. Containers: nginx (TLS termination, static files) → php-fpm (ArogyaPOS) → mysql (data volume). A fourth service, backup, is a cron container that dumps and syncs. Healthchecks let Compose restart unhealthy containers.
  2. Operations plane: Prometheus scrapes node_exporter (host), mysqld-exporter (database) and cAdvisor (containers); Grafana renders dashboards; Alertmanager routes to Telegram.
  3. Recovery plane: nightly dumps land on a host volume, are checksummed and rclone-synced to free object storage; the DR runbook rebuilds the VM from scratch: install Docker, git pull, docker compose up -d, restore latest verified dump, re-point DNS.
flowchart LR
  B1([Branch 1 browser]) -->|HTTPS| N[Nginx container]
  B2([Branch 2 browser]) -->|HTTPS| N
  B3([Owner / dashboard]) -->|HTTPS| N
  N --> P[PHP-FPM container: ArogyaPOS]
  P -->|PDO| M[(MySQL container + volume)]
  BK[Backup cron container] -->|mysqldump| M
  BK --> CHK[SHA-256 checksum] --> RC[rclone sync] --> OBJ[(Free object storage)]
  NE[node_exporter] -.-> PR[Prometheus]
  MX[mysqld-exporter] -.-> PR
  CA[cAdvisor] -.-> PR
  PR --> G[Grafana dashboards]
  PR --> AM[Alertmanager] -->|alerts| TG[Telegram group]

Deployment / DR flow

flowchart TD
  GIT[Git repo: compose + app + runbook] -->|deploy.sh| VM[Free-tier VM]
  VM --> UP[docker compose up -d]
  UP --> LIVE[Service live behind HTTPS]
  BK[(Nightly dump + checksum)] -->|rclone| OBJ[(Object storage)]
  DR{Disaster: VM lost} --> RB[Runbook: new VM, install Docker]
  RB --> PULL[git pull + compose up]
  PULL --> REST[Restore latest verified dump]
  REST --> VERIFY[Row-count + checksum verification]
  VERIFY --> LIVE2[Service restored — target under 30 min]

ER diagram (ArogyaPOS)

erDiagram
  USER ||--o{ SALE : bills
  BRANCH ||--o{ USER : employs
  BRANCH ||--o{ STOCK : holds
  PRODUCT ||--o{ BATCH : "expires in"
  BATCH ||--o{ STOCK : "is stocked as"
  SALE ||--o{ SALE_ITEM : contains
  PRODUCT ||--o{ SALE_ITEM : "is sold as"

  USER {
    string id PK
    string name
    string username UK
    string passwordHash
    string role
    string branchId FK
  }
  BRANCH {
    string id PK
    string name
    string address
  }
  PRODUCT {
    string id PK
    string name
    string composition
    string hsn
    decimal gstRate
  }
  BATCH {
    string id PK
    string productId FK
    string batchNo
    date expiryDate
    decimal mrp
  }
  STOCK {
    string id PK
    string branchId FK
    string batchId FK
    int quantity
  }
  SALE {
    string id PK
    string branchId FK
    string userId FK
    datetime at
    decimal subtotal
    decimal gstTotal
    decimal total
  }
  SALE_ITEM {
    string id PK
    string saleId FK
    string batchId FK
    int qty
    decimal price
  }

DFD — Level 1

flowchart TD
  PH([Pharmacist]) --> P1[1.0 Authenticate]
  P1 <--> D1[(D1 Users)]
  PH --> P2[2.0 Bill a sale]
  P2 <--> D2[(D2 Stock)]
  P2 --> D3[(D3 Sales)]
  OW([Owner]) --> P3[3.0 Manage products, batches, branches]
  P3 <--> D4[(D4 Products/Batches)]
  OW --> P4[4.0 View dashboards and reports]
  D3 --> P4
  D2 --> P4
  SYSB[5.0 Nightly backup job] --> D3
  D2 --> SYSB
  SYSB --> D5[(D5 Backup archive + off-site copy)]
  MON[6.0 Collect metrics and alert] -.-> P2
  MON --> D6[(D6 Metrics store)]
  MON --> OW

Modules

6 modules

  1. Module 01

    ArogyaPOS Application (Member A)

    PHP/MySQL billing and inventory for two branches: product and batch (expiry) masters, per-branch stock with low-stock alerts, GST-style invoicing with number series per branch, day-close and tax reports, and role-based auth (owner, pharmacist, auditor). PHPUnit covers the money and stock rules — invoice totals, negative-stock rejection, expiry filtering.

  2. Module 02

    Containerisation & Deployment (Member A)

    The whole service as three Compose services plus the backup container: healthchecks for all, named volumes for MySQL data and dumps, TLS via the VM's certificate, and every setting from .env so laptop and cloud differ by one file. A deploy.sh rebuilds a fresh VM from nothing — install Docker, clone, up — which the DR drill reuses as its first half.

  3. Module 03

    Backup & Disaster Recovery (Member B)

    Nightly cron inside the backup container: mysqldump --single-transaction, gzip, SHA-256 checksum file, rclone sync to free object storage, 30-day rotation. verify-backup.sh restores the newest dump into a scratch database and compares row counts and checksums. The DR runbook (RPO 24 h, RTO 30 min) is proven twice with timed drills whose logs go into the report.

  4. Module 04

    Monitoring, Alerting & Cost (Member B)

    Prometheus with node_exporter, mysqld-exporter and cAdvisor; Grafana dashboards for host, database and containers; Alertmanager rules — app down, disk above 80%, backup job failed, restore test failed — routed to a Telegram group. The cost worksheet tracks VM hours, object storage GB-months, egress and domain against both the ₹0 free-tier baseline and a priced fallback.

  5. Module 05

    Ops Log, Hardening & Documentation (Member C)

    A weekly ops log recording incidents, decisions and times (the report's evidence base); a hardening checklist applied and screenshot — unattended security updates, secrets out of git, least-privilege MySQL user, firewall allowing only 80/443/SSH-key; and the documentation set: runbook, README, demo script for viva day.

  6. Module 06

    Testing & Viva Evidence (shared)

    Consolidated test report: PHPUnit results, black-box screen cases, operations tests (backup restore, alert injection, chaos-lite container kill), and the two DR drills. Each team member can be asked to run their half live, so every member rehearses the restore and the alert demo personally.

Slides

13 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    Containerised Billing & Inventory Platform with Backups and DR for a Pharmacy Chain

  2. Slide 2

    The Scenario: Two Branches, One Evening

  3. Slide 3

    Problem Statement

  4. Slide 4

    Proposed System

  5. Slide 5

    Objectives

  6. Slide 6

    Technology Stack

  7. Slide 7

    Architecture

  8. Slide 8

    Application Demo

  9. Slide 9

    Operations Demo — the core of the project

  10. Slide 10

    Backup & Disaster Recovery

  11. Slide 11

    Testing

  12. Slide 12

    Limitations and Security Hardening

  13. Slide 13

    Conclusion & Future Scope

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 15 answered free · 12 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    Why containerise a simple PHP/MySQL app that could run with XAMPP?

    XAMPP installs state onto one machine — its PHP version, its MySQL data directory — so 'works on my laptop' is fragile and unreproducible. Containers package the exact runtime with the app, keep the database in a named volume, and make the whole service reproducible from one compose file and one .env: the same command that runs my laptop rebuilds the cloud VM, which is precisely the property the DR drill depends on.

  2. 02Concept

    Explain RPO and RTO, and state yours.

    RPO, recovery point objective, is how much data you can afford to lose — with nightly backups mine is 24 hours, so a morning crash loses nothing but a late-night crash loses that day's sales. RTO, recovery time objective, is how long the service may stay down — I target 30 minutes, and my two timed restore drills completed in 14 and 19 minutes, so the targets are measured, not aspirational.

  3. 03Concept

    What do the three exporters actually measure in your monitoring stack?

    node_exporter reports host metrics from inside the VM — CPU, memory, and critically disk usage, since a full disk is the classic way a small VM dies; mysqld-exporter reports database health — connections, slow queries, replication-off-restart counts; cAdvisor reports per-container CPU and memory so I can see whether PHP-FPM or MySQL is the hungry one. Prometheus scrapes all three every 15 seconds and Grafana plots them.

+12 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

7 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

7 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

314 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

314 words · ~2 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

390 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

390 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

8 sources

  1. Docker Compose Documentation
  2. MySQL 8.0 Reference Manual — mysqldump: A Database Backup Program
  3. Prometheus Documentation
  4. Grafana Documentation
  5. Oracle Cloud Free Tier — Always Free resources
  6. Betsy Beyer et al. (eds.), Site Reliability Engineering — free online edition, Google
  7. PHP Manual — official documentation
  8. OWASP Top 10 — Web Application Security Risks

Cite this bundle

OnlyProjects. (2026). Containerised Billing & Inventory Platform with Backups and DR for a Pharmacy Chain (Docker, PHP/MySQL): BCA Cloud Computing project bundle [Educational resource]. https://onlyprojects.online/projects/bca-cloud-pharmacy-billing-backup-dr

Future scope

1 min read

  • Second VM + database replication for a warm standby, turning the 30-minute RTO into minutes.
  • CI/CD with GitHub Actions: tests and compose up smoke-deploy on every push.
  • Uptime certificate page: an external uptime monitor publishing the service's monthly availability — a nice SRE touch for the report.
  • Automated expiry alerts to suppliers for near-expiry batches (WhatsApp Business API).
  • Multi-tenant packaging: the same Compose file parameterised for other small shops, with a per-tenant cost sheet — a natural commercial follow-on.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

BCACode included

Web Development

Smart Hostel Management System

Room allocation, complaints and mess billing without the register

  • Next.js
  • TypeScript
  • Node.js
  • +3

intermediate8 wk2 students