Glance · Platform

Approach A · Layer · Self-hosted

Glance Intelligent Detect inside the Nudgely Prototype

Self-hosted context layer in the Nudgely Prototype — Glance Intelligent Detect: connect activity, evaluate against paths, proactive coach. Today’s JSON files are the compiled path + coach stand-in (self-hosted, no LLM in MVP).

18 path playbooks B+A checklist + spotlight :8090 GID · :4322 UI flag VITE_GID_ENABLED=1
GID layer

00 · Product journey

What the customer journey should feel like

Not a selector CMS. Not “describe intent → AI Publish.” Same order as Glance Intelligent Detect docs: connect → golden paths → live / evaluate. See journey doc and console mock.

01

Connect

Open the activity pipe (SDK in this spike; PostHog webhook in Approach A sellable form).

POST /v1/events
02

Golden paths

Define ideal action sequences to evaluate. Prototype MVP = JSON per route (compile target for coach).

gid/playbooks/*.json
03

Live

Dwell / off-path → proactive offer. FSM cooldown. Delivery = coach sheet in-app.

GET /v1/proactive
04

Why admin

Connect + paths + evaluate — not babysitting every offer. Triggers stay mostly built-in / eng.

gid-admin-mock.html

01 · Runtime (prototype spike)

Four parts. One session.

The prototype stays the product. GID is the side layer: collect → detect → resolve path playbook → render coach. Playbooks here = recorded-path stand-ins for the 18 screens (eng-authored JSON until console ships).

01

Collector

Hooks go() and clicks. Emits pageviews/clicks with canonical_url.

collector.js
02

GID engine

Local FastAPI. Dwell / ping-pong. Offers only when a path playbook matches the route.

glance-intelligent-detect/
03

Path playbooks

Compiled guidance per screen (title + steps). Runtime contract — not the customer happy-path UI.

gid/playbooks/*.json
04

Coach UI

Nudgely sheet + spotlight on the step target. “Help” FAB on every screen.

coach-ui.js + playbook-runner.js

02 · Wiring

Where the integration lives

Vendor untouched (integrity check). All GID code lives in src/gid/ and the sibling Python service.

Nudgely Prototype

nudgely-prototype/

integration.jscalls installGlanceIntelligentDetect()
src/gid/index.jsstarts collector + coach when flag on
collector.jsevents → POST /v1/events
coach-ui.jssheet + Help FAB (EN chrome)
playbook-runner.jsspotlight + step advancement
vendor/*do not edit — integrity lock

Glance Intelligent Detect

glance-intelligent-detect/

gid/app.py/events /proactive /playbook
triggers.pydwell + ping-pong
playbooks/18 path playbooks · route stand-ins
auth.json#authEmail → #authPw → Sign in
feed.jsonopen a card or create article
validate_mvp.shV1–V10 automated checks

03 · Coverage

Paths across the whole prototype

Today each screen has a path playbook (eng JSON). Product direction: customer records paths in console; coach still consumes the compiled shape. ~8s dwell → automatic offer, or tap Help via GET /v1/playbook.

/onboardingtour
/authlogin
/forgotrecovery
/verifyemail
/feedexplore
/mapgeo
/detailarticle
/editorcreate
/contactspeople
/personprofile
/activityshares
/settingsprefs
/myprofileme
/legaldocs
/notifsinbox
/notifSettingspush
/livesession
/moderationqueue

04 · Experience

B + A — what the user sees

Not a chat stub. Product guidance with Nudgely visuals (dark / blue).

B

Checklist

Bottom sheet with 1–3 concrete steps. Done / current / todo. Actionable copy — no URL dump or user_id.

A

Spotlight

Ring + dim on the right control (#authEmail, card, tab…). Advances when the step completes (input or click).

05 · Live demo

60-second script

Start GID Self-hosted Python on :8090
Start the prototype with the flag VITE_GID_ENABLED=1 points at local GID
Stay ~8s on login Sheet “Let's get you in” + spotlight on the current step
Browse feed / contacts New path playbook per screen — or tap Help anytime

Commands

# Terminal A — GID
cd glance-intelligent-detect && source .venv/bin/activate
GID_PRODUCT_ID=nudgely-prototype GID_API_KEY=dev-gid-key \
GID_DWELL_THRESHOLD_SECONDS=8 \
uvicorn gid.app:app --host 127.0.0.1 --port 8090

# Terminal B — Prototype
cd nudgely-prototype
VITE_GID_ENABLED=1 \
VITE_GID_BASE_URL=http://127.0.0.1:8090 \
VITE_GID_API_KEY=dev-gid-key \
VITE_GID_PRODUCT_ID=nudgely-prototype \
npm run dev
# → http://127.0.0.1:4322/