Developed by Vineet | ci.vps@proton.me
Version 3.2.0 patches a broken access control issue in the supplier purchase-order handler (
public/supplier/orders.php) that allowed an authenticated supplier to tamper with another supplier's PO prices and status. Version 3.1.0 added strip/packing-based stock and sales entry with auto unit calculation, fixed all v3.0.1 display bugs, replaced emoji with SVG icons throughout, and patched an authentication gap in the batch lookup endpoint (get_batches.php). Upgrading is strongly recommended.
- Extract
drxstore/to your web root directory. - Open your browser and navigate to
http://localhost/drxstore/ - The Setup Wizard will launch automatically on first run.
- Complete the 4 setup steps: Store Info → Admin Account → Storage → Confirm
- Log in with your new admin credentials.
| Module | Features |
|---|---|
| Dashboard | Live stats, 7-day sales chart, low-stock alerts, top medicines, recent activity |
| Medicines | Full CRUD, search, dosage forms, HSN codes, GST%, rack location tracking |
| Import CSV | Bulk import medicines from CSV with preview & duplicate detection |
| Batches & Stock | Full batch management, expiry tracking, unit/strip pricing, status filters |
| Stock Adjustment | Add/Remove inventory with reason codes & audit trail |
| Suppliers | Manage suppliers, auto-create portal accounts, automated credential email |
| Purchase Orders | Create POs, notify suppliers via email, mark stock as received |
| POS / Billing | Interactive cart, customer selection, unit/strip batch picker, live MRP calculation |
| Payment Methods | Cash, UPI (reference ID), Cheque (bank & date), Card, Credit ledger |
| Discounts | Flat or percentage-based discount per sale |
| Sales History | Filter by date/customer, view full invoice, print customer receipts |
| Returns | Process return requests, restock inventory, refund audit trail |
| Customers | Customer profile CRUD, purchase history, lifetime value tracking |
| Ledger | Unified income, expense, and return records with custom date filters |
| Analytics | 12-month visual chart, top medicines, customer spending, payment breakdown |
| Expiry Report | Tiered reports (Expired, 30 days, 90 days, Good) with stock count |
| User Management | Add/edit/toggle staff accounts, role-based access control (Admin/Staff) |
| Settings | Store info, currency symbol, stock thresholds, SMTP setup, password change |
| Software Update | GitHub-verified update delivery — no unverified file uploads accepted |
- Dashboard with active purchase order summaries
- View purchase orders and update delivery status (Confirmed → Shipped → Received)
- Direct message interface to contact store administration via email notifications
- Profile & account password management
- Account registration with email verification
- Purchase history viewer with printable receipts and invoices
- Submit item return requests directly to store administrators
- Account profile management
- PHP: 8.0 or higher
- Web Server: Apache / Nginx / Termux
httpd - Permissions: Write permissions on the
data/directory (chmod 755 data/) - Email:
mail()enabled or configured SMTP for automated emails (optional)
- JSON (Default): Zero-configuration database; runs out of the box on Termux and lightweight servers.
- MySQL: Optional relational database support selectable during the Setup Wizard.
drxstore/
├── index.php ← Router (all pages routed via ?p=pagename)
├── config/app.php ← Application bootstrap & system constants
├── helpers/
│ ├── JsonDB.php ← JSON storage engine
│ ├── MySQLDB.php ← MySQL storage engine
│ ├── Mailer.php ← SMTP mailer (AES-256-GCM encrypted credentials)
│ └── functions.php ← Auth, CSRF, rate-limiting, and core utilities
├── views/
│ ├── layout_admin.php ← Admin shell layout (enforces security headers)
│ └── layout_portal.php ← Customer/Supplier portal shell layout
├── assets/
│ ├── css/app.css
│ └── js/app.js
├── data/ ← Auto-created directory for JSON storage
├── nginx.conf.example ← Recommended Nginx server configuration
└── public/
├── admin/
├── supplier/
├── customer/
└── setup/
DRXStore follows strict security guidelines. Version 3.0.0 resolved 19 security issues across critical, high, medium, and low severity tiers, v3.1.0 resolved an unauthenticated inventory enumeration issue (CWE-306 / CWE-200) on get_batches.php by enforcing requireStaff(), and v3.2.0 resolves a broken access control / IDOR issue (CWE-639) that let a supplier tamper with another supplier's purchase order prices and status. Refer to SECURITY.md for vulnerability disclosure policies and CHANGELOG.md for complete patch details.
Key protections built into DRXStore:
- Strict role-verified session checks (
requireAdmin(),requireStaff(),requireSupplier(),requireCustomer()) on all protected pages and AJAX endpoints - Anti-CSRF token verification on all POST forms and sensitive GET operations
- Parameterised database queries with automatic
e()HTML escaping on output - AES-256-GCM encryption for stored SMTP credentials at rest
- IP-based rate limiting and account lockouts across login and contact forms
- Session ID regeneration on authentication with a 2-hour idle timeout
- Secure updater fetching updates strictly from
github.com/psvim/drxstorevia GitHub API - Hardened HTTP security headers (
CSP,X-Frame-Options,X-Content-Type-Options,Referrer-Policy,Permissions-Policy) - Strict password complexity enforcement across all forms
If you have questions, need assistance with installation, or want to suggest new features, please join our community:
- Help & Questions: Open a topic in GitHub Discussions
- Direct Email Contact: ci.vps@proton.me
- Security Disclosures: Please review our Security Policy to submit private reports.
DRXStore v3.2.0 — Built with care by Vineet