Inspiration

Every year, thousands of lives are lost to impaired driving, not because people want to put others at risk, but because alcohol and fatigue severely impair self-assessment. People often feel "fine to drive" when their motor reflexes, working memory, and articulation have actually degraded significantly below normal baselines. Existing solutions like personal breathalyzers are intrusive, stigmatized, and only measure Blood Alcohol Content (BAC), failing to account for fatigue or cognitive degradation. I built SafetyAssessment around a single powerful mission: "One minute. One assessment. One safe decision. Many lives saved." Our goal was to create an instant, non-invasive, AI-powered 60-second assessment app that anyone can take on their smartphone before getting behind the wheel to make an objective, safe driving decision.

What it does

SafetyAssessment is a multi-modal web application that evaluates cognitive and motor function across 5 rapid tests in under one minute: Test 1: Object Tracking (Smooth Pursuit) – Evaluates motor coordination and tracking precision as the user keeps their finger or cursor inside a smooth Lissajous trajectory target box moving at 60 FPS. Test 2: Emoji Memory Recall – Tests short-term sequential working memory by presenting a sequence of 4 emojis that disappear after seconds, requiring exact ordered recall. Test 3: Visual Pattern Memory – Evaluates spatial memory by lighting up a 3x3 grid pattern that the user must memorize and recreate. Test 4: Voice & Articulation Test – Uses random tongue-twisters (The Silly Sailor, The Fierce Fox, etc.) recorded directly on-device. Audio is analyzed using the ElevenLabs Speech-to-Text AI Engine to detect word omissions, speech hesitation, and slurring penalties. Test 5: Signal Light Reaction Test – Tests auditory-motor reaction time using ElevenLabs Text-to-Speech voice commands ("Red Light", "Yellow Light", "Green Light"). To prevent visual cheating, all action buttons (STOP, CAUTION, GO) are stylized in uniform blue, forcing true auditory-motor processing. Upon completion, the app displays a clear verdict ("Clear to Drive" or "Avoid Driving"), a SOBER Confidence Ring, and a 5-bar performance breakdown. If impairment is detected, the app immediately provides one-tap ride-hailing shortcuts for Uber, Lyft, and Call a Friend.

How I built it

Frontend & UI/UX: Built with React, TypeScript, TailwindCSS, Vite, and Framer Motion for glassmorphic dark mode styling and micro-animations. 60 FPS Motion Physics Engine: Built a custom requestAnimationFrame physics loop using GPU-accelerated 3D transforms (translate3d) for zero-lag target tracking. Voice AI & Speech Analysis: Integrated ElevenLabs Speech-to-Text (STT) API for audio transcription and articulation scoring, backed by ElevenLabs TTS voice prompts for reaction testing. Scoring Algorithm: Created a custom weighted cognitive evaluation model (scoring.ts) that factors in tracking accuracy, recall precision, reaction speed in milliseconds, and slurring penalties to calculate an overall sobriety verdict.

Challenges I ran into

Real-time Mobile Canvas Performance: Maintaining smooth 60 FPS target pursuit on high-DPI mobile screens without React re-render lag required decoupling pointer collision tracking from state and manipulating direct DOM transforms. Speech Articulation & Slur Scoring: Distinguishing normal pauses from genuine slurring required balancing raw STT word accuracy with speech duration timers and word omission penalties.

Accomplishments that we're proud of

Seamless Multi-Modal Testing: Combining computer vision principles, auditory reaction, working memory, and Voice AI into a single 60-second test flow. ElevenLabs AI Integration: Utilizing ElevenLabs STT & TTS for real-time speech articulation analysis. Instant Alternative Transportation: Integrating immediate one-tap ride request options (Uber, Lyft, Call Friend) directly on the results screen when impairment is detected.

What I learned

Perceptual Cognitive Design: Simple visual cues can unconsciously bias test subjects. Designing neutral UI targets (like uniform blue buttons) yields far more accurate cognitive data. Multi-Modal Data Correlation: Combining motor, memory, speech, and reaction signals creates a far more holistic indicator of impairment than any single metric alone.

What's next for SafetyAssessment

Native Mobile App Deployment: Expanding from web to iOS & Android native builds using React Native or Capacitor for camera/microphone access. In-Vehicle Carplay & Android Auto Integration: Bringing prompt assessments directly to smart car infotainment screens before the engine ignites. Personal Baseline Calibration: Allowing users to establish a personal "sober baseline" profile over time for personalized sensitivity scoring.

Built With

Share this project:

Updates

Submission history