Files
helix-engage-server/public/test.html
saridsa2 76fa6f51de feat: website widget + omnichannel lead webhooks
Widget (embeddable):
- Preact + Vite library mode → 35KB IIFE bundle served from sidecar
- Shadow DOM for CSS isolation, themed from sidecar theme API
- AI chatbot (streaming), appointment booking (4-step wizard), lead capture form
- FontAwesome Pro duotone SVGs bundled as inline strings
- HMAC-signed site keys (Redis storage, origin validation)
- Captcha guard (Cloudflare Turnstile ready)

Sidecar endpoints:
- GET/PUT/DELETE /api/widget/keys/* — site key management
- GET /api/widget/init — theme + config (key-gated)
- GET /api/widget/doctors, /slots — doctor list + availability
- POST /api/widget/book — appointment booking (captcha-gated)
- POST /api/widget/lead — lead capture (captcha-gated)

Omnichannel webhooks:
- POST /api/webhook/facebook — Meta Lead Ads (verification + lead ingestion)
- POST /api/webhook/google — Google Ads lead form extension
- POST /api/webhook/whatsapp — Ozonetel WhatsApp callback (receiver ready)
- POST /api/webhook/sms — Ozonetel SMS callback (receiver ready)

Infrastructure:
- SessionService.setCachePersistent() for non-expiring Redis keys
- Static file serving from /public (widget.js)
- WidgetModule registered in AppModule

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 06:49:02 +05:30

42 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Global Hospital — Widget Test</title>
<style>
body { font-family: -apple-system, sans-serif; max-width: 800px; margin: 0 auto; padding: 40px; color: #1f2937; }
h1 { font-size: 28px; margin-bottom: 8px; }
p { color: #6b7280; line-height: 1.6; }
.hero { background: #f0f9ff; border-radius: 12px; padding: 40px; margin: 40px 0; }
.hero h2 { color: #1e40af; }
</style>
</head>
<body>
<h1>🏥 Global Hospital, Bangalore</h1>
<p>Welcome to Global Hospital — Bangalore's leading multi-specialty healthcare provider.</p>
<div class="hero">
<h2>Book Your Appointment Online</h2>
<p>Click the chat bubble in the bottom-right corner to talk to our AI assistant, book an appointment, or request a callback.</p>
</div>
<h3>Our Departments</h3>
<ul>
<li>Cardiology</li>
<li>Orthopedics</li>
<li>Gynecology</li>
<li>ENT</li>
<li>General Medicine</li>
</ul>
<p style="margin-top: 40px; font-size: 12px; color: #9ca3af;">
This is a test page for the Helix Engage website widget.
The widget loads from the sidecar and renders in a shadow DOM.
</p>
<!-- Replace SITE_KEY with the generated key -->
<script src="http://localhost:4100/widget.js" data-key="8197d39c9ad946ef.31e3b1f492a7380f77ea0c90d2f86d5d4b1ac8f70fd01423ac3d85b87d9aa511"></script>
</body>
</html>