Rahul.
All projects
02 / PharmacyLive

E-commerce pharmacy storefront

ReactNode.jsExpressMongoDBJWTVercel

A category-driven pharmacy storefront: medicine catalog with search, cart management, pincode serviceability checks, and JWT-secured authentication — React frontend over an Express API, deployed to production.

01

Problem statement

A pharmacy needs a simple online path from browsing medicines by category to a checked-out cart — without a heavyweight commerce stack. Built as the engineering core of an internship project, the app covers the catalogue → cart → authenticated-order flow with just the pieces it needs.

02

My role

Full-stack developer on the internship team — built the React storefront and the Node.js/Express backend, then deployed the application to production on Vercel.

03

System architecture

React storefrontCatalogue · search · cart (Context) · auth UIHTTPS / REST API (JSON)Node.js + ExpressREST endpoints · JWT auth · business rulesMongoDB driverMongoDBProducts · categories · users · cart state

Illustrative architecture of the deployed system.

04

Technology decisions

React Context for the cart
The cart is shared state with a handful of actions (add, remove, quantity). Context plus a reducer covers it without pulling in a global state library — fewer dependencies, same predictable updates.
Category-driven catalogue
Products hang off categories, which shapes both the navigation and the API: one query path for browse-by-category, another for search — matching how customers actually shop for medicine.
Pincode serviceability as a first-class check
Delivery feasibility is verified before checkout with a pincode lookup, so unsupported addresses fail early instead of after an order is placed.
JWT auth + Vercel deployment
Simple token auth keeps the API stateless, and Vercel gives the frontend production hosting with zero infra overhead.
05

Challenges & solutions

Cart state across pages
Cart contents had to survive navigation between category, product, and checkout views — solved with a single Context provider mounted above the router so state never resets mid-session.
Catalogue consistency
Price and stock fields are validated on the server for every cart mutation, so the client can't submit stale quantities or prices from an outdated page state.
Deployment across two parts
Frontend and API were wired into one production deployment on Vercel with environment-driven API URLs, keeping preview and production configurations separate.
06

What I'd improve next

  • Order history and repeat-order flow
  • Admin inventory management
  • Payment integration
  • Automated tests for cart and checkout
07

Links

Live Demo Source Code repository linked above