FirstPulse is an innovative training platform for emergency responders, simulating critical 999/911 calls to develop and assess response skills. The system creates realistic emergency scenarios with AI-powered callers, enabling responders to practice handling high-pressure situations without real-world consequences.
-
Realistic Emergency Scenarios: Three distinct emergency simulations with unique challenges:
- John Smith: Elderly patient with chest pain and difficulty breathing
- Sarah Johnson: Unconscious teenager with suspected alcohol poisoning
- Michael Chen: Multi-vehicle collision with trapped driver showing internal bleeding
-
AI-Powered Simulations: Leverages ElevenLabs voice AI to create realistic caller interactions that respond dynamically to the trainee's questions and instructions
-
Performance Analysis: Comprehensive evaluation of each call using OpenAI, providing detailed feedback on:
- Information gathering effectiveness
- Response appropriateness and efficiency
- Areas of strength and improvement
- Pass/fail determination with specific recommendations
-
Real-Time Status Tracking: Visual indicators show each scenario's status:
- "to be completed" - Ready for training
- "in call" - Currently in progress
- "passed" - Successfully completed
- "failed" - Requires improvement
FirstPulse consists of two main components:
- Frontend Application: Next.js web interface for scenario selection, call initiation, and results display
- Outbound Service: Backend service handling Twilio calls, ElevenLabs voice interactions, and OpenAI analysis
- Node.js (v16+)
- NPM or Yarn
- Twilio account with phone number
- ElevenLabs API access (with agent ID)
- OpenAI API key
-
Clone the repository
git clone https://github.com/yourusername/FirstPulse.git cd FirstPulse/frontend -
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env.local
Edit
.env.localwith your specific configuration -
Start the development server
npm run dev
-
Navigate to the outbound directory
cd ../outbound -
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env
Edit
.envwith your Twilio, ElevenLabs, and OpenAI credentials -
Start the outbound service
npm start
- Access the frontend application (typically at
http://localhost:3000) - Select a training scenario by clicking on one of the three cases
- Enter a valid phone number with country code (e.g., +447123456789)
- Click "Submit" to initiate the training call
- Answer the incoming call and respond to the emergency scenario
- After the call concludes, the system will analyze the interaction
- View your results and performance feedback in the scenario panel
# API URL for the outbound service
OUTBOUND_CALL_API_URL=https://your-ngrok-url-here.ngrok-free.app
# Optional: Analytics and monitoring
NEXT_PUBLIC_ANALYTICS_ID=
# Server configuration
PORT=8000
FRONTEND_URL=http://localhost:3000
# Twilio credentials
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+1234567890
# ElevenLabs configuration
ELEVENLABS_API_KEY=your_elevenlabs_api_key
ELEVENLABS_AGENT_ID=your_elevenlabs_agent_id
# OpenAI configuration
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-4-turbo
- Frontend: Built with Next.js and Tailwind CSS
- API Routes: Next.js API routes handle proxy communication to the outbound service
- State Management: React useState/useEffect for component state
- Polling: Regular checks for analysis updates from completed calls
- Phone Number Format: Ensure phone numbers include the country code (e.g., +44 for UK)
- CORS Issues: If experiencing CORS errors, check that the outbound service has proper CORS headers
- Call Not Connecting: Verify Twilio credentials and phone number configuration
- Analysis Not Appearing: Check server logs for errors in the analysis process
- Built with Next.js, Tailwind CSS, and TypeScript
- Voice AI powered by ElevenLabs
- Call technology by Twilio
- Analysis powered by OpenAI
© 2025 FirstPulse Training
