PharmaFlow is a full-stack pharmacy operations platform for staff, administrators, and customers. It brings pharmacy inventory, sales, purchasing, delivery orders, analytics, realtime messaging, notifications, meetings, and video calls into one role-aware workspace.
The project is implemented as a production-style application using React, TypeScript, NestJS, PostgreSQL, GraphQL, REST APIs, Socket.IO, and WebRTC-oriented communication workflows.
PharmaFlow supports:
- Secure authentication with JWT access/refresh tokens, social login hooks, password reset, and optional TOTP two-factor authentication.
- Staff and admin workspaces for inventory, batches, categories, purchasing, POS checkout, returns, reporting, users, and settings.
- Customer catalog, cart, order tracking, delivery handoff, and customer-to-pharmacy messaging.
- Realtime notifications, unread counters, targeted notification drawers, and notification center workflows.
- Direct messaging with live presence, read states, broadcasts, message editing/deletion, and staff/customer conversations.
- Voice and video call workflows connected to messaging, including call lifecycle APIs, protected recordings, captions, and signaling.
- Staff meetings with participants, join/leave/end/cancel flows, notes, recordings, captions, and meeting invitations.
- Analytics dashboards for revenue, profit, inventory health, product performance, employee performance, and operational trends.
The images below were captured from the running local platform.
- Staff get a dense operational workspace with persistent navigation, live counters, quick access to notifications, and role-aware pages.
- Customers get a simplified catalog and delivery experience focused on ordering, tracking, and communication.
- Notifications, messages, orders, inventory changes, meetings, and calls are connected through realtime infrastructure.
- Video calls and meetings are treated as first-class collaboration features, not separate prototypes.
- The UI is responsive across desktop and mobile, with polished cards, tables, empty states, forms, focus states, and navigation.
PharmaFlow is organized as two applications:
backend/: NestJS API, GraphQL resolvers, REST controllers, TypeORM persistence, Socket.IO realtime gateway, calls, meetings, notifications, messaging, auth, orders, inventory, dashboard, and user management.frontend/: React + Vite single-page application with protected routes, role-aware shells, shared components, realtime context, GraphQL/REST clients, and responsive UI.
Core runtime services:
- PostgreSQL stores users, auth metadata, inventory records, orders, messages, notifications, calls, meetings, captions, recordings, and reporting data.
- Socket.IO powers live presence, notifications, messaging, order updates, inventory updates, call signaling, and meeting signaling.
- JWT authentication protects both API requests and realtime connections.
Prerequisites:
- Node.js and npm
- PostgreSQL, or Docker Compose
Typical local startup:
cd backend
npm install
npm run start:devcd frontend
npm install
npm run devContainerized startup:
docker compose up --build- Architecture
- Backend
- Frontend
- API Structure
- Key Flows
- Setup and Configuration
- Environment Variables
- Project Structure
- Developer Onboarding
The frontend production build is expected to pass with:
cd frontend
npm run buildThe backend test suite is available with:
cd backend
npm test

















