All 5 critical issues have been fixed. The system now has:
- Centralized Gemini Brain (controls all responses)
- Transient Physics Engine (no permanent glitches)
- Locked Browser (hyperlinks disabled)
- Background Audio (plays from start)
- Progressive Horror (haunt level 1→10)
cd backend
python main.pyExpected Output:
✅ Gemini AI configured
INFO: Uvicorn running on http://0.0.0.0:8000
Leave this terminal running.
Option A - Direct File (Easiest):
- Navigate to
frontendfolder - Double-click
index.html - Opens in your default browser
Option B - Local Server (Recommended):
cd frontend
python -m http.server 8080Then visit: http://localhost:8080
- Click anywhere on the black boot screen
- Background music starts playing ✅
- Scream or make loud noise when prompted
- Camera flashes (grants permissions)
- Main interface loads
You're now possessed. 👻
- Hold a bottle or distinctive object in front of camera
- Wait 15 seconds
- AI should comment: "I see that bottle" or similar
- Type
heavensgate.comin the spirit console - Click RESURRECT
- Try clicking any link on the loaded page
- Nothing should happen (links are dead)
- Wait for random glitches (every 10-30 seconds)
- Screen inverts/shakes for 0.3 seconds
- Returns to normal immediately
- No permanent tilt or stuck effects
- Music starts on first click
- Loops continuously throughout session
- Never stops until you close the window
- Every 15 seconds, hear AI voice
- AI comments on:
- What you're holding (camera)
- The website you're viewing
- Your battery level
- Time of day
- Stay for 2+ minutes → AI becomes more aggressive
404_POSSESSION/
├── backend/
│ ├── main.py ← Gemini brain + API endpoints
│ └── requirements.txt ← Python dependencies
├── frontend/
│ ├── index.html ← Main UI
│ ├── boot.js ← Calibration ritual
│ ├── script.js ← Sensors + heartbeat
│ └── style.css ← Transient glitch effects
├── assets/
│ └── bg.mp3 ← Background music (4.1 MB)
├── .env ← Gemini API key
├── TESTING_GUIDE.md ← Detailed testing instructions
└── ARCHITECTURE_CHANGES.md ← Technical change summary
pip install -r backend/requirements.txt- Check
assets/bg.mp3exists (it does ✅) - Click the screen (browser requires user gesture)
- Check browser console for errors
- Grant permissions when prompted
- Use Chrome or Edge (best compatibility)
- Check browser console for permission errors
- Verify
.envfile hasGEMINI_API_KEY - Check backend console for errors
- Fallback messages will play if Gemini fails
After 2 minutes of testing, you should observe:
✅ Background music playing continuously
✅ AI comments every 15 seconds (contextual, not repetitive)
✅ Glitches flash briefly (0.3s) then disappear
✅ Hyperlinks on resurrected pages are non-clickable
✅ AI identifies objects you hold in front of camera
✅ AI becomes progressively more aggressive (haunt level increases)
┌─────────────────────────────────────┐
│ FRONTEND (Every 15 seconds) │
│ - Capture camera frame │
│ - Get battery level │
│ - Get current URL │
│ - Send to backend │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ BACKEND (/api/heartbeat) │
│ - Receive full context │
│ - Send to Gemini 1.5 Flash │
│ - Return: voice_text + intensity │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ GEMINI 1.5 FLASH │
│ - Analyze camera image │
│ - Consider battery, URL, time │
│ - Generate personalized horror │
│ - Match haunt level (1-10) │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ FRONTEND (Response) │
│ - Speak AI response (TTS) │
│ - Trigger transient glitch │
│ - Display in status bar │
└─────────────────────────────────────┘
Haunt Level Progression:
- 1-3: Subtle whispers ("I see you")
- 4-6: Unsettling observations ("Why are you alone?")
- 7-8: Aggressive comments ("You look scared")
- 9-10: Violent threats ("Your time is running out")
Semantic Rot:
- Text slowly changes: "welcome" → "leave"
- Very subtle (1-2 words every 5 seconds)
- Only noticeable if you stare at the same page
Unkillable UI:
- Close button runs away when you hover
- History is trapped (back button doesn't work)
- Cursor randomly corrupts
- Browser Permissions: Grant camera + microphone access
- User Gesture: Music requires a click (browser policy)
- Gemini API: Free tier has rate limits (60 requests/minute)
- Backend Must Run: Frontend needs
http://localhost:8000
If something doesn't work:
- Check browser console (F12)
- Check backend terminal for errors
- Read
TESTING_GUIDE.mdfor detailed troubleshooting - Verify all files are in correct locations
The dead web awaits. Initialize when ready. 💀