Inspiration
Our inspiration for MediStock AI stems from a critical observation: the existing medical supply chain is often fragmented, inefficient, and lacks transparency. Hospitals frequently face stockouts of essential items, while vendors struggle to optimally price and deliver. In a sector where timely access to supplies can directly impact patient outcomes, we saw a profound need for a smarter, more reliable solution. We were particularly excited by the potential of AI to bring true optimization and predictability to this vital domain.
What it does
MediStock AI is an intelligent platform that connects medical suppliers (Vendors) with healthcare providers (Hospitals), optimizing the procurement and delivery of medical supplies through the power of Artificial Intelligence.
For Hospitals: It provides a centralized dashboard to browse a comprehensive catalog of medical supplies, compare offers from various vendors (considering price, quality, and delivery time), place orders efficiently, and track their status in real-time. For Vendors: It offers a dashboard to list and manage their supply items, process incoming orders, and crucially, see their 'ML Worth Score.' This score, calculated by our AI model, provides a holistic measure of their reliability and competitiveness based on their historical performance, guiding them towards improvement and attracting more hospital orders. At its core, MediStock AI ensures that hospitals get the right supplies, at the right time, at competitive prices, while empowering vendors to optimize their operations and service delivery.
How we built it
We approached MediStock AI with a modern, scalable, and robust architecture:
Frontend (User Interfaces): Built using React with TypeScript and Tailwind CSS. This allowed us to rapidly develop intuitive and highly responsive dashboards for both Vendors and Hospitals, ensuring a seamless user experience across all devices. We leveraged react-router-dom for navigation and lucide-react for clean iconography. Backend (APIs & Logic): Developed with Go (Golang). Go's performance and concurrency features were ideal for handling API requests, managing data, and orchestrating the interactions between the frontend, database, and our ML service. Database: We're utilizing PostgreSQL as our relational database. It stores all critical information, including Vendor details, their Supply Items, Medical Supply master data, and eventually Order information. We carefully designed our schema, including MedicalSupply and Vendor_Supply_Items to ensure data integrity and efficient querying. Machine Learning Component: The core AI logic for calculating the 'ML Worth Score' is developed in Python. This ML service is invoked by a Go background job, which aggregates relevant data (price, quality ratings, delivery times) from our database, sends it to the ML model, and then updates the score back in the Vendor table. Data Aggregation: We implemented efficient SQL JOIN and GROUP BY operations to prepare vendor-specific features for our ML model from item-level data.
Challenges we ran into
Building a full-stack, AI-powered solution in just a few days definitely presented some exciting challenges: Feature Engineering for ML: The biggest hurdle was transforming the one-to-many relationship of Vendor_Supply_Items into fixed features for our ML model. We solved this by extensively using SQL aggregate functions (AVG, MIN, MAX, STDDEV, COUNT) within GROUP BY clauses to create comprehensive vendor-level metrics. Efficient Data Processing for Large Datasets: When dealing with potentially thousands to millions of records, standard LIMIT and OFFSET for batch processing can become very inefficient. We identified this early and implemented Keyset Pagination (Seek Method), which significantly optimizes fetching large batches of aggregated vendor data by directly leveraging database indexes, avoiding costly full table scans. Time Management & Prioritization: With a two-day deadline, deciding what to build versus what to defer was crucial. We focused intensely on the core value propositions: displaying the ML score for vendors and enabling basic ordering for hospitals, while planning more advanced features as 'next steps.' Full-Stack Integration: Ensuring seamless communication between our React frontend, Go backend, PostgreSQL database, and Python ML service required careful API design and error handling across layers.
Accomplishments that we're proud of
We are incredibly proud of several key accomplishments within this short hackathon timeframe: End-to-End AI Integration: We successfully implemented and demonstrated an AI component that takes live database data, processes it, and generates a meaningful 'Worth Score' for vendors, showcasing the core AI value. Robust Data Processing: Our implementation of efficient SQL aggregation and Keys-based Pagination demonstrates a strong understanding of handling large datasets and optimizing database performance, which is critical for scalability. Functional Two-Sided Platform: We've laid the foundation for both the Vendor and Hospital dashboards, demonstrating core functionalities like supply item Browse, vendor offer comparison, and the ability to view a vendor's AI score. Clean and Responsive UI: Despite the time crunch, we maintained a focus on creating a user-friendly and visually appealing interface using React and Tailwind CSS, ensuring responsiveness across devices. Team Collaboration: Successfully integrating multiple technologies and diverse skill sets (frontend, backend, ML, database) into a cohesive solution under immense time pressure.
What we learned
This hackathon has been a fantastic learning experience: The Power of Feature Engineering: We truly appreciated how critical proper data aggregation and feature selection are for an ML model to be effective and provide actionable insights. Database Optimization is Key: We reinforced the importance of understanding database query optimization techniques beyond basic indexing, especially for large-scale data processing like batch updates. Prioritization in Agile Development: For rapid prototyping like a hackathon, aggressive prioritization and focusing on the 'minimum viable demonstration' are paramount to delivering a functional product. System Design Trade-offs: Every architectural decision involves trade-offs (e.g., centralizing logic in the database vs. application layer, real-time vs. batch processing), and understanding these is crucial. The Go ecosystem: Further solidifying our understanding of building performant backend services with Go.
What's next for MediStock AI
Our hackathon project is just the beginning for MediStock AI! Our vision for the future includes: Expanding ML Capabilities: Implementing demand forecasting for hospitals to predict their supply needs. Dynamic pricing recommendations for vendors based on market demand and competitor analysis. Personalized vendor recommendations for hospitals. Full Order Lifecycle: Integrating comprehensive payment processing, return management, and robust order fulfillment workflows.
Built With
- fastapi
- golang
- mysql
- python
- react
- tailwind-css
- typescript

Log in or sign up for Devpost to join the conversation.