Prerequisites
Before you begin, make sure you have:- Node.js version 18 or higher (Download here)
- npm or yarn package manager (comes with Node.js)
- A Supabase account (Sign up free)
- An Anthropic API key from the Anthropic Console for Claude
The application uses Claude Sonnet 4 for all AI-powered features.
Installation
Clone and Install Dependencies
Clone the repository and install all required packages:This will install all frontend and backend dependencies including:
- React 18 and Vite for the frontend
- Express.js for the backend API
- Anthropic SDK for Claude AI integration
- Supabase client for authentication and database
Set Up Supabase Database
Create a new Supabase project and set up the required tables:
Create Database Tables
Run these SQL commands in your Supabase SQL Editor:These tables support real-time subscriptions. The application automatically refreshes when data changes.
Configure Environment Variables
Copy the example environment file and add your credentials:Edit
.env and add your configuration:Create Nurse Accounts
Add nurses to your database and create authentication accounts:This endpoint will:
Option 1: Manually Add Nurses
Insert nurse records in your Supabase SQL Editor:Option 2: Create Auth Accounts
After adding nurses to the database, create Supabase Auth accounts for them:- Create Supabase Auth accounts for all nurses in your database
- Link auth users to nurse records via
auth_user_id - Return temporary passwords for each created account
- Skip nurses that already have accounts
The temporary passwords should be changed on first login. The endpoint requires
SUPABASE_SERVICE_KEY in your .env file.Start the Application
Start both the backend server and frontend development server:This runs both services concurrently:You should see:
- Backend API: http://localhost:3001
- Frontend UI: http://localhost:5173
You can also run them separately with
npm run server and npm run dev in different terminals.Verify Everything is Working
Check the server status:Generate Your First Handoff Note
Now let’s create your first AI-powered handoff note!Log In
- Open http://localhost:5173 in your browser
- Log in with a nurse account email and password
- You’ll be redirected to the dashboard
Use the email and temporary password from the account creation step.
View Patient List
From the dashboard:
- Click on any patient card to open their detailed view
- You’ll see:
- Patient demographics and vital signs
- Medication list and allergies
- Tasks and their completion status
- Previous handoff notes (if any)
If you don’t see any patients, you’ll need to add patient data to your Supabase
patients table first.Generate Handoff Notes from Record
In the patient detail view:
- Click “Generate from Record”: The AI will analyze the patient data
- Wait for Generation: Takes 3-5 seconds
- Review the Notes: Claude AI generates structured handoff including:
- Patient overview and shift forecast
- Current clinical status and vital signs
- Key lab/imaging findings and trends
- Active medications and treatments
- Task status (completed vs. outstanding)
- Safety concerns and alerts
Patient Data Flow
The AI uses Claude Sonnet 4 (
claude-sonnet-4-20250514) which excels at medical terminology and trend analysis.Upload Handoff Image (Optional)
To enhance your handoff with whiteboard or document images:
- Click “Upload Handoff Image”
- Select an image: JPG, PNG, or other image format (max 10MB)
- Analyze: The AI extracts information from the image
- Merge: Click “Generate from Record” again to combine image analysis with patient data
Image Analysis Flow
Edit and Save
Customize the AI-generated notes:The handoff notes are saved with:
- Click “Edit”: Opens the notes in edit mode
- Make Changes: Add clinical judgment, clarify details, or update information
- Click “Save”: Stores notes to the patient record
- Copy: Use the “Copy” button to share with your team
Save Handoff Notes
- Current timestamp for version tracking
- Both handoff notes and image analysis (if provided)
- Automatic update to
updated_atfield
Real Usage Example
Here’s how the components work together:Key API Endpoints Reference
These are the main endpoints you’ll interact with:| Endpoint | Method | Description |
|---|---|---|
/api/health | GET | Check server status and available AI providers |
/api/analyze-image/claude | POST | Analyze handoff whiteboard/document image with Claude |
/api/summarize-record/claude | POST | Generate handoff notes from patient record with Claude |
/api/patients | GET | Get all patient records with room and task info |
/api/patients/:id | GET | Get single patient record by MRN |
/api/patients/:id/handoff | POST | Save handoff notes for a patient |
/api/patients/:id | PATCH | Update patient information |
/api/tasks/:id | PATCH | Update task completion status |
/api/nurses | GET | Get all nurses |
/api/nurses/create-accounts | POST | Create Supabase Auth accounts for nurses |
All endpoints run on
http://localhost:3001 by default. Change the port with the PORT environment variable.Troubleshooting
”API is not configured” Error
Make sure you have added your Anthropic API key to your.env file:
Server Not Starting
Check if port 3001 is already in use:Images Not Analyzing
Ensure your image:- Is under 10MB (file size limit)
- Is in a supported format (JPG, PNG, WebP, etc.)
- Contains visible text or information
No Patients Showing
Add sample patient data to your Supabase database:Next Steps
Now that you’ve generated your first handoff note, explore more features:- Task Management: Mark tasks as completed from the patient detail view
- Route Planning: Use the Route view to optimize your rounds
- Team Coordination: View nurse assignments in the Schedule view
- Activity Logs: Track all system events in the Logs view
- Risk Filtering: Filter patients by risk level (critical, high, medium, low)
- My Patients View: Toggle to see only your assigned patients
API Documentation
Explore all available API endpoints and request/response formats.
Features Guide
Learn about all the features and capabilities of Nurse Handoff Helper.
