Skip to content

thefiredev-cloud/MentoLoop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MentoLoop - Healthcare Mentorship Platform

License: MIT Version Next.js TypeScript HIPAA Compliant Build Status

A modern, full-stack mentorship platform built specifically for healthcare professionals, connecting nursing students and preceptors with AI-powered matching, real-time communication, and comprehensive clinical placement management.

Built with Next.js 15, Supabase PostgreSQL, Clerk authentication, AI-enhanced matching (OpenAI/Gemini), and comprehensive healthcare compliance features.

🚀 Live Demo

Production: sandboxmentoloop.online

Deployed via GitHub → Netlify. Preview environment available. Documentation lives in docs/ within this repo.

📸 Screenshots

Student Dashboard

Student Dashboard

AI-Powered Matching

AI Matching

Preceptor Management

Preceptor Dashboard

Core Healthcare Features

  • 🏥 AI-Powered Matching - MentorFit™ algorithm with OpenAI/Gemini enhancement for optimal student-preceptor pairing
  • 👩‍🎓 Student Management - Complete intake workflow with MentorFit assessment and rotation tracking
  • 👨‍⚕️ Preceptor Management - Credential verification, availability management, and student evaluation tools
  • 💬 HIPAA-Compliant Messaging - Secure real-time communication with file attachments
  • 📧 Automated Communications - SendGrid email templates and Twilio SMS for notifications
  • 📊 Clinical Hours Tracking - Comprehensive logging, approval workflow, and progress analytics
  • 🔄 Real-time Updates - Live match status, messages, and progress sync across all devices
  • 📋 Survey & Evaluation System - Post-rotation feedback and quality improvement tracking
  • 🏛️ Enterprise Support - Multi-school management with role-based access control

Technical Features

  • 🚀 Next.js 15 with App Router - Latest React framework with server components
  • ⚡️ Turbopack - Ultra-fast development with hot module replacement
  • 🎨 TailwindCSS v4 - Modern utility-first CSS with custom design system
  • 🔐 Clerk Authentication - Complete user management with role-based access
  • 🗄️ Convex Real-time Database - Serverless backend with real-time sync
  • 🧠 AI Integration - OpenAI and Google Gemini for MentorFit™ and documentation assistance
  • 📞 Third-party Integrations - SendGrid, Twilio, Stripe for communications and payments
  • 🧾 Payments Reliability - Stripe idempotency on all writes and webhook de-duplication via Convex webhookEvents
  • 🧪 Comprehensive Testing - Vitest unit tests, Playwright E2E tests, integration testing
  • 🛡️ Security & Compliance - HIPAA/FERPA compliant with audit logging
  • 📱 Responsive Design - Mobile-first approach with PWA capabilities
  • 🚢 Production Ready - Full deployment infrastructure and monitoring

Tech Stack

Frontend

  • Next.js 15 - React framework with App Router
  • TailwindCSS v4 - Utility-first CSS framework
  • shadcn/ui - Modern component library
  • Radix UI - Accessible component primitives
  • Framer Motion - Smooth animations and transitions
  • Motion Primitives - Advanced animation components
  • Lucide React & Tabler Icons - Beautiful icon libraries
  • Recharts - Data visualization components
  • React Bits - Custom animation components

Backend & Services

  • Supabase - PostgreSQL database with RLS policies and real-time subscriptions
  • Clerk - Authentication and user management
  • OpenAI - AI-enhanced matching with GPT-4
  • Google Gemini Pro - Alternative AI provider
  • SendGrid - Email automation
  • Twilio - SMS notifications
  • Stripe - Payment processing
  • Svix - Webhook validation

Development & Testing

  • TypeScript - Type safety throughout
  • Vitest - Unit testing framework
  • Playwright - End-to-end testing
  • Testing Library - Component testing
  • Turbopack - Fast build tool

Deployment & Infrastructure

  • Netlify - Primary deployment (connected to GitHub)
  • GitHub Actions - CI pipeline
  • Environment Management - Secrets in Netlify dashboard

Operations Quick Reference

Environment Variables

Secrets managed in Netlify dashboard. Required for production:

Key Description
SUPABASE_URL Supabase project URL (server-side)
NEXT_PUBLIC_SUPABASE_URL Supabase project URL (client-side)
SUPABASE_ANON_KEY Supabase anon key (server utilities/tests)
NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase anon key (client-side)
SUPABASE_SERVICE_ROLE_KEY Supabase service role key (server-side)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY Clerk publishable key
CLERK_SECRET_KEY Clerk secret key
NEXT_PUBLIC_CLERK_FRONTEND_API_URL Clerk JWT template issuer URL
STRIPE_SECRET_KEY Stripe secret key
STRIPE_WEBHOOK_SECRET Stripe webhook secret
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY Stripe publishable key
SENTRY_DSN Sentry DSN (auto-injected to client)
SENDGRID_API_KEY SendGrid API key
TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_PHONE_NUMBER Twilio credentials

Deployment

  1. Push to main → Netlify auto-builds
  2. Build runs: npm run lint, npm run type-check, npm run build
  3. Deploy succeeds if build passes
  4. Verify at https://sandboxmentoloop.online

Health Checks

  • GET /api/health - JSON response with service status
  • Expected: HTTP 200 with "status": "ok"

Getting Started

Prerequisites

  • Node.js 22 LTS
  • npm 10.9.3
  • Supabase project
  • Clerk account
  • Stripe account (test mode)
  • SendGrid account
  • Twilio account

Installation

npm install
cp .env.example .env.local

Configure .env.local:

NEXT_PUBLIC_SUPABASE_URL=your-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_FRONTEND_API_URL=https://...

NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

Development

npm run dev             # Start dev server
npm run type-check      # TypeScript validation
npm run lint            # ESLint
npm run build           # Production build
npm run test:unit:run   # Vitest
npx playwright test     # E2E tests

Architecture

Database Layer

Supabase PostgreSQL with Row Level Security policies. Service resolver pattern at lib/supabase/serviceResolver.ts routes API calls to service implementations in lib/supabase/services/.

Authentication

Clerk handles auth. Users synced to Supabase via webhook. Protected routes use middleware checking Clerk session.

Payments

Stripe checkout integration. 70/30 revenue split for preceptor compensation. Webhook validates payment events.

Key Routes

  • / - Landing page
  • /dashboard - Protected dashboard
  • /student-intake - Student onboarding flow
  • /preceptor-intake - Preceptor onboarding flow

Project Structure

├── app/                    # Next.js 15 App Router
│   ├── (landing)/          # Public landing pages
│   ├── dashboard/          # Protected dashboards
│   ├── student-intake/     # Student onboarding
│   └── preceptor-intake/   # Preceptor onboarding
├── components/
│   ├── ui/                 # shadcn/ui components
│   └── react-bits/         # Custom animations
├── docs/                   # Project documentation
│   └── reports/            # Generated reports and plans
├── lib/
│   ├── supabase/           # Database layer
│   │   ├── services/       # Service implementations
│   │   └── serviceResolver.ts  # API router
│   ├── supabase-hooks.ts   # React hooks
│   └── supabase-api.ts     # API definitions
├── scripts/                # Utility scripts
└── middleware.ts           # Route protection

Documentation

Detailed documentation, reports, and implementation plans can be found in the docs/ directory.

  • Reports & Plans: docs/reports/ contains generated reports, migration plans, and status updates.
  • Architecture: docs/architecture/ contains architectural decisions and diagrams.
  • Security: docs/security/ contains security audits and implementation guides.

Key Components

Landing Page

  • Hero Section - Animated hero with CTAs
  • Features Section - Interactive feature showcase
  • Pricing Table - Custom Clerk billing integration
  • Testimonials - Social proof section
  • FAQ Section - Common questions
  • Footer - Links and information

Dashboard

  • Sidebar Navigation - Collapsible sidebar with user menu
  • Interactive Charts - Data visualization with Recharts
  • Data Tables - Sortable and filterable tables
  • Payment Gating - Subscription-based access control

Animations & Effects

  • Splash Cursor - Interactive cursor effects
  • Animated Lists - Smooth list animations
  • Progressive Blur - Modern blur effects
  • Infinite Slider - Continuous scrolling elements

Theme Customization

The starter kit includes a fully customizable theme system. You can customize colors, typography, and components using:

Environment Variables

Local Development

See .env.example for complete list. Required:

  • Supabase URL, anon key, service role key
  • Clerk publishable key, secret key, frontend API URL
  • Stripe publishable key, secret key, webhook secret

All secrets stored in Netlify for production.

Deployment

  1. Connect GitHub repo to Netlify
  2. Configure environment variables in Netlify dashboard
  3. Push to main triggers auto-deploy

Customization

Add new service methods to lib/supabase/services/ and register in serviceResolver.ts.

Commands

npm run dev             # Development server
npm run build           # Production build
npm run type-check      # TypeScript validation (REQUIRED before commit)
npm run lint            # ESLint + semantic token validation
npm run test:unit:run   # Vitest unit tests
npx playwright test     # E2E tests

Security

  • Supabase RLS policies enforce data isolation
  • Clerk handles authentication
  • No PHI in logs
  • Audit trails via lib/supabase/services/admin.ts

🤝 Contributing

We welcome contributions from healthcare professionals, developers, and educators! Please see our Contributing Guide for detailed information.

Quick Start for Contributors

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow healthcare compliance standards (HIPAA/FERPA)
  • Write tests for new features
  • Maintain accessibility standards (WCAG 2.1 AA)
  • Use TypeScript for type safety
  • Follow existing code style and patterns

📊 Project Stats

GitHub repo size GitHub language count GitHub top language GitHub issues GitHub pull requests

🌟 Community

🏆 Acknowledgments

  • Healthcare Professionals: Thank you to the nurses and educators who provided feedback
  • Open Source Community: Built on the shoulders of amazing open source projects
  • Beta Testers: Early adopters who helped shape the platform
  • Nursing Schools: Partner institutions who supported development

License

MIT License


Next.js 15 • Supabase • Clerk • Stripe • SendGrid • Twilio

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •