โโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโโโโโโโโโ โโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ โโโโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโ
โโโ โโโโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโ
โโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโ โโโโ โโโ
โโโโโโโ โโโ โโโโโโโโโโ โโโ โโโ โโโ โโโ
+ MAITRI AI
"Most digital platforms treat users as data sources. MAITRI treats them as human beings."
๐ About ยท โจ Features ยท ๐ ๏ธ Tech Stack ยท โก Quick Start ยท ๐ Architecture ยท ๐ Metrics ยท ๐ฅ Team
Two deeply human problems. One platform. Built in Bharat. ๐ฎ๐ณ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ ORBITX โ
โ โ
โ Space knowledge is scattered across hundreds of sources. โ
โ Students waste hours jumping between NASA, Wikipedia, โ
โ and random videos โ and still miss critical information. โ
โ โ
โ OrbitX unifies planets, missions, telescopes, and space โ
โ technology into one authenticated, AI-guided platform. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ค MAITRI AI โ
โ โ
โ Every wellbeing tool just logs data. It watches you. โ
โ It records you. But it never speaks to you. It never cares. โ
โ โ
โ MAITRI watches through your webcam in real time, understands โ
โ how you feel, and responds like a warm companion โ in your own โ
โ language, with music that matches your mood. โ
โ 9 Indian languages. Powered by Gemini AI. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| # | Problem | Reality Today | Our Answer |
|---|---|---|---|
| 1 | ๐ Space Education | Knowledge across hundreds of scattered sources | OrbitX โ unified, AI-guided learning hub |
| 2 | ๐ค Wellbeing Monitoring | Tools that log but never respond | MAITRI โ responds, speaks, and truly cares |
| 3 | ๐ฃ๏ธ Language Barrier | No Indian-language AI wellbeing support | Built-in support for 9 Indian languages |
| 4 | ๐ด Fatigue Detection | Ignored entirely by existing tools | Real-time eye-blink tracking + blink-rate analytics |
| Feature | Description |
|---|---|
| ๐ช Unified Knowledge | Planets, missions, telescopes, and space tech โ all in one place |
| ๐ Secure Auth | PHP + bcrypt hashing + SQL injection-safe prepared statements |
| ๐ Live Dashboard | Mission analytics, satellite stats, planet overview, activity feed |
| ๐ Achievements | Gamified milestones โ First Launch, Earth Observer, Deep Space Scout |
| ๐ก Mission Tracker | Active, planned, and historic missions with real-time status |
| ๐ Reports | Downloadable scientific reports and archived documents |
| ๐ Dark Mode | Seamless dark / light theme toggle |
| Feature | Description |
|---|---|
| ๐ญ Emotion Detection | 7-class real-time facial emotion via DeepFace + Haar Cascade, 87% accuracy |
| ๐ด Fatigue Detection | Eye-blink timer + blink-rate (BPM) analytics โ Drowsy (3s) โ Fatigued (6s) |
| ๐ Baseline Calibration | Motion detector calibrates to each user's natural fidget level (no false alarms) |
| ๐ Behaviour Analysis | Rolling-average smoothed frame differencing โ Calm / Restless / Hyperactive / Inactive |
| ๐ฃ๏ธ Voice Response | Always-on empathetic TTS via pyttsx3 (female voice, 145 WPM) |
| ๐ต Music Recommendations | Emotion-matched songs across 9 Indian languages + YouTube & Spotify links |
| ๐ด Alert System | Severity-graded alerts โ INFO / CAUTION / WARNING / CRITICAL โ with speak-friendly TTS text |
| ๐ก๏ธ Echo Guard | Prevents MAITRI's own voice from being transcribed as user input |
| ๐ Session Reports | .txt + .json + .csv logs + Matplotlib PNG graph (auto-generated) |
| ๐ Wellbeing Score | 0โ100 score derived from emotion distribution across the full session |
| โก WebSocket | Real-time data streaming to frontend โ no page refresh needed |
| ๐ Voice Loop | Continuous listen โ transcribe โ respond โ repeat, with back-off on errors |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ORBITX + MAITRI AI โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Frontend โ HTML5 ยท CSS3 ยท JavaScript ES6 โ
โ โ Orbitron ยท Share Tech Mono ยท Chart.js ยท SocketIO โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Backend โ Flask 3.0 ยท Flask-SocketIO ยท PHP 8.0 โ
โ โ pyttsx3 ยท SpeechRecognition ยท WebSocket โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Database โ MySQL 8.0 ยท mysqli Prepared Statements โ
โ โ PHP Session Auth ยท bcrypt password hashing โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ AI / ML โ DeepFace ยท OpenCV ยท Haar Cascade โ
โ โ Gemini 1.5 Flash (primary AI) โ
โ โ Groq Llama 3.1 (fallback) ยท GPT-4o-mini (fallback) โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Platform โ Python 3.11 ยท NumPy ยท Matplotlib โ
โ โ Threading ยท UUID ยท Watchdog ยท Dataclasses โ
โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
space-explorer-ai-wellbeing/
โ
โโโ ๐๏ธ assets/ โ Images, videos, logos
โ
โโโ ๐ auth/
โ โโโ login.html โ Space-themed login page
โ โโโ login.php โ Secure PHP auth (prepared statements)
โ โโโ auth.css
โ
โโโ ๐ dashboard/
โ โโโ dashboard.html โ Full SPA dashboard
โ โโโ dashboard.css
โ โโโ dashboard.js โ Charts, modals, theme toggle
โ โโโ getprofile.php โ User profile JSON API
โ
โโโ ๐ explore/
โ โโโ explore.html โ Space exploration section
โ โโโ explore.css
โ
โโโ ๐ home/
โ โโโ home.html โ Main home page
โ โโโ script.js โ Nav, FAQ, scroll reveal
โ โโโ style.css
โ
โโโ ๐ signup/
โ โโโ signup.html โ Registration with OTP field
โ โโโ signup.php โ PHP signup + bcrypt handler
โ
โโโ ๐ค MAITRI_AI/
โ โโโ app.py โ Flask v5.0 backend + SocketIO server
โ โโโ MAITRI_AI.html โ Real-time AI frontend panel
โ โโโ Pys/
โ โโโ ai_responder.py โ Gemini / Groq / OpenAI + 9-language music DB
โ โโโ vision_module.py โ DeepFace emotion detection
โ โโโ fatigue_detector.py โ FatigueDetector class + blink-rate BPM
โ โโโ behavior_detector.py โ Calibrated, smoothed motion classifier
โ โโโ audio_module.py โ Noise-cached mic + record_and_transcribe()
โ โโโ voice_output.py โ pyttsx3 TTS (dedicated daemon thread)
โ โโโ alert_system.py โ Severity-graded structured alert engine
โ โโโ report.py โ TXT + JSON + CSV + graph ReportBundle
โ โโโ emotion_graph.py โ Dual-subplot Matplotlib PNG generator
โ โโโ requirements.txt
โ
โโโ ๐๏ธ database/
โ โโโ orbitx_db.sql โ Full MySQL database export
โ
โโโ ๐ landingpge.html โ Cinematic video landing page
โโโ .gitignore
โโโ LICENSE โ MIT License
โโโ README.md
- XAMPP โ Apache + MySQL
- Python 3.11+
- One free API key โ Gemini recommended
git clone https://github.com/ivengexnce/space-explorer-ai-wellbeing.git
cd space-explorer-ai-wellbeing# 1. Start XAMPP โ Apache + MySQL
# 2. Open: http://localhost/phpmyadmin
# 3. Create a database named: orbitx_db
# 4. Click Import โ select database/orbitx_db.sql โ Go# Windows
xcopy /E /I . C:\xampp\htdocs\OrbitX
# macOS / Linux
cp -r . /opt/lampp/htdocs/OrbitX
# Open in browser
http://localhost/OrbitX/landingpge.htmlcd MAITRI_AI
# Set your Gemini API key โ FREE at makersuite.google.com
export GEMINI_API_KEY=your_key_here # macOS / Linux
set GEMINI_API_KEY=your_key_here # Windows CMD
$env:GEMINI_API_KEY="your_key_here" # Windows PowerShell
# Install Python dependencies
pip install -r Pys/requirements.txt
# Start the AI server
python app.pyhttp://localhost/OrbitX/MAITRI_AI/MAITRI_AI.html
โ Allow camera and microphone when prompted. MAITRI will greet you and ask your music language preference. ๐ธ
Only one key is required. The system auto-detects and falls back gracefully.
| Provider | Tier | Link |
|---|---|---|
| Gemini 1.5 Flash | โ Free | makersuite.google.com |
| Groq Llama 3.1 | โ Free | console.groq.com |
| GPT-4o-mini | platform.openai.com |
MAITRI detects your language preference from speech or a modal on first launch:
| Language | Example Artists |
|---|---|
| ๐ต Hindi / Bollywood | Arijit Singh, A.R. Rahman, Atif Aslam |
| ๐ต Punjabi / Bhangra | Diljit Dosanjh, Guru Randhawa |
| ๐ต Tamil / Kollywood | Anirudh Ravichander, Harris Jayaraj |
| ๐ต Telugu / Tollywood | Sid Sriram, M.M. Keeravani |
| ๐ต Marathi | Ajay-Atul, Swapnil Bandodkar |
| ๐ต Bengali / Bangla | Anupam Roy, Rabindranath Tagore |
| ๐ต Kannada | Santhosh Narayanan |
| ๐ต Malayalam | Vidyasagar |
| ๐ต English / International | The Weeknd, Coldplay, ABBA |
Every recommendation includes a YouTube and Spotify deep-link.
| Metric | Result |
|---|---|
| ๐ญ Emotion Detection Accuracy | 87% (DeepFace + OpenCV) |
| โก Detection Latency | < 450 ms per frame (hard-timeout guarded) |
| ๐ Languages Supported | 9 Indian + English |
| ๐ Security | OWASP Top-10 tested โ 0 vulnerabilities |
| ๐ Concurrent Sessions | Multi-session via threading + watchdog |
| โฑ๏ธ TTS Response Time | < 1 second (pyttsx3 daemon thread) |
| ๐ Session Reports | TXT + JSON + CSV + PNG graph auto-generated |
| ๐ Motion Calibration | First 8 frames โ personal baseline (no false alarms) |
User Browser
โ
โโโ OrbitX (PHP + MySQL)
โ โโโ Landing โ Login โ Dashboard โ Explore โ Profile
โ
โโโ MAITRI AI Panel (HTML + WebSocket)
โ
โโโ Flask Server (app.py v5.0)
โ
โโโ Watchdog Thread โ stale/degraded session detection
โ
โโโ Vision Module โ DeepFace โ Emotion Label + Confidence
โโโ Fatigue Detector โ Eye-blink BPM โ Awake/Drowsy/Fatigued
โโโ Behaviour Detector โ Calibrated Frame Diff โ Calm/Restless/...
โ
โโโ AI Responder โ Gemini / Groq / GPT-4o-mini
โ โโโ Music Picker โ 9-language DB + YouTube + Spotify links
โ
โโโ Alert System โ Severity-graded structured alerts
โโโ Voice Output โ pyttsx3 daemon TTS + Echo Guard
โโโ Audio Module โ Noise-cached mic โ Google STT โ Sphinx fallback
โ
โโโ Report Generator โ TXT + JSON + CSV + Matplotlib PNG + Wellbeing Score
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
fullName VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
phone VARCHAR(20),
password VARCHAR(255) NOT NULL, -- bcrypt hashed
avatar VARCHAR(255),
bio TEXT,
dob DATE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);A full pass was made over every Python module to improve robustness, data richness, and developer experience:
- Structured dict return (
severity,code,message,speak) instead of a bare string - Four severity tiers: INFO / CAUTION / WARNING / CRITICAL
- New detection: rapid mood oscillation and positive streak recognition
alert_speak()helper returns TTS-friendly text with no jargon
- Baseline calibration โ first 8 frames build a personal movement baseline
- Rolling average (deque 10) majority-vote smoothing kills false "Hyperactive" flashes
- Returns a structured dict (
label,movement,smoothed,calibrated) - Thread-safe with a dedicated lock;
reset_calibration()for camera switches
FatigueDetectorclass โ proper per-session state isolation- Blink-rate (BPM) tracking across the whole session
- Structured dict return (
level,eyes_visible,elapsed_sec,blink_count,blinks_per_min) - Module-level singleton +
detect_fatigue_full()for backward-compatible upgrade path
- Noise-profile caching โ
adjust_for_ambient_noiseruns once per process, not every listen (saves ~400ms per call) record_audio()returns a dict (audio,success,reason) instead of bareAudioDataspeech_to_text()returns(text, source)tuple so you always know if Google or Sphinx answeredrecord_and_transcribe()one-call convenience wrapper for the voice loopreset_noise_calibration()for environment changes
- CSV export alongside TXT + JSON โ ready for Excel / pandas analysis
- Wellbeing score (0โ100) derived from emotion-weighted log
- Auto-generates PNG graph by calling
emotion_graph.plot_emotions()on save - Returns
ReportBundledataclass with all paths and summary data
- Non-blocking โ uses
matplotlib.use("Agg")backend, never callsplt.show() - Dual subplot: emotion timeline scatter + pie chart of distribution
- Color-coded per-emotion (green = happy, cyan = neutral, red = angry โฆ)
- Saves PNG to
reports/and returns the path - Dark-theme styling to match the MAITRI UI
| Issue | Fix |
|---|---|
| DeepFace install fails | pip install deepface tensorflow --upgrade โ use Python 3.7โ3.10 |
| Microphone not working | Check OS permissions; select correct input device |
| No audio from pyttsx3 | Settings โ Speech โ Add voices; restart after installing |
| Camera not detected | Allow camera permissions; HTTPS required in deployed environments |
| Database connection fails | Ensure MySQL is running in XAMPP; check credentials in login.php |
| Emotion graph blank | pip install matplotlib if not already installed |
# Fork the repo on GitHub
git clone https://github.com/YOUR_USERNAME/space-explorer-ai-wellbeing.git
git checkout -b feature/AmazingFeature
git commit -m "Add AmazingFeature"
git push origin feature/AmazingFeature
# Open a Pull Request| Name | Roles |
|---|---|
| Meet Maru | Full Stack ยท AI Integration ยท Backend ยท Database ยท Frontend ยท UI/UX |
๐ซ Institution โ Viva Institute of Technology, Mumbai ๐ Event โ Ingenious ๐ Category โ SE Mini Project ๐ Year โ 2025โ26
Licensed under the MIT License โ see LICENSE for details. Free to use, modify, and distribute with attribution to Team CypherItX.
โญ If this project helped you, please star the repository โญ
Built with โค๏ธ by Team CypherItX
Viva Institute of Technology ยท Ingenious ยท 2025โ26
Made in Bharat ๐ฎ๐ณ