Pill Penny: Medication Affordability Platform
Inspiration
We created Pill Penny after witnessing friends and family members struggle with the high costs of prescription medications. Many people don't realize how much they could save by switching to generic alternatives. This information gap became our call to action, driving us to create a tool that democratizes access to medication pricing information and helps people make more informed decisions about their healthcare spending.
What it does
Pill Penny is a web application that compares brand-name medications with their generic alternatives, displaying potential cost savings in an intuitive visual format. Users can search for medications, view monthly and annual savings projections, and access detailed information about both brand and generic options. Our interface presents complex pharmaceutical information in an approachable way, helping users understand their options at a glance.
How we built it
We developed Pill Penny using a modern tech stack:
- Frontend: Next.js and React with TypeScript, creating an engaging UI with Tailwind CSS and Framer Motion animations
- Backend: Flask API connecting to a dual database system:
- Pinecone Vector Database: For efficient similarity searches of medication information
- Neo4j Knowledge Graph: To model complex relationships between medications, side effects, drug classes, and manufacturers
- AI Integration: Gemini API using a Retrieval-Augmented Generation (RAG) approach that pulls from both vector embeddings and graph relationships
- Architecture: Next.js API routes proxy requests between frontend and Flask backend to resolve CORS issues
Our Neo4j knowledge graph is particularly powerful for understanding medication relationships, allowing us to provide insights about similar medications within the same class and potential alternatives beyond direct generics.
Challenges we ran into
Our biggest hurdles included resolving CORS issues between our frontend and backend services, optimizing complex animations for better mobile performance, and engineering AI prompts to return consistently formatted medication comparison data. Building and maintaining the Neo4j knowledge graph presented its own challenges, particularly in creating a coherent schema that accurately represents pharmaceutical relationships. We also struggled with creating an intuitive search experience that could handle both partial and exact medication name matches while maintaining a smooth user experience.
Accomplishments that we're proud of
We're particularly proud of our visually engaging interface that makes pharmaceutical information accessible to everyone. The neural network visualization creates an engaging backdrop while our comparison cards present cost savings in a clear, impactful way. Our integration of vector search with knowledge graph traversal creates a uniquely powerful RAG system that can answer complex queries about medication relationships. We've successfully created a seamless integration between modern frontend technologies and specialized backend services that work together to deliver a fluid user experience.
What we learned
This project expanded our expertise in RAG architecture, knowledge graphs, vector databases, and AI API integration. We gained valuable insights into UI animation psychology and how thoughtful design can make complex medical information less intimidating. Our team developed stronger skills in Neo4j graph modeling and learned effective ways to combine vector similarity search with graph relationship queries. Most importantly, we discovered how technology can bridge information gaps in healthcare and potentially improve people's lives.
What's next for Pill Penny
We plan to expand Pill Penny with location-based pharmacy pricing comparisons, insurance coverage integration, and medication interaction warnings leveraging our knowledge graph. We're enhancing our Neo4j implementation to include deeper connections between medications, conditions, side effects, and contraindications. We're exploring adding personalized medication tracking features and developing native mobile applications. Long-term, we envision Pill Penny becoming a comprehensive medication management platform that integrates with healthcare providers' systems to offer a complete view of treatment options and their associated costs.
Built With
- api
- fda-orangebook-dataset
- flask
- framer
- gemini
- graphrag
- nadac
- next.js
- pineconevectordatabase
- python
- react
- tailwindcss
- typescript




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