💡 Inspiration The global rise in counterfeit pharmaceuticals is not just a logistical problem; it's a life-threatening crisis. I was inspired to create MediVerify Pro to provide a transparent, foolproof shield for patients. My goal was to turn every smartphone into a professional verification tool, ensuring that "Medicine is for Healing, Not for Risk."

🔍 What it does MediVerify Pro serves two main roles:

For Admins: A robust dashboard to manage pharmaceutical inventory, track stock, and generate secure, non-sequential serial numbers — with an AI Health Advisor that can automatically suggest and register new medicine entries in one click. For Consumers: A public portal where anyone can input a serial number to instantly check authenticity. The system doesn't just verify the ID; it calculates if the product is safe or expired based on real-time data.

🛠️ How we built it The project utilizes the MERN stack for high performance and scalability:

Backend: Node.js and Express manage the API architecture, including a dedicated /api/ai route for AI-powered suggestions. Database: MongoDB stores medicine records and admin credentials securely. Frontend: A modern SPA built with JavaScript and Tailwind CSS, featuring a sophisticated Glassmorphism UI. Security: Every admin session is protected by JWT and passwords are encrypted using Bcryptjs. AI Integration: The AI Health Advisor feature connects to the Anthropic Claude API server-side, keeping the API key secure and never exposing it to the browser.

To ensure the uniqueness of our serial numbers, we rely on high-entropy generation. The probability PP P of a collision can be expressed as:

P≈1−e−n22×62LP \approx 1 - e^{-\frac{n^2}{2 \times 62^L}}P≈1−e−2×62Ln2​ (Where nn n is the number of IDs and LL L is the character length).

🚧 Challenges we ran into One of the toughest hurdles was implementing the Dual-Validation Logic. We had to ensure that if a serial number exists but the product is past its expiry date, the user receives a "Warning" rather than a "Success" message. Synchronizing date objects between the server's MongoDB timezone and the user's local browser time required precise handling of ISO strings. Another challenge was integrating the AI Health Advisor securely. The initial approach called the Anthropic API directly from the frontend, which exposed the API key. We refactored the architecture to route all AI requests through the backend, resolving both the security issue and Node.js fetch compatibility across versions.

🏆 Accomplishments that we're proud of

Successfully creating a fully responsive interface that maintains its premium "Glass" look across both Desktop and Mobile devices. Implementing a Live Search feature that filters hundreds of medicine records instantly without refreshing the page. Building a secure authentication middleware that effectively guards the pharmaceutical database from unauthorized access. Adding an AI Health Advisor that generates medicine suggestions and saves them directly to the database with a unique serial number — fully integrated into the dashboard with auto-refresh.

📚 What we learned Building MediVerify Pro taught me the importance of Clean Architecture. I learned how to separate concerns by using:

models/ for data structure. routes/ for API endpoints. middleware/ for security layers.

This modular approach made debugging much faster and allowed for a scalable codebase. I also learned that API keys must never live in the frontend — even temporarily — and that routing sensitive calls through the backend is always the right architectural decision.

🚀 What's next for MediVerify Pro The vision doesn't stop here. Future updates will include:

QR Code Integration: Allowing users to scan a code instead of typing serial numbers. Blockchain Ledger: Moving the verification records to a decentralized ledger to make them 100% immutable. Email Alerts: Automatically notifying admins when a batch is approaching its expiration date. Enhanced AI Advisor: Expanding the AI feature to provide real dosage recommendations, drug interaction warnings, and multilingual health tips.

Share this project:

Updates