PharmaConnect
Search. Reserve. Pickup
The problem PharmaConnect solves
Every day, thousands of patients visit multiple pharmacies searching for a specific medicine, often returning empty-handed. There is no centralized platform that shows real-time stock availability across local pharmacies. This results in wasted time, delayed treatment, and frustration — especially for elderly patients and medical emergencies.
Challenges we ran into
🚧 Challenges I Ran Into
1. Python Environment Issues
Setting up Flask without a virtual environment was tricky — pip kept
installing packages to a different Python than the one running the app.
Solved by using python -m pip install to force the correct interpreter.
2. MongoDB Connection
MongoDB was not running as a service on Windows, causing connection
refused errors. Had to install MongoDB manually and start it as an
Administrator using net start MongoDB.
3. Real-Time Location Access
Browser GPS only works on localhost or HTTPS — not on plain file:// paths.
Had to run the frontend through Live Server to get accurate GPS coordinates.
4. Role-Based Access Control
Differentiating between regular users, doctors, and pharmacy owners using
the same login page required careful JWT payload design and route-level
decorators in Flask.
5. CORS Between Frontend and Backend
The frontend (port 5500) and Flask backend (port 5000) are on different
ports, which browsers block by default. Fixed using flask-cors with
specific origin whitelisting.
6. Expiry & Stock Management
Building a system that automatically flags expired medicines, warns about
medicines expiring within 90 days, and tracks low stock in real time
required careful MongoDB querying and date comparison logic.
7. Barcode Integration
Real barcode scanning requires camera hardware access via browser APIs.
For the demo, a simulated barcode lookup system was built using a mock
database until real hardware is available.