Inspiration
Medication decisions are rarely just “what’s the drug?” — they’re “what’s safe for this patient, what’s covered, what’s the best alternative, and what’s the fastest path to clarity?” In the real world, clinicians, medical reps, and patients waste time switching between fragmented sources (labels, alerts, interaction checkers, pricing portals, and human escalation). MediRep AI was inspired by that gap: make drug + reimbursement intelligence fast, explainable, and auditable — and give users a verified path to talk to a real pharmacist when needed.
What we built
MediRep AI is a full-stack medical intelligence platform that combines:
- An AI chat assistant for drug information, contraindications, interactions, and safety signals.
- A patient context/profile layer so answers can be tailored and consistent across sessions.
- A pharmacist marketplace flow (verification + booking + consult experience).
- A price comparison feature that checks multiple pharmacies and surfaces the best deal.
How we built it
- Frontend: Next.js (App Router) + React with a modern UI layer (Tailwind + Radix-style components).
- Backend: FastAPI with modular routers for chat, drugs, alerts, vision, sessions, marketplace, and pricing.
- Auth: Supabase Auth (JWT) with role-aware redirects (patient / pharmacist / admin).
- Data & APIs: Supabase Postgres for profiles/sessions; external sources (e.g., OpenFDA) for safety/label data; pharmacy price providers for price comparisons.
- RAG/AI layer: A service layer designed for retrieval + inference and session history, with guardrails for safety and structured outputs.
Challenges
- Authentication consistency across endpoints: Some endpoints require a bearer token (expensive routes like price comparisons). Ensuring every frontend request forwards the current Supabase access token reliably was critical.
- CORS & deployment realities: Production deployments require strict origin control and environment-aware configuration.
- Bot protection and availability of price providers: Pharmacy sources can block automation; we had to design provider status reporting (active/blocked) and degrade gracefully.
- Safety + trust: Drug outputs must be treated as informational, not clinical decisions. We focused on clear disclaimers, predictable behavior, and “verify before you act” UX.
What we learned
- Role-based product flows (patient vs pharmacist vs admin) are easiest when authentication, routing, and server-side verification are designed together.
- “Works locally” isn’t enough — deployment constraints (CORS, caching, offline builds, provider blocking) shape the architecture.
- The best AI UX isn’t just “answers”; it’s continuity (context + sessions), transparency, and a human escalation path.
Built With
- fastapi
- next.js
- python
- supabase
- typescript
Log in or sign up for Devpost to join the conversation.