Skip to main content

Chatwoot Phase 0 Deployment Record

Date: 2026-04-07 Status: Deployed and live-verified Scope: Chatwoot Phase 0 context injection for aovis.app

1. Purpose

This record captures the exact deployment identity, runtime checks, and live verification results for the Chatwoot Phase 0 release.

It is written for future AI tools and operators who may need to continue tuning the widget/context/email behavior without re-deriving the deployment history.


2. Release Identity

  • Repository: aovis-direct-store
  • Branch: main
  • Release commit: e528d8a810f3b90c594462ebf8de30a6d32ebf1a
  • Short commit: e528d8a
  • Remote status: pushed to origin/main

Release note:

  • feat: Chatwoot Phase 0 - logged-in user context injection

3. What Shipped

Phase 0 added the logged-in user support-context path for aovis.app:

  • app/layout.tsx wraps the app with SessionProvider
  • components/chatwoot-widget.tsx syncs user session state into Chatwoot
  • app/api/support/context/route.ts exposes the authenticated support-context endpoint
  • scripts/chatwoot-provision-attributes.ts provisions the required Chatwoot custom attributes
  • docs/chatwoot-context-integration.md documents the implementation
  • .env.example and .env.production.example were updated for Chatwoot environment variables

This release did not expand into adjacent scope areas such as Amazon, AI, device telemetry, or payment changes.


4. Deployment Target

AOVIS Store VM

  • VM: aovis-store-staging-vm
  • Zone: us-west1-c
  • Project: aovis-site-1
  • Path: /opt/aovis/aovis-store-staging
  • PM2 process: aovis-store-staging

Identity Used for Deployment

Chatwoot Support VM

The separate Chatwoot support stack remains on:

  • VM: chatwoot-vm
  • Zone: us-central1-a
  • Project: aovis-direct-store-492514
  • Active gcloud account for that stack: [email protected]

5. Deployment Command

The VM was updated through Git pull, not tar/scp sync:

cd /opt/aovis/aovis-store-staging
git fetch origin
git pull origin main
npm install
npx prisma generate
npm run build
pm2 restart aovis-store-staging --update-env

This exact flow is the release baseline.


6. Build and Runtime Results

Build

  • npm install completed successfully
  • npx prisma generate completed successfully
  • npm run build completed successfully

PM2

  • pm2 restart aovis-store-staging --update-env completed successfully

Notes

  • The build output showed normal npm peer-dependency warnings, but no blocking error
  • The deployment completed on the pushed Git commit, not from local workspace state

7. Live Verification

All of the following checks passed:

  • https://aovis.app returned 200
  • https://aovis.app/robots.txt returned 200
  • https://aovis.app/sitemap.xml returned 200
  • https://aovis.app/api/support/context returned 401 when unauthenticated
  • npm run deploy:verify passed with 7/7
  • https://aovis.app/api/auth/providers still returned "apple"

Widget Runtime Check

Browser-side verification confirmed:

  • https://support.aovis.app/packs/js/sdk.js was loaded
  • window.chatwootSDK existed
  • window.chatwootSettings existed

This means the widget is present at runtime even though the raw HTML grep did not show the SDK literal in the initial curl output.


8. Important Operational Boundaries

  • Do not overwrite /opt/aovis/aovis-store-staging/.env.production
  • Do not deploy from tar/scp payloads
  • Do not treat uncommitted local changes as deployable release source
  • If Apple sign-in disappears later, check VM env and /api/auth/providers before assuming a code bug

9. Follow-up Tuning Areas

Future tuning should stay within the Chatwoot Phase 0 lane:

  • widget identity/context sync
  • notification delivery behavior
  • email notification rules
  • operator and support workflow alignment

Do not expand this record into unrelated product scope.