Inspiration As Muslims, we perform salah (prayer) five times a day over 1,800 times a year. Yet many of us, especially new Muslims or those who learned prayer at a young age, may have unknowingly developed incorrect postures that we've carried for years.
Traditional learning relies on watching others at the masjid or having someone physically correct you, but this isn't always accessible. We asked: What if AI could be your personal prayer coach?
NamazVision was born from the desire to use modern technology to help Muslims perfect one of the five pillars of Islam in the privacy of their own homes.
What it does NamazVision uses your webcam and AI-powered pose detection to analyze your prayer postures in real-time. It:
Detects prayer positions (Standing, Ruku, Sujood, Sitting) Provides instant feedback on posture alignment via visual cues and audio guidance Tracks progress through each rakat with a step-by-step checklist Shows Qibla direction using your device's geolocation Guides timing to ensure proper hold duration for each position How we built it The application is built as a single-page React app using Vite for fast development. The core AI functionality uses Google's MediaPipe Pose model, which detects 33 body landmarks in real-time directly in the browser—no server required.
For posture analysis, we calculate angles between key joints, the Qibla compass uses the Haversine formula to calculate bearing
Tech Stack:
React + Vite Tailwind CSS + HeroUI MediaPipe Pose (TensorFlow.js) Framer Motion for animations Sonner for notifications Web Speech API for audio feedback Challenges we faced Pose detection accuracy: Different camera angles, lighting conditions, and clothing can affect landmark detection. We had to tune confidence thresholds and add smoothing to reduce jittery feedback.
Defining "correct" posture: Prayer postures vary slightly between madhabs (schools of thought). We focused on universally accepted fundamentals while keeping the system flexible for future madhab-specific modes.
Real-time performance: Running ML inference in the browser while maintaining 30fps was challenging. We optimized by reducing detection frequency during stable poses and using Web Workers where possible.
User experience: Balancing helpful feedback without being annoying was tricky. Too many corrections feel overwhelming; too few feel useless. We implemented cooldowns and prioritized the most critical corrections.
What we learned Accessibility matters: Many Muslims with physical limitations could benefit from understanding what modifications are acceptable in prayer Privacy-first AI: By running entirely in the browser, users don't have to worry about video being sent to servers The intersection of faith and technology: Technology can be a tool for worship when built with intention and respect
What's next for NamazVision Madhab-specific guidance (Hanafi, Shafi'i, Maliki, Hanbali) Mobile app with device orientation for more accurate Qibla Learning mode for new Muslims with step-by-step tutorials Prayer time integration with adhan notifications Community features for parents/teachers to guide learners remotely
"And establish prayer. Indeed, prayer prohibits immorality and wrongdoing." — Quran 29:45
Log in or sign up for Devpost to join the conversation.