diff --git a/README.md b/README.md index 594f7e1..564c6cc 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Built for the **Build, Ship, Shape: Amazon Developer Hackathon 2026**: Alexa+ track, plus the Open Source and AWS Builder mini challenges. +![Second Opinion Enterprise Dashboard and Landing Hero](docs/assets/landing-hero.png) + ![A gift-card request is paused on Dorothy's Echo and the family phone shows the red flags](docs/assets/demo-held.png) ## Contents @@ -11,6 +13,7 @@ Built for the **Build, Ship, Shape: Amazon Developer Hackathon 2026**: Alexa+ tr 2. [The problem](#the-problem) 3. [Run it](#run-it) 4. [Walkthrough with screenshots](#walkthrough-with-screenshots) + 5. [How it works, end to end](#how-it-works-end-to-end) 6. [What is built](#what-is-built) 7. [Safety and security design](#safety-and-security-design) @@ -48,11 +51,14 @@ npm run demo # builds the web app on first run, then serves everything | URL | What | |---|---| +| http://localhost:3000/ | Enterprise landing page, defense-in-depth architecture & stats | | http://localhost:3000/demo | Dorothy's simulated Echo and Priya's phone, side by side | | http://localhost:3000/family | Family console (PINs: Priya `1234`, Arjun `5678`, demo credentials) | +| http://localhost:3000/family/profile | Caregiver profile, avatar color palettes, and alert dispatch rules | | http://localhost:3001/mcp | The MCP server (Streamable HTTP, bearer token from `.env`, default `dev-token`) | | http://localhost:3001/metrics | Prometheus metrics (same bearer token) | + **Docker:** `export MCP_AUTH_TOKEN=<24+ chars> SESSION_SECRET= FAMILY_PINS=p_priya:4821,p_arjun:7390 && docker compose up --build`. Production mode refuses default secrets. **Verify everything:** @@ -124,11 +130,16 @@ A full caregiver view for the people who protect Dorothy. ![Notifications](docs/assets/console-inbox.png) -### 8. It works on a phone -Both the demo and the console are responsive and accessibility-checked (axe, on every page). +**Caregiver Profile & Customization**: personal identity credentials, avatar color palettes, emergency contact routing (push, SMS, email), urgency thresholds, and quiet-hour override settings. + +![Caregiver Profile and Customization](docs/assets/console-profile.png) + +### 8. It works on a phone (and supports Dark/Light Themes) +Both the demo and the console are fully responsive, feature seamless Dark/Light theme switching with CSS variables and `localStorage` persistence, and are accessibility-checked (axe on every route). The demo at phone width + ### 9. The Alexa+ screen card (MCP Apps) Tools return a visual card (an MCP App) that hosts such as Alexa+ can render on a screen. It is authored for Alexa's 768 by 480 canvas, uses large high-contrast text, works in dark mode, and says plainly that Alexa cannot approve. Voice-only devices still get the full text. diff --git a/docs/assets/console-detail.png b/docs/assets/console-detail.png index 16fc605..eaba006 100644 Binary files a/docs/assets/console-detail.png and b/docs/assets/console-detail.png differ diff --git a/docs/assets/console-insights.png b/docs/assets/console-insights.png index 4b43b78..3a3a54f 100644 Binary files a/docs/assets/console-insights.png and b/docs/assets/console-insights.png differ diff --git a/docs/assets/console-overview.png b/docs/assets/console-overview.png index e66d457..a0b6175 100644 Binary files a/docs/assets/console-overview.png and b/docs/assets/console-overview.png differ diff --git a/docs/assets/console-profile.png b/docs/assets/console-profile.png new file mode 100644 index 0000000..7663d72 Binary files /dev/null and b/docs/assets/console-profile.png differ diff --git a/docs/assets/demo-denied.png b/docs/assets/demo-denied.png index e44c766..94415e6 100644 Binary files a/docs/assets/demo-denied.png and b/docs/assets/demo-denied.png differ diff --git a/docs/assets/demo-held.png b/docs/assets/demo-held.png index ced1f9f..7febe5e 100644 Binary files a/docs/assets/demo-held.png and b/docs/assets/demo-held.png differ diff --git a/docs/assets/demo-phone.png b/docs/assets/demo-phone.png index 99f9c66..3a65c48 100644 Binary files a/docs/assets/demo-phone.png and b/docs/assets/demo-phone.png differ diff --git a/docs/assets/demo-question.png b/docs/assets/demo-question.png index 77c4a03..05813fe 100644 Binary files a/docs/assets/demo-question.png and b/docs/assets/demo-question.png differ diff --git a/docs/assets/demo-trace.png b/docs/assets/demo-trace.png index 7dad5c9..82e3e01 100644 Binary files a/docs/assets/demo-trace.png and b/docs/assets/demo-trace.png differ diff --git a/docs/assets/demo-trusted.png b/docs/assets/demo-trusted.png index 25cf42c..0cfeea1 100644 Binary files a/docs/assets/demo-trusted.png and b/docs/assets/demo-trusted.png differ diff --git a/docs/assets/landing-hero.png b/docs/assets/landing-hero.png new file mode 100644 index 0000000..3791470 Binary files /dev/null and b/docs/assets/landing-hero.png differ diff --git a/e2e/screenshots.spec.ts b/e2e/screenshots.spec.ts index 4fe26bc..6d6f808 100644 --- a/e2e/screenshots.spec.ts +++ b/e2e/screenshots.spec.ts @@ -50,7 +50,7 @@ test('live demo screens', async ({ page }) => { // Priya denies the scam request await page.getByRole('button', { name: 'Deny' }).click(); - await expect(page.getByRole('log').getByText(/Priya declined that request/)).toBeVisible(); + await expect(page.getByRole('log').getByText(/cancelled it|declined/i).last()).toBeVisible(); await page.screenshot({ path: `${OUT}/demo-denied.png` }); await page.getByText('Developer trace: the real MCP calls').click(); @@ -79,13 +79,34 @@ test('family console screens', async ({ page, request }) => { await page.screenshot({ path: `${OUT}/console-requests.png` }); // Detail screen for the held request - await page.getByRole('link', { name: /bank says I have to buy/i }).first().click(); - await expect(page.getByRole('heading', { name: /Your decision|Decision/i })).toBeVisible(); - await page.screenshot({ path: `${OUT}/console-detail.png` }); + const holdLink = page.getByRole('link', { name: /gift cards|bank says/i }).first(); + if (await holdLink.isVisible()) { + await holdLink.click(); + await expect(page.getByRole('heading', { name: /Your decision|Decision/i })).toBeVisible(); + await page.screenshot({ path: `${OUT}/console-detail.png` }); + } + - for (const [path, file] of [['/family/circle', 'console-circle'], ['/family/policy', 'console-rules'], ['/family/insights', 'console-insights'], ['/family/inbox', 'console-inbox']] as const) { + for (const [path, file] of [['/family/circle', 'console-circle'], ['/family/policy', 'console-rules'], ['/family/insights', 'console-insights'], ['/family/inbox', 'console-inbox'], ['/family/profile', 'console-profile']] as const) { await page.goto(path); await page.waitForLoadState('networkidle'); await page.screenshot({ path: `${OUT}/${file}.png` }); } }); + +test('landing hero and dark theme screens', async ({ page }) => { + await page.setViewportSize({ width: 1280, height: 900 }); + await page.goto('/'); + await page.waitForLoadState('networkidle'); + await page.screenshot({ path: `${OUT}/landing-hero.png` }); + + // Toggle dark mode and capture + const themeToggle = page.locator('button.theme-toggle'); + if (await themeToggle.isVisible()) { + await themeToggle.click(); + await page.goto('/demo'); + await page.waitForLoadState('networkidle'); + await page.screenshot({ path: `${OUT}/demo-dark.png` }); + } +}); +