feat: embed Chatwoot live-chat widget (destek.sase.tr)
Site-wide live-chat widget served from the self-hosted Chatwoot at destek.sase.tr, with verified user identity and vehicle context. - apps/web: lib/chatwoot.ts loads the SDK lazily (mirrors the PostHog init pattern), init in main.tsx, identify logged-in users in __root via a server-computed HMAC, and attach the viewed vehicle (VIN/brand/ model) as contact custom attributes on the vehicle detail page. - apps/api: GET /api/chatwoot/identity (AuthGuard-protected) returns HMAC-SHA256(user.id) so the widget can use verified identity. - env: VITE_CHATWOOT_BASE_URL + VITE_CHATWOOT_WEBSITE_TOKEN (build-time, wired through docker-compose.coolify.yml build args + Dockerfile ARG) and CHATWOOT_HMAC_TOKEN (api runtime). All optional — widget and endpoint no-op when unset. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,8 @@ ARG VITE_FARO_ENABLED=false
|
||||
ARG VITE_FARO_COLLECTOR_URL=
|
||||
ARG VITE_POSTHOG_KEY=
|
||||
ARG VITE_META_PIXEL_ID=
|
||||
ARG VITE_CHATWOOT_BASE_URL=
|
||||
ARG VITE_CHATWOOT_WEBSITE_TOKEN=
|
||||
|
||||
RUN pnpm build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user