PharmaPluse
An AI-powered pharmacy operations and inventory platform.
Engineering a connected pharmacy operations platform that unifies inventory management, stock batch tracking, supplier logistics, mobile barcode billing, and AI intelligence.
An AI-powered pharmacy operations and inventory platform combining Flutter mobile applications, modular Node.js/Express backend services, Redis/BullMQ queues, and a Python FastAPI AI microservice.
Problem Context & Constraints
Disjointed inventory tracking across branches, manual batch verification, slow checkout workflows, and difficulty anticipating stockouts without real-time intelligence.
Architectural Solution
Engineered a decoupled platform architecture separating core transactional backend workflows from asynchronous background jobs and specialized AI services.
PharmaPluse Architecture Diagram
Interactive system node topology and network boundary relationships.
Flutter Mobile App
Barcode Scanning & Billing
Cross-platform mobile application with offline-first secure storage, barcode scanner, and location-aware capabilities.
Node.js / Express API
API Gateway & Routing
TypeScript REST API with Zod validation, JWT authentication, and Express rate limiting.
Auth & Org Layer
Multi-Tenant RBAC
Organization boundaries, user roles, permission checks, and security middleware.
Business Modules
Drugs, Stock, Sales & Suppliers
Core business domains including drugs catalog, batch inventory, purchase orders, transfers, and billing.
MongoDB (Mongoose)
Primary Data Store
Document persistence for multi-branch pharmacy records, sales history, and organizational schemas.
Redis & BullMQ
Asynchronous Job Queues
Background job processing for expiry alerts, demand calculations, and stock reports.
Python AI Service
FastAPI Microservice
Dedicated AI service providing OCR prescription extraction, demand forecasting, stock anomaly detection, and drug substitution recommendations.
Engineered System Features
Platform Operations
AI Intelligence Layer
Mobile & Edge Workflows
Why Was It Designed This Way?
Heavy AI processing (OCR & demand forecasting) was blocking point-of-sale checkout APIs.
Separated AI workloads into a dedicated Python FastAPI service invoked asynchronously.
Prevents CPU-intensive model inference from degrading real-time mobile billing and inventory APIs.
Core business REST APIs maintain sub-100ms response times regardless of AI workload spikes.
High-frequency inventory updates and expiry alert recalculations caused database write lock contention.
Offloaded batch updates and notification triggers to Redis and BullMQ queues.
Asynchronous task processing decouples real-time sales transactions from background batch calculations.
Zero billing lag during peak pharmacy operating hours.
REST API Authentication & Rate Limiting Guard
Telemetry, Tracing & Operational Health
Structured logging and background queue monitoring across Node.js API and Python AI service.
PharmaPluse Deployment Pipeline
Containerized deployment architecture and health probe verification steps.
Containerized CI/CD deployment using Docker and GitHub Actions with a self-hosted deployment runner.
Developer Push
Developer pushes code to branch triggering GitHub Actions runner.
Container Build
GitHub Actions self-hosted runner executes docker build with versioned image tags (e.g. dev-BUILD_NUMBER or prod-BUILD_NUMBER).
Verification & Deployment
Docker network and environment verification followed by container launch with readiness health checks.
Cleanup & Notification
Automated old container and image pruning upon verified healthy endpoint status.
PharmaPluse Technology Cluster
Curated tech cluster of production-verified libraries, languages, databases, and deployment platforms.
Mobile
Backend API
Data & Queues
AI Service
Deployment
Engineered Results
Have a system like this in mind?
Tell us what you're building. We'll help turn the architecture into a scalable, production-ready product.