A modern web-based SaaS healthcare platform that centralizes healthcare services for patients and administrators. Users can book appointments, manage subscriptions, and interact with an AI voice assistant for healthcare queries.
- Fully responsive UI with gradients and professional 3D illustrations.
- Hero section featuring a friendly 3D healthcare assistant.
- Dedicated sections:
- How It Works
- About Platform
- What to Ask
- Pricing
- Contact
- Emergency guidance access.
- Consistent SaaS branding across pages.
- Secure authentication via Clerk:
- Email & Password
- GitHub
- Email verification via 6-digit OTP.
- Role-based access control:
- Users: Book, reschedule, cancel appointments, manage profile, use AI.
- Admins: Full system control including analytics and management tools.
- Protected routes (Dashboard, Appointments, Voice, Pro, Admin).
- 3-Step Booking Flow:
- Select Doctor
- Choose Service & Time
- Confirm Appointment
- Real-time booked slot handling per doctor & date.
- Appointment statuses:
PENDINGCONFIRMEDCOMPLETEDCANCELLED
- Users can:
- View upcoming appointments
- Cancel appointments
- Reschedule using next 5 available days & time slots
- Admins can:
- Confirm appointments
- Mark as completed
- Cancel or re-open appointments
- Comprehensive admin dashboard with:
- Total doctors
- Active doctors
- Total appointments
- Completed appointments
- Advanced analytics:
- Appointments trend (last 7 days)
- Status breakdown (Confirmed, Pending, Completed, Cancelled)
- Top doctors by bookings
- Search & filter system for appointments.
- Real-time appointment status management.
- Voice AI powered by Vapi.
- Handles user queries about:
- Booking appointments
- Subscription plans
- Doctors & specialties
- Platform usage
- Designed for healthcare-specific conversations.
- Includes emergency redirection guidance.
- Basic and Premium subscription plans.
- Secure subscription handling via Clerk.
- Smart subscription upgrades.
- Automated invoice notifications via email.
- Billing management inside user profile.
- Dynamic greeting based on time of day.
- Profile view button with image preview.
- Upcoming appointment summary.
- Quick access to:
- Book appointment
- Voice assistant
- Subscription management
- Clean and user-friendly interface.
- Email system powered by Resend.
- Automatic emails for:
- Appointment confirmations
- Contact inquiries
- Subscription-related updates
- Professional email templates with healthcare styling.
- Dedicated emergency page.
- Clear guidance for urgent health situations.
- Platform disclaimer for non-emergency services.
- 112 (Nepal) emergency call instruction.
- Built with:
- Next.js (App Router)
- React
- Tailwind CSS
- Shadcn UI
- Data management using TanStack Query.
- PostgreSQL database via Neon.
- Prisma ORM for database management.
- Clean server/client component architecture.
- Dedicated mobile card view for appointments.
- Responsive admin interface.
- Optimized UI interactions across all devices.
- Patients / Healthcare consumers
- Administrators
- Role-based access control ensures data privacy.
- Secure authentication with Clerk and email verification.
- Appointment confirmations
- Subscription invoices
- Contact inquiries
- Node.js >= 18
- npm or yarn
- PostgreSQL or Neon database
- Clerk account for authentication
- Resend account for email services
# Clone the repository
git clone https://github.com/yourusername/saas-healthcare-platform.git
cd saas-healthcare-platform
# Install dependencies
npm install
#Create .env file and add your environment variables
#Example .env:
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public"
CLERK_FRONTEND_API="your_clerk_frontend_api"
CLERK_API_KEY="your_clerk_api_key"
RESEND_API_KEY="your_resend_api_key"
VAPI_API_KEY="your_vapi_api_key"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev --name init
# Optional: Seed the database
npm run seed
# Run development server
npm run dev
PRs are welcome! CodeRabbit assists with automated PR review & optimization.