Skip to content

chibuchi001/physiobook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸƒ PhysioBook - AI-Powered Physiotherapy Platform

PhysioBook Banner

PhysioBook is a comprehensive physiotherapy booking and management platform powered by AI. It features intelligent patient triage, smart therapist matching, outcome tracking, and real-time exercise guidance using computer vision.

✨ Features

πŸš€ Core Features

  • πŸ” Authentication via Clerk (Google, GitHub, Email & Password)
  • πŸ“… Appointment Booking System with 3-step flow
  • πŸ“© Email Notifications for bookings (Resend)
  • πŸ“Š Admin Dashboard for managing appointments
  • πŸ’³ Subscription Payments with Clerk (Free + 2 Paid Plans)
  • πŸ“‚ PostgreSQL for data persistence
  • 🎨 Tailwind CSS + Shadcn for styling
  • ⚑ TanStack Query for data fetching

🧠 AI-Powered Features

1. Intelligent Patient Intake & Triage

  • Patients describe symptoms in natural language
  • AI classifies condition type (acute, chronic, post-op, sports injury, etc.)
  • Determines urgency level (emergency to preventive)
  • Recommends appropriate specialist
  • Identifies red flags requiring immediate attention
  • Confidence scoring for transparency

2. Smart Therapist Matching

  • Matches based on patient triage data
  • Considers therapist specialties & certifications
  • Factors in availability & location preferences
  • Uses historical success rates & patient feedback
  • AI-generated personalized recommendations

3. Outcome Tracking & Progress Dashboard

  • Per-patient recovery dashboard with visual charts
  • Pain level, mobility, and function score tracking
  • Treatment plan & session notes management
  • AI-powered progress analysis
  • Predicted recovery timeline
  • Exercise compliance monitoring

4. AI Exercise Guidance with Computer Vision

  • Real-time pose detection using TensorFlow.js
  • Instant form feedback and corrections
  • Rep counting with phase detection
  • Form scoring and accuracy metrics
  • Voice feedback for hands-free exercise
  • Support for multiple exercise types

5. No-Show Prediction & Smart Scheduling

  • ML-based prediction of no-show probability
  • Risk-based reminder scheduling (SMS/Email)
  • Overbooking strategy suggestions
  • Appointment confirmation tracking
  • Historical pattern analysis

6. Tele-Physio Video Sessions

  • Secure WebRTC video calls
  • Virtual session logging
  • Screen sharing for exercise demos
  • Chat during sessions

7. Healthcare Data Compliance

  • Role-based access control
  • Audit logging for sensitive actions
  • HIPAA-compliant data handling
  • Encrypted sensitive records

πŸ› οΈ Tech Stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS + Shadcn/UI
  • Authentication: Clerk
  • Database: PostgreSQL + Prisma ORM
  • AI/ML:
    • OpenAI GPT-4 (Triage & Analysis)
    • TensorFlow.js (Pose Detection)
    • Custom ML (No-Show Prediction)
  • Email: Resend
  • Charts: Recharts
  • Data Fetching: TanStack Query
  • Video: WebRTC
  • Voice AI: Vapi (Pro plans)

πŸ“ Project Structure

physiobook/
β”œβ”€β”€ prisma/
β”‚   β”œβ”€β”€ schema.prisma      # Database schema
β”‚   └── seed.ts            # Database seeding
β”œβ”€β”€ public/                # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ (auth)/        # Auth pages
β”‚   β”‚   β”œβ”€β”€ (dashboard)/   # Dashboard pages
β”‚   β”‚   β”œβ”€β”€ api/           # API routes
β”‚   β”‚   β”œβ”€β”€ globals.css    # Global styles
β”‚   β”‚   β”œβ”€β”€ layout.tsx     # Root layout
β”‚   β”‚   └── page.tsx       # Landing page
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ dashboard/     # Dashboard components
β”‚   β”‚   β”œβ”€β”€ exercise/      # Exercise guidance
β”‚   β”‚   β”œβ”€β”€ landing/       # Landing page
β”‚   β”‚   β”œβ”€β”€ progress/      # Progress tracking
β”‚   β”‚   β”œβ”€β”€ triage/        # Triage assessment
β”‚   β”‚   └── ui/            # UI components
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ ai/            # AI services
β”‚   β”‚   β”‚   β”œβ”€β”€ triage.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ matching.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ no-show-prediction.ts
β”‚   β”‚   β”‚   └── pose-detection.ts
β”‚   β”‚   β”œβ”€β”€ prisma.ts      # Prisma client
β”‚   β”‚   └── utils.ts       # Utilities
β”‚   └── middleware.ts      # Clerk middleware
β”œβ”€β”€ .env.example           # Environment template
β”œβ”€β”€ package.json
β”œβ”€β”€ tailwind.config.ts
└── tsconfig.json

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Clerk account
  • OpenAI API key
  • Resend account

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/physiobook.git
cd physiobook
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your credentials
  1. Set up the database:
npm run db:push
npm run db:seed
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000

πŸ”§ Environment Variables

# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
CLERK_WEBHOOK_SECRET=

# Database
DATABASE_URL=

# OpenAI
OPENAI_API_KEY=

# Vapi (Voice AI)
NEXT_PUBLIC_VAPI_ASSISTANT_ID=
NEXT_PUBLIC_VAPI_API_KEY=

# Resend (Email)
RESEND_API_KEY=

# App
ADMIN_EMAIL=
NEXT_PUBLIC_APP_URL=

πŸ“Š API Endpoints

Triage

  • POST /api/triage/analyze - Analyze symptoms with AI

Therapists

  • POST /api/therapists/match - Get AI-matched therapists
  • GET /api/therapists/match - List all therapists

Booking

  • POST /api/booking - Create appointment
  • GET /api/booking - Get user's appointments

Progress

  • POST /api/progress - Log progress record
  • GET /api/progress - Get patient progress

πŸ”’ Security Features

  • HIPAA-compliant data handling
  • Role-based access control (Patient, Therapist, Admin)
  • Audit logging for all sensitive operations
  • Encrypted sensitive fields
  • Secure webhook verification

πŸ“± Subscription Plans

Feature Free Basic ($29) Pro ($79)
Appointments/month 2 10 Unlimited
AI Triage Basic Full Priority
Therapist Matching βœ“ Smart VIP
Progress Dashboard βœ“ βœ“ Advanced
SMS Reminders - βœ“ βœ“
Tele-Physio - βœ“ βœ“
AI Exercise Guidance - - βœ“
Voice Agent - - βœ“
Family Accounts - - Up to 4

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments


Built with ❀️ for DevDash 2026 Hackathon

About

PhysioBook is a medical software project focused on physiotherapy workflow automation, patient monitoring, and structured rehabilitation data management, built with scalability and clinical usability in mind.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors