ComingUp ComingUp
M

MedStudy — AI-Powered Medical Study Platform

AI study platform: upload any PDF, get instant quizzes, flashcards & analytics.

Posted on behalf of the maker

Is this your project? Ask us to take it down

Mar 12, 2026 Other

About

Overview

A full-stack web application designed for medical students to study smarter using AI-powered question generation, spaced repetition, collaborative study rooms, and detailed performance analytics. Built as a complete SaaS-ready product.

Codebase Stats

  • 165 files | ~20,000 lines of TypeScript/TSX
  • 25+ API routes | 18 pages | 20+ database tables
  • Fully deployed on Railway with persistent SQLite storage

Tech Stack

LayerTechnology

Framework Next.js 16 (App Router, Server Components)

Language TypeScript (strict)

Database SQLite via better-sqlite3 + Drizzle ORM

AI Engine Groq SDK (LLaMA 3.3 70B) — JSON mode + streaming

Styling Tailwind CSS 4 + shadcn/ui (Radix primitives)

Auth Custom JWT (jose) + bcrypt password hashing

Email Resend (password reset flows)

Charts Recharts

Deployment Railway (auto-deploy from GitHub)

Core Features

1. AI Question Generation (5 Types)

  • MCQ — Multiple choice with explanations
  • Flashcards — Front/back with card types (definition, mechanism, clinical, mnemonic)
  • Fill in the Blank — With alternative accepted answers
  • Short Answer — AI-evaluated with key points scoring
  • Clinical Cases — Full scenario + examination + investigations + rationale

All generated from uploaded content with configurable:

  • Difficulty (easy/medium/hard)
  • Count (3–30 per type)
  • Focus topic filtering
  • Page range selection (for multi-lesson PDFs)

2. Content Library

  • PDF upload with automatic text extraction
  • MCQ Bank PDF import — AI parses existing exam papers into structured questions
  • YouTube video import — transcript extraction + question generation
  • Per-source question management with delete capability
  • Subject/topic auto-detection

3. Study Sessions

  • Mixed activity types in a single session
  • Real-time scoring and progress tracking
  • Question flagging during exams
  • Session summary with score breakdown
  • XP rewards on completion

4. AI Tutor (Chat)

  • Streaming chat interface
  • Personalized system prompt built from:
  • User's weak topics (from analytics)
  • Wrong answer history
  • Uploaded content context
  • Contextual medical explanations

5. Spaced Repetition (SM-2 Algorithm)

  • Automatic card scheduling based on recall quality
  • Due card queue with review interface
  • Stats dashboard (cards due, reviewed, retention rate)

6. Exam Lab

  • Upload doctor's past exams → AI analyzes the exam style
  • Generate new questions that mimic the professor's style
  • Exam profiles saved per professor
  • Timed exam mode with flagging

7. AI Lesson Generator

  • Enter any medical topic → AI generates a full structured lesson:
  • Overview, multiple sections, summary, clinical relevance
  • AI-generated SVG diagrams for visual learning
  • In-lesson AI chat for Q&A

8. Question Folders

  • Create custom folders (with color coding)
  • Save any question to folders during study sessions
  • "Study All" — start a session from folder contents
  • Rename, recolor, delete folders

9. Wrong Answers Review

  • Dedicated page listing all incorrectly answered questions
  • "Quiz on All" — retry only the questions you got wrong
  • Tracks improvement over time

10. Analytics Dashboard

  • Performance line chart — score trends over time
  • Subject radar chart — strengths/weaknesses visualization
  • Topic breakdown bar — per-topic accuracy
  • Weakness remediation — AI-suggested topics to focus on

11. Study Plan

  • Calendar-based daily study planner
  • Assign sources + activity types per day
  • Track plan completion
  • Integrated with dashboard "Today's Plan" card

12. Collaborative Study Rooms

  • Create/join rooms with invite codes
  • Real-time group chat (polling-based)
  • Per-member study timer
  • Voice chat (WebRTC signaling)
  • Admin controls (mute members)

13. Social Features

  • Friends system — send/accept requests by username
  • Direct messaging — real-time chat with friends
  • User profiles — name, username, bio

14. Gamification (Valorant-Style Ranking)

  • 24-level ranking system: Unranked → Iron 1-3 → Bronze 1-3 → Silver 1-3 → Gold 1-3 → Platinum 1-3 → Diamond 1-3 → Immortal 1-3 → Radiant → Professor
  • XP earned from: correct answers, session completion, perfect scores, exams
  • Professor rank requires 100,000 XP (extremely hard)
  • Progress bar showing XP to next rank

15. Streak System

  • Daily study streak tracking
  • Visual streak widget on dashboard
  • Encourages consistent study habits

16. Summaries (Whiteboard)

  • Create text/canvas summaries for topics
  • AI evaluation — scores your summary completeness
  • Subject/topic tagging

17. Admin Panel

  • User management overview

Database Schema (20 tables)

users · content_sources · questions · study_sessions · session_responses · study_plan_items · streak_records · topic_performance · sr_cards · study_goals · user_xp · exam_profiles · lessons · summaries · study_rooms · room_members · room_messages · voice_signals · password_reset_codes · friend_requests · friendships · direct_messages · doctor_pdfs · question_folders · folder_questions

Authentication & Security

  • Custom JWT-based auth (no third-party auth provider dependency)
  • bcrypt password hashing
  • Email verification / password reset via Resend
  • Per-user data isolation (all queries scoped to userId)
  • Cascade deletes for data integrity

Deployment

  • Platform: Railway (one-click deploy from GitHub)
  • Database: SQLite with persistent volume mount
  • Migrations: Drizzle auto-migration on startup (prestart script)
  • Cost: Minimal — SQLite = no separate DB service needed

Monetization Potential

  • Freemium model: Free tier (limited generations) + Pro tier (unlimited)
  • Per-university licensing: Customize for specific curricula
  • MCQ Bank marketplace: Students share/sell question banks
  • Group subscriptions: Study room features for study groups
  • API access: Sell the AI generation engine as an API

Competitive Advantages

  1. All-in-one — replaces Anki + Quizlet + Notion + Discord study servers
  2. AI-native — every feature is AI-powered, not bolted on
  3. Exam-style matching — unique feature that mimics specific professors
  4. Zero vendor lock-in — SQLite, self-hostable, no proprietary services
  5. Medical-specific — prompts tuned for clinical content, not generic
  6. Low infrastructure cost — SQLite + Groq (free tier available)

Comments (0)

No comments yet. Be the first to comment!