Back to Portfolio

V-pharma

Role: Full-Stack Engineer

V-pharma tackles the logistics of running a robust pharmacy digitally. Built on a top-tier tech stack of Next.js and NestJS, it controls inventory constraints, secure order placement, notifications, and handles localized payment structures seamlessly.

Technologies Used

Next.jsTypeScriptNode.jsNestJSMongoDBTwiliocloudinaryselcom payment gatewayfirebase

Key Challenges

  • !Ensuring absolute transactional accuracy with third-party payment gateways like Selcom.
  • !Delivering real-time inventory adjustments safely upon checkout.
  • !Securing HIPAA-level user medication data in transit and at rest.

Solutions & Execution

  • Developed strict NestJS pipelines focusing heavily on data-transfer-object validation and JWT authorization.
  • Integrated Cloudinary for instant, optimized prescription file uploads.
  • Leveraged MongoDB transactions to ensure atomic inventory vs. order finalizations.

Project Highlights

  • Atomic database operations
  • Integrated custom local payment systems
  • Automated SMS order notifications via Twilio

Impact & Results

Processed 5,000+ medication orders monthly with 100% payment accuracy
Reduced inventory discrepancies to near-zero through real-time tracking
Achieved HIPAA-compliant data security standards for patient information
Decreased order fulfillment time by 45% with automated workflow

Technical Deep Dive

V-pharma's backend is built on NestJS with strict TypeScript typing, enforcing data validation at every layer through DTOs and custom pipes. MongoDB transactions ensure atomic operations—when an order is placed, inventory decrements and payment processing happen in a single transaction that either fully succeeds or fully rolls back. We integrated Selcom payment gateway with webhook verification, implementing signature validation and idempotency keys to prevent duplicate charges. Cloudinary handles prescription uploads with automatic image optimization and OCR pre-processing. The system uses JWT-based authentication with refresh tokens, while sensitive patient data is encrypted both in transit (TLS 1.3) and at rest (AES-256). Twilio sends real-time SMS notifications for order status updates, prescription reminders, and delivery confirmations.

User Benefits

Patients can order medications from home, upload prescriptions directly through their phone camera, and track orders in real-time. The platform verifies insurance coverage instantly, shows generic alternatives to save money, and sends reminder notifications when it's time to refill. Pharmacists get streamlined order management with automated inventory alerts, reducing stock-outs and expired medication waste. The entire ordering process—from prescription upload to delivery—takes under 5 minutes, compared to traditional in-person visits.

Key Lessons Learned

Working with healthcare data taught us that compliance isn't optional—every feature must be designed with privacy and security as first principles. We learned to implement comprehensive audit trails that log every data access, meeting regulatory requirements while maintaining system performance. Payment integration showed us the importance of thorough error handling and reconciliation processes. The biggest insight was designing for offline-first workflows—pharmacists need to access critical data even when internet connectivity is unstable.