0% found this document useful (0 votes)
15 views7 pages

Cloud Pharmacy Management System PRD

The document outlines a Product Requirements Document (PRD) for a cloud-based pharmacy management system tailored for Pakistani pharmacy owners, utilizing Laravel, MySQL, and React. It details the vision, scope, functional and non-functional requirements, tech stack, roadmap, acceptance criteria, and next steps for the MVP release. The system aims to streamline product management, inventory tracking, sales, and reporting while ensuring regulatory compliance and user-friendly interfaces.

Uploaded by

saran.ali0010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views7 pages

Cloud Pharmacy Management System PRD

The document outlines a Product Requirements Document (PRD) for a cloud-based pharmacy management system tailored for Pakistani pharmacy owners, utilizing Laravel, MySQL, and React. It details the vision, scope, functional and non-functional requirements, tech stack, roadmap, acceptance criteria, and next steps for the MVP release. The system aims to streamline product management, inventory tracking, sales, and reporting while ensuring regulatory compliance and user-friendly interfaces.

Uploaded by

saran.ali0010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

# PHARMA BILLING & MANAGEMENT SYSTEM – PRD v1.

**Author:** [Your Name]

**Date:** 21-Jul-2025

**Status:** Draft → Ready for Review

---

## 1. Vision

Create a **cloud-based pharmacy management SaaS** tailored for Pakistani pharmacy


owners, built with Laravel + MySQL + React. The system will handle product
management, inventory tracking, sales, and reporting, with a focus on regulatory
compliance and user-friendly interfaces.

---

## 2. Scope – MVP (first release)

| ID | Requirement | Stack Mapping | Priority |

|---|---|---|---|

| PR-01 | Product CRUD | Laravel API + MySQL + React | P0 |

| PR-02 | Supplier CRUD | Laravel API + MySQL + React | P0 |

| PR-03 | Categories & Control Types | Laravel enums + React dropdown | P0 |

| PR-04 | Inventory with carton→box→pieces | MySQL JSON column + React helper | P0 |

| PR-05 | Daily Expense log | Laravel CashBook model + React form | P1 |

| PR-06 | Role-based auth: Admin / Manager | Laravel Sanctum + React context | P0 |

| PR-07 | P&L reports | Laravel Query Scopes + React charts | P1 |

| PR-08 | Real-time sync across tabs | Laravel Echo + Pusher (WebSockets) | P1 |

| PR-09 | One-click backup (MySQL dump → Google Drive / USB) | Laravel Command +
React button | P1 |
| PR-10 | Prescription image capture (optional) | Laravel file upload + React form | P2 |

| PR-11 | FIFO inventory picking | MySQL stored procedure + React logic | P0 |

| PR-12 | ABC analysis | Laravel scheduled job + React charts | P1 |

| PR-13 | Bulk product entry | Laravel form + React grid | P0 |

| PR-14 | Product detail page | Laravel routes + React component | P0 |

| PR-15 | Return entry page | Laravel form + React grid | P0 |

| PR-16 | Sales return page | Laravel form + React grid | P0 |

| PR-17 | Supplier payment tracking (hidden) | Laravel form + React grid | P2 |

| PR-18 | Customer profile management | Laravel model + React form | P0 |

| PR-19 | WhatsApp receipt sending | Laravel notification + React form | P1 |

| PR-20 | Expiry dashboard notifications | Laravel scheduled job + React dashboard | P0 |

| PR-21 | User training materials & support ticket system | Laravel routes + React pages |
P1 |

| PR-22 | Custom report builder | Laravel query builder + React form | P1 |

| PR-23 | Mobile-friendly version | React responsive design | P1 |

| PR-24 | User activity logs | Laravel logging + React dashboard | P1 |

| PR-25 | Automated daily backups | Laravel Command + Google Drive API | P1 |

| PR-26 | Standard invoice template | Laravel Blade + React component | P0 |

| PR-27 | Barcode scanning at POS | Laravel API + React form | P0 |

| PR-28 | Multiple sales tax rates | Laravel model + React form | P1 |

| PR-29 | Thermal printer integration for invoices | Laravel + React + Thermal Printer
Driver | P0 |

---

## 3. Functional Details

### 3.1 Product Management


- **Fields**: Name, Generic Name, Category, Control Type (OTC, Rx, Narcotic),
Barcode, Supplier, Carton/Box/Piece counts, Purchase Price, Sale Price, Tax Rate, Re-
order Level, Shelf, DRAP Reg # (optional).

- **Bulk Entry**: Form with “+ Add Row” button for entering multiple products at once.

- **Barcode Generation**: Auto-generate EAN-13 barcode from Product Code +


checksum.

- **Print Labels**: Button to print thermal labels (80×25 mm) for products.

### 3.2 Supplier Management

- **Fields**: Name, Contact #, Address, NTN, Credit Limit, Opening Balance.

- **Supplier Payment Tracking**: Hidden feature to log payments made to suppliers


(date, amount, mode, notes).

### 3.3 Inventory Management

- **Batch-Level Tracking**: Each batch has expiry date, carton/box/piece stock.

- **FIFO Picking**: Automatically selects oldest batch during sales.

- **Near-Expiry Alerts**: Dashboard section for products expiring within 30 days.

- **Audit Trail**: Logs changes to inventory (who, what, when).

### 3.4 Sales & Billing

- **Invoicing Page**: Search products, add to invoice, set one-time price, apply
discount, record payment.

- **Sales Return Page**: Search original sale, select items to return, enter returned qty,
update inventory.

- **Customer Profiles**: Name, phone number (for WhatsApp receipts).

- **WhatsApp Receipts**: Option to send invoice via WhatsApp with customizable


message.

- **Thermal Printer Integration**: Direct print to thermal printer (58mm/80mm) by


hitting "print" button.
### 3.5 Reporting & Analytics

- **Standard Reports**: P&L, sales by date, inventory value.

- **Custom Reports**: Builder for sales by supplier, inventory turnover, etc.

- **Mobile-Friendly**: Key reports and tasks accessible on tablets/smartphones.

### 3.6 User Management

- **Roles**: Admin (multi-branch), Manager (single branch).

- **User Activity Logs**: Track logins, actions performed for audit purposes.

### 3.7 Backup & Security

- **Automated Backups**: Daily MySQL dumps to Google Drive.

- **One-Click Backup**: Manual backup to USB via dashboard button.

- **Standard Invoice Template**: Developer-controlled template file.

### 3.8 Support & Training

- **User Training**: Embedded video tutorials, help guides.

- **Support Tickets**: System for users to report issues, admin to manage tickets.

---

## 4. Non-Functional Requirements

| Item | Target |

|---|---|

| **Platform** | Web app (React + TailwindCSS); responsive tablet view. |

| **Backend** | Laravel REST API + MySQL. |

| **Auth** | JWT + refresh tokens; optional Google SSO. |

| **Real-time Updates** | WebSockets ([Link]) for stock & sales. |


| **O line Tolerance** | Service-worker caches last 50 products; edits queue & sync on
reconnect. |

| **Multi-Tenant** | Row-level tenant_id isolation. |

| **SSL & Hosting** | Hostinger shared hosting or VPS. |

| **Printer Support** | Browser-based thermal printing (ESC/POS via WebUSB). |

| **Data Residency** | Hostinger data centers (ensure compliance with Pakistani


regulations). |

---

## 5. Tech Stack

- **Frontend**: React + Vite + TailwindCSS + PWA shell.

- **Backend**: Laravel, MySQL.

- **DevOps**: Docker, GitHub Actions, Hostinger hosting.

- **File Storage**: Hostinger file storage for receipts & prescriptions.

- **Backup Encryption**: AES-256; key stored securely.

- **CI/CD**: Auto-deploy on `main` branch.

---

## 6. Roadmap (4-week MVP)

| Week | Focus | Deliverables |

|---|---|---|

| 1 | Auth, Laravel models, migrations, seeders | Basic auth, core database setup |

| 2 | Product & Supplier CRUD (API + React) | Product entry, supplier entry |

| 3 | Inventory hierarchy & low-stock alerts | FIFO logic, expiry alerts |


| 4 | Sales module, P&L reports, backup button, pilot test | Invoicing, returns, reports,
backup |

---

## 7. Acceptance Criteria (sample)

- AC-04-02: Adding 3 cartons of Panadol (12×10 pieces) updates MySQL stock to 360
pieces and React inventory table instantly.

- AC-09-01: Clicking “Backup Now” produces file `pharma-backup-2025-07-21-14-


[Link]` in Google Drive within 30 seconds.

- AC-13-01: Bulk entry form allows adding 10 products in one go, with validation for
duplicates.

- AC-14-01: Product detail page shows all purchase and sale history for a selected
product.

- AC-16-01: Return entry page deducts stock correctly and logs the return with
timestamp and user.

- AC-19-01: WhatsApp receipt sends successfully with a customizable message


template.

- AC-21-01: User training materials are accessible via the “Help” section, and support
tickets can be submitted and managed.

- AC-29-01: Invoice prints correctly on a thermal printer (58mm/80mm) when the "print"
button is clicked.

---

## 8. Next Steps

1. **Set up Hostinger hosting**: Choose a shared hosting or VPS plan based on


expected tra ic and storage needs.

2. **Domain registration**: Register a custom domain name for the application.


3. **SSL setup**: Ensure SSL is enabled for secure connections.

4. **Database setup**: Configure MySQL database on Hostinger.

5. **CI/CD pipeline**: Set up GitHub Actions for automated deployment.

6. **Thermal Printer Integration**: Ensure the thermal printer driver is compatible with
your hosting environment and integrate it into the invoicing module.

7. **Review and finalize this PRD**: Ensure all requirements are captured and agreed
upon.

Common questions

Powered by AI

The system focuses on regulatory compliance by providing user-friendly interfaces that align with Pakistani regulations, such as managing DRAP registration numbers for products . Additionally, it employs robust data residency strategies by hosting data in Hostinger data centers, ensuring all operations comply with local rules . Features supporting compliance include batch-level tracking for inventory, automatic FIFO picking, and audit trails that log changes to inventory .

The design prioritizes user experience by implementing a SaaS model that offers a cloud-based, easily accessible platform across devices, including mobile-friendly views . The use of Laravel and React, coupled with a responsive frontend design using TailwindCSS, ensures a fast and intuitive interface . Features like real-time sync across tabs, one-click backup options, and role-based authentication contribute to a seamless user experience .

Real-time stock and sales updates in the system are achieved through WebSockets, specifically using Laravel Echo and Pusher for real-time sync across tabs . These technologies facilitate live data updates by maintaining open connections with the client, allowing immediate inventory status updates and sales data propagation. Socket.io is used to manage these connections and ensure that data is transferred efficiently between the server and client .

The system defines specific roles such as Admin and Manager to influence access and permissions within the platform. Admins have control over multiple branches and can manage system-wide settings, while Managers are limited to single-branch operations . Role-based authentication using Laravel Sanctum ensures that users only have access to functionalities pertinent to their roles, which prevents unauthorized activities and protects sensitive data . This division optimizes operational oversight and accountability.

Automated daily backups provide significant benefits, including increased data security and risk mitigation against data loss . By executing MySQL dumps and storing them in secure locations like Google Drive, the system ensures that critical data is preserved and can be quickly recovered in case of failures . However, challenges include ensuring network reliability for cloud storage uploads, managing storage costs, and maintaining data privacy and compliance with encryption practices like AES-256 . Properly managing these challenges is crucial for effective backup implementation.

The cloud-based architecture, built on Laravel and hosted via platforms like Hostinger, supports scalability by allowing resources to be dynamically allocated based on demand, which caters to growing numbers of pharmacies and transaction volumes without significant infrastructure investment . It also enhances reliability by providing high availability and continuity through distributed storage and backup solutions, reducing the risk of data loss . The use of Docker and CI/CD pipelines with GitHub Actions aids in smooth deployment and maintenance, ensuring the system remains robust as user needs evolve .

Integrating WhatsApp features into the pharmacy billing system allows for seamless customer communication by facilitating the sending of digital receipts directly to customers via WhatsApp . This integration offers pharmacies the advantage of instant communication, reducing dependency on physical paper, and enhancing customer engagement with customizable message templates . It also streamlines follow-ups and customer relationship management, thereby potentially increasing customer satisfaction and retention. There may be implications related to ensuring data privacy and compliance with messaging regulations that need to be managed effectively.

The system facilitates supplier management by providing features for handling supplier details such as name, contact information, credit limits, and payment tracking . A hidden feature enhancing this functionality is the supplier payment tracking system which logs payment details like dates, amounts, and payment modes . This allows pharmacy owners to maintain detailed records of financial interactions with suppliers, promoting better financial management and auditing capabilities .

To handle multi-tenant deployments, the system employs row-level isolation using tenant_id within the database, which ensures that data for different tenants is kept separate and secure . This strategy allows multiple pharmacies to use the same system instance without risking data leakage between tenants. Additionally, using JWT for authentication and refresh tokens further secures tenant data by controlling access . This approach balances scalability and security challenges inherent in SaaS models.

The FIFO inventory picking system is designed to automatically select the oldest batch during sales, which effectively manages inventory by reducing waste and ensuring that older stock is sold before expiry . This system can significantly enhance the accuracy and efficiency of stock management, minimizing losses from expired products and optimizing inventory turnover rates . By keeping track of batch-level details and providing near-expiry alerts, the system further bolsters inventory control .

You might also like