A full-stack medical appointment platform with patient booking, doctor dashboards, subscription plans for doctors, Stripe payments, and Medi โ an AI assistant for patient data management.
Healthcare providers waste significant time on manual scheduling, patient record lookup, and billing. Patients struggle to book appointments with specific specialists and track their medical history in one place.
Built a full-stack Next.js application with Prisma and PostgreSQL for relational data, a custom JWT authentication system, Stripe for doctor subscription plans, and a Medi AI chatbot that helps doctors filter and query patient records in natural language.
Next.js App Router with middleware-based route protection checking the JWT role claim. Three dashboard experiences: patient (booking, history), doctor (patient list, schedule, Medi AI), admin (platform analytics). shadcn/ui provides consistent UI components across all portals.
Custom JWT-based authentication issues signed tokens on login, validated on every protected API route. Prisma ORM manages all database queries. Stripe handles doctor subscription billing โ webhooks update the subscription status in PostgreSQL. Resend sends appointment confirmations and reminders. Medi AI calls the OpenAI API with a structured system prompt that includes patient data context.
PostgreSQL via Prisma. Schema: users (patient | doctor | admin roles), appointments, patientRecords, doctorProfiles, subscriptions (Stripe-synced), and aiChatSessions.