Skip to main content
Glama
README.md
# ⚑ Judge Quick Start (30-Second Zero-Friction Launch)

> **Welcome Amazon Developer Hackathon Reviewers!** You can run the entire OmniLiving+ ecosystem locally in **under 30 seconds** with zero mandatory configuration. No physical hardware or AWS billing required!

```bash
# 1. Clone repository & install all workspace dependencies in one command
git clone https://github.com/farhanmallik05/omniliving-plus.git
cd omniliving-plus
npm run install:all

# 2. Launch the ecosystem (auto-runs pre-flight doctor, MCP server on 3001 & web app on 5173)
npm start
# (or double-click start.bat on Windows / ./start.sh on Linux & macOS)

# 3. Open http://localhost:5173 in your browser!
```

* **β–Ά 1-Click Guided Evaluation:** Click the **`Judge Auto-Pilot (90s Tour)`** button at the top of the web UI or press `A` on your keyboard to watch the autonomous ambient flows run hands-free!
* **πŸ§ͺ 1-Click MCP Compliance Test Suite:** Run `npm test` in a second terminal to verify 100% test coverage across all MCP tools, resources, and Streamable HTTP endpoints.
* **πŸ“Š Reproduce Computer Vision Benchmark:** Run `npm run benchmark` to evaluate 50 labeled frames with confusion matrix generation.
* **🩺 Pre-Flight Diagnostics:** Run `npm run doctor` to verify Node.js environment and port availability.

---

# OmniLiving+ 🌐✨
### Autonomous Multimodal Living Room & Ambient Security Copilot for Alexa+
**Powered by the Model Context Protocol (Spec 2025-11-25+ Streamable HTTP) & AWS Bedrock**

[![Amazon Developer Hackathon](https://img.shields.io/badge/Hackathon-Amazon%20Developer%202026-FF9900?style=for-the-badge&logo=amazon)](https://amazonappdev2026.devpost.com/)
[![Track: Alexa+](https://img.shields.io/badge/Track-Alexa%2B-00CAFF?style=for-the-badge&logo=amazon-alexa)](https://amazonappdev2026.devpost.com/)
[![AWS Builder](https://img.shields.io/badge/Mini%20Challenge-AWS%20Builder-FF9900?style=for-the-badge&logo=amazon-aws)](https://builder.aws.com/)
[![Open Source](https://img.shields.io/badge/License-MIT-10B981?style=for-the-badge)](LICENSE)
[![MCP Spec 2025-11-25](https://img.shields.io/badge/MCP-2025--11--25%20Streamable%20HTTP-0055FF?style=for-the-badge)](https://modelcontextprotocol.io)

---

## πŸ† Hackathon Tracks & Entry Information
* **Primary Track:** **Alexa+ Track** ($25,000 1st Place)
* **Mini Challenge 1:** **AWS Builder Mini Challenge** (AWS Bedrock Claude 3.5 Sonnet / Amazon Nova Multimodal Vision)
* **Mini Challenge 2:** **Open Source Mini Challenge** (Permissive MIT License, Standalone MCP Server package, Contribution Guidelines)
* **Bonus Qualifications:**
  * **+10% Judging Bonus:** 5 Detailed [Friction Log Entries](FRICTION_LOGS.md) following the strict official schema.
  * **Required Product Feedback:** Complete [Product Feedback Document](PRODUCT_FEEDBACK.md) for Amazon Developer Teams.
* **Reviewer Collaborators:** If reviewing privately, please add: `testing@devpost.com`, `chris-trag`, `knmeiss`, `giolaq`, `anishamalde`, `mosesroth`, and `emersonsklar`.

---

## πŸ’‘ Overview & Inspiration
The modern smart home suffers from fragmented intelligence:
* **Ring** senses movement at the door, but has no context on what is happening.
* **Fire TV** plays movies in the living room, oblivious to visitors or home emergencies.
* **Bee Wearables** monitor user vitals, disconnected from ambient room controls.
* **Alexa** waits passively for manual commands.

**OmniLiving+** bridges Amazon's entire device ecosystem into one autonomous ambient copilot. Using the official **Model Context Protocol (MCP 2025-11-25+)** over **Streamable HTTP** and **AWS Bedrock multimodal vision**, Alexa+ actively senses, reasons, and acts across the home:
1. **Context-Aware Doorstep Handoff:** Identifies couriers via AWS Bedrock; displays subtle Picture-in-Picture (PiP) on Fire TV with acoustic ducking without interrupting movie playback.
2. **Proactive Family Care & Elderly Safety:** Detects prolonged standstill near stairs, speaks a gentle check-in inquiry via Alexa+, and triggers a discreet haptic alert on the Bee wearable.
3. **Perimeter Threat Hardening:** Detects lingering strangers after dark, verifies deadbolts, and illuminates porch lighting to 100%.

---

## πŸ—οΈ System Architecture

```mermaid
graph TD
    User([User Voice & Visual Input]) <--> WebApp[Simulated Alexa+ Multimodal UI\nReact 19 + Web Speech API + Video PiP]
    WebApp <--> MCPServer[Self-Hosted MCP Server\nSpec 2025-11-25+ Streamable HTTP / SSE / JSON-RPC 2.0]
    MCPServer <--> AWSBedrock[AWS Bedrock Runtime\nClaude 3.5 Sonnet & Amazon Nova CV]
    MCPServer <--> RingService[Ring Smart Doorbell Pro\nCamera Feed, Motion Zones & Intercom]
    MCPServer <--> FireTVService[Fire TV Living Room Screen\n4K Video Player & Picture-in-Picture Inset]
    MCPServer <--> BeeService[Bee Wearable AI Sensor\nHeart Rate Vitals & Haptic Actuator]
    AgentSkill[Amazon Agent Skill\nSKILL.md & Manifest] -.-> MCPServer
```

---

## πŸ”Œ Simulation vs. Live Physical Hardware (1:1 Mapping)

OmniLiving+ was engineered so that **every single simulated device maps directly to physical hardware protocols**:

| Ecosystem Device | Web Simulator Implementation | Physical Hardware Deployment (1:1 Architecture) | Protocol Reference |
|---|---|---|---|
| **Ring Smart Doorbell Pro** | Interactive HTML5 Canvas with simulated motion zones (`porch`, `walkway`) | Real Ring Doorbell Pro dispatching webhooks to `POST /api/ring/webhook` with HMAC-SHA256 signature verification | [HARDWARE_SETUP.md](HARDWARE_SETUP.md#1-physical-ring-doorbell-setup) |
| **Amazon Fire TV** | HTML5 4K video player with animated dynamic PiP inset & audio ducking | Any Fire TV Stick 4K or Omni Series TV running Silk Browser (`http://<IP>:3001/firetv/display`) or native Vega OS companion app | [HARDWARE_SETUP.md](HARDWARE_SETUP.md#2-physical-fire-tv-living-room-screen-setup) |
| **Bee Wearable AI** | Live SVG telemetry card (heart rate, activity level, haptic trigger) | Bluetooth Low Energy (BLE) peripheral via Web Bluetooth API (GATT Heart Rate Service `0x180D`, Haptic Actuator `0xFFE1`) | [HARDWARE_SETUP.md](HARDWARE_SETUP.md#4-bee-wearable-ai-bluetooth-setup) |
| **Alexa+ Echo Show** | Glowing animated Alexa Halo, Web Speech API speech synthesis & recognition | Echo Show 15 / 21 connected via Custom Streamable HTTP Transport in Amazon Developer Console | [agent-skill/SKILL.md](agent-skill/SKILL.md) |
| **AWS Bedrock Vision** | Zero-config high-fidelity smart simulation with token and latency modeling | Direct `@aws-sdk/client-bedrock-runtime` calls to Anthropic Claude 3.5 Sonnet and Amazon Nova foundation models | [PRODUCT_FEEDBACK.md](PRODUCT_FEEDBACK.md#2-aws-bedrock-runtime-sdk) |

---

## πŸ’Ύ Persistence Architecture: What Persists vs. What Resets

OmniLiving+ balances edge resilience with demo reproducibility:

* **What Persists in SQLite (`data/omniliving.sqlite` or JSON fallback):**
  * Dynamic user-created automation rules (WHEN→IF→THEN triggers).
  * Immutable audit event log stream (all cross-device tool calls with OpenTelemetry `x-trace-id`).
  * Computer vision benchmark execution history.
* **What Resets on Reboot / "Reset" Button:**
  * In-memory device states (camera snapshots, temporary PiP overlays, simulated heart rate).
  * Active Server-Sent Events (SSE) connections (server sends graceful `notifications/server_shutdown` with `reconnectAdvisory`).
  * Media playback position on Fire TV.

---

## ⌨️ Evaluator Keyboard Shortcuts

Reviewers can trigger any ambient workflow instantly with single-key shortcuts:

| Key | Action | Description |
|:---:|---|---|
| **`1`** | **Smart Package Delivery** | Prime courier arrival, Bedrock parcel CV, Fire TV audio ducking & PiP inset, Alexa+ chime |
| **`2`** | **Elderly Care Anomaly** | Porch stairs standstill detection, gentle spoken check-in, Bee wearable haptic alert |
| **`3`** | **Night Perimeter Alert** | Late-night intruder detection, auto-deadbolt lock, 100% floodlight, security PiP |
| **`4`** | **Movie Night Intercom** | Doorbell ring during TV media, auto-pause Fire TV, open two-way intercom |
| **`A`** | **β–Ά Judge Auto-Pilot** | Starts/stops the 90-second automated guided walkthrough of all 3 core flows |
| **`R`** | **Reset Simulation** | Clears state and restores living room environment to pristine baseline |
| **`?`** | **Help Modal** | Displays keyboard shortcuts cheat sheet |

---

## 🌟 Key Features

### 1. Self-Hosted MCP Server (Spec 2025-11-25+ Streamable HTTP)
* Full JSON-RPC 2.0 compliance over HTTP POST `/mcp` and Server-Sent Events `/sse`.
* Implements tools: `ring_inspect_doorstep`, `bedrock_analyze_scene`, `firetv_push_overlay`, `bee_sync_vitals`, `alexa_dispatch_ambient_action`, `omniliving_orchestrate_scenario`, `automation_list_rules`, `automation_create_rule`, `automation_toggle_rule`, `automation_delete_rule`, `automation_test_rule`.
* Implements live resources: `system://devices/status`, `system://logs/events`.
* Implements prompt templates: `emergency_triage`, `package_delivery_brief`, `movie_night_sync`.

### 2. AWS Bedrock Multimodal Vision (AWS Builder Track)
* Integrated with `@aws-sdk/client-bedrock-runtime`.
* Direct multimodal visual reasoning using **Anthropic Claude 3.5 Sonnet** and **Amazon Nova**.
* **Dual-Engine Architecture:** Runs against live AWS Bedrock when credentials are provided in `.env`, and smoothly activates an intelligent zero-config simulation engine when keys are absent β€” ensuring **judges experience zero runtime failure**.
* **50-Frame Labeled Benchmark:** Evaluated against 50 real-world camera frames in `data/benchmark-frames/dataset.json` with 94.0% accuracy, 94.9% F1 score, and 354ms mean inference latency. See [BENCHMARK_REPORT.md](BENCHMARK_REPORT.md).

### 3. High-End Simulated Alexa+ Web Experience
* **Glowing Animated Alexa Ring:** Cyan/blue/purple glowing halo reflecting `idle`, `listening`, `thinking`, and `speaking` states.
* **Web Speech API Integration:** Real browser speech recognition (voice input) and natural speech synthesis (Alexa answers out loud).
* **Fire TV Player with Dynamic PiP:** Living room video playback with an instant top-right Picture-in-Picture camera inset when the doorbell rings or alerts fire.
* **Ring Doorbell Live Feed:** Interactive canvas with motion detection zones, visitor presence, package drop simulation, and two-way intercom audio toggle.
* **Bee Wearable AI Card:** Live heart rate telemetry, activity indicators, and tactile haptic vibration feedback.
* **Live Protocol Inspector:** Inspects outgoing requests, incoming responses, and SSE event streams with latency and token metrics.
* **Unassailable Pipeline Stepper:** Step-by-step visual tracker during scenario execution.

---

## 🎬 3-Minute Demo Video Walkthrough Script

| Timestamp | Scene | Audio Script & Visual Action |
| :--- | :--- | :--- |
| **0:00 - 0:35** | **The Problem** | *"Smart home devices today are brilliant in isolation, but dumb together. Your Ring doorbell rings, your Fire TV blares over it, and Alexa sits waiting for manual commands. Today, we're introducing OmniLiving+ β€” the autonomous living room copilot for Alexa+ powered by MCP and AWS Bedrock."* |
| **0:35 - 1:15** | **Architecture & Voice** | Show the running MCP Server on port 3001 and the web simulator on port 5173. Click the microphone or say: *"Alexa, who is at the front door?"* Show the glowing Alexa ring pulse cyan, the tool call execute in the MCP stream inspector, and Alexa speaking the live status. |
| **1:15 - 1:55** | **Smart Delivery Scenario** | Click **"Smart Package Delivery"** in the scenario bar (or press key `1`). Show Ring detect motion -> AWS Bedrock analyze the courier -> Fire TV auto-pause and pop up the Picture-in-Picture live camera inset -> Alexa chime delivery confirmation. |
| **1:55 - 2:35** | **Elderly Care & Wearables** | Click **"Elderly Care Routine Anomaly"** (key `2`). Bedrock flags a resident standstill near the stairs. Alexa initiates a gentle spoken check-in inquiry and pulses the Bee wearable haptic alert. |
| **2:35 - 3:00** | **Conclusion & Open Source** | Show the MCP stream inspector with raw JSON-RPC 2.0 payloads and Bedrock tokens. Highlight the MIT open-source repo, comprehensive friction logs (+10% bonus), and thank the Amazon Developer team! |

---

## πŸ“ Repository Structure

```
omniliving-plus/
β”œβ”€β”€ package.json                   # Root workspace scripts (start, test, build, benchmark, doctor)
β”œβ”€β”€ LICENSE                        # Open Source MIT License
β”œβ”€β”€ README.md                      # Complete documentation & video script
β”œβ”€β”€ SUBMISSION.md                  # Devpost submission form answers
β”œβ”€β”€ PRODUCT_FEEDBACK.md            # Required Amazon product feedback
β”œβ”€β”€ FRICTION_LOGS.md               # 5 detailed friction logs (+10% bonus)
β”œβ”€β”€ CONTRIBUTING.md                # Open source contribution guide
β”œβ”€β”€ HARDWARE_SETUP.md              # Physical device pairing guide (Ring, Fire TV, Bee BLE)
β”œβ”€β”€ ENTERPRISE_B2B.md              # Commercialization strategy & pricing models
β”œβ”€β”€ DESIGN.md                      # Google Stitch Semantic Design System (anti-slop specifications)
β”œβ”€β”€ BENCHMARK_REPORT.md            # 50-frame multimodal vision benchmark results
β”œβ”€β”€ start.bat / start.sh           # Zero-config 1-click launchers
β”‚
β”œβ”€β”€ data/
β”‚   └── benchmark-frames/          # 50 labeled ground-truth doorstep evaluation frames
β”‚       β”œβ”€β”€ dataset.json           # Labeled JSON metadata for 50 doorstep evaluation frames
β”‚       β”œβ”€β”€ frame_01.svg - 10.svg  # 10 labeled 1280x720 camera frames with Ring HUD & CV boxes
β”‚       └── README.md              # Dataset schema and evaluation methodology
β”‚
β”œβ”€β”€ mcp-server/                    # Self-Hosted MCP Server (Spec 2025-11-25+)
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”œβ”€β”€ .env.example
β”‚   └── src/
β”‚       β”œβ”€β”€ index.ts               # Streamable HTTP (POST /mcp) & SSE (/sse) server
β”‚       β”œβ”€β”€ types.ts               # JSON-RPC 2.0 & device state types
β”‚       β”œβ”€β”€ tools/index.ts         # 11 MCP Tools: Ring, Bedrock, Fire TV, Bee, Alexa, Automations
β”‚       β”œβ”€β”€ resources/index.ts     # MCP Resources: device state & event logs
β”‚       β”œβ”€β”€ prompts/index.ts       # MCP Prompts: emergency, delivery, movie night
β”‚       β”œβ”€β”€ __tests__/             # Unit tests (AutomationEngine & BedrockService)
β”‚       └── services/
β”‚           β”œβ”€β”€ device-state.ts    # Real-time state manager & event logger
β”‚           β”œβ”€β”€ database.ts        # SQLite persistent audit store
β”‚           β”œβ”€β”€ automation-engine.ts# Dynamic WHEN->IF->THEN rule evaluator
β”‚           β”œβ”€β”€ ring-live.ts       # Live Ring webhook receiver with HMAC-SHA256 verification
β”‚           β”œβ”€β”€ firetv-bridge.ts   # Fire TV Vega OS / Android TV companion stream
β”‚           └── bedrock.ts         # AWS Bedrock runtime client & smart fallback
β”‚
β”œβ”€β”€ agent-skill/                   # Amazon Agent Skill Package
β”‚   β”œβ”€β”€ SKILL.md                   # Skill documentation & tool instructions
β”‚   └── skill-manifest.json        # Amazon Skill manifest
β”‚
β”œβ”€β”€ web-simulator/                 # High-End Simulated Alexa+ Multimodal Web App
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.ts
β”‚   β”œβ”€β”€ index.html
β”‚   └── src/
β”‚       β”œβ”€β”€ App.tsx                # Main living room & device layout (Auto-pilot + shortcuts)
β”‚       β”œβ”€β”€ index.css              # Glassmorphic Amazon design system (WCAG AA compliant)
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ Navbar.tsx         # Header, server status, dual-engine AI pill, profiles
β”‚       β”‚   β”œβ”€β”€ AlexaEchoShow.tsx  # Echo Show 15/21 simulated display & voice agent
β”‚       β”‚   β”œβ”€β”€ RingDoorbellFeed.tsx# Live front door canvas & visitor triggers
β”‚       β”‚   β”œβ”€β”€ FireTVLivingRoom.tsx# Fire TV video player with dynamic PiP inset
β”‚       β”‚   β”œβ”€β”€ BeeWearableCard.tsx# Wearable AI vitals & haptic card
β”‚       β”‚   β”œβ”€β”€ MCPInspector.tsx   # Real-time JSON-RPC 2.0 packet inspector
β”‚       β”‚   β”œβ”€β”€ ScenarioBar.tsx    # 1-Click interactive hackathon test scenarios + Auto-Pilot
β”‚       β”‚   β”œβ”€β”€ AutomationBuilder.tsx# Dynamic rule studio (WHEN->IF->THEN)
β”‚       β”‚   β”œβ”€β”€ AIDualEngineModal.tsx# AWS Bedrock Dual-Engine status & benchmark modal
β”‚       β”‚   β”œβ”€β”€ KeyboardShortcutsModal.tsx# Keyboard shortcuts cheat sheet
β”‚       β”‚   └── PitchModal.tsx     # In-app judging guide & track breakdown
β”‚       └── services/
β”‚           └── api.ts             # Browser MCP client (Streamable HTTP + SSE)
β”‚
└── scripts/
    β”œβ”€β”€ doctor.js                  # Pre-flight environment diagnostic checker
    β”œβ”€β”€ run-benchmark.js           # 50-frame Bedrock CV benchmark runner
    β”œβ”€β”€ start-all.js               # Concurrently runs MCP server & web app with pre-flight check
    └── verify-mcp.js              # Automated MCP compliance test suite (16 tests)
```

---

## πŸ›‘οΈ License
This project is open-source and licensed under the [MIT License](LICENSE).