- auth.js: register chat widget ScriptTag during OAuth callback so every
new install automatically gets the floating chat button — no manual
theme editing required
- server.js: GET /chat/backfill-scripttags endpoint to register the widget
on all already-installed shops in one hit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move GET /chat/widget.js before GET /chat/:shop to prevent Express
matching 'widget.js' as the :shop param and returning JSON
- Move POST/GET /chat/:shop after body parser registration so req.body
is populated when customers send messages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- chatStore.js: per-shop JSON storage in data/chats/, message history,
unread tracking, markRead on admin open
- adminPanel.js: new Chat tab (WhatsApp-style left sidebar + right panel),
3s polling, admin reply, unread badge on tab
- server.js: public POST /chat/:shop and GET /chat/:shop for widget,
GET /chat/widget.js serves embeddable script
- Widget: floating chat button, popup window, customer sends messages,
polls for admin replies, visitor ID persisted in localStorage
Usage: <script src="https://backend.data4autos.com/chat/widget.js?shop=SHOP"></script>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New GET /d4a-admin/api/users endpoint merges tokens.json (all installed
shops) with freeAccessStore to show every user and their access status
- Dashboard replaced with a full user list: shop domain, last auth date,
free-access status badge, and Grant Free / Revoke buttons per row
- Grant opens a modal to set optional expiry date and note (no manual typing)
- Search filter to find shops quickly across large user lists
- Removed the manual text-input add form
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Login: vibrant blue gradient left panel + pure white right form panel
- Dashboard: white topbar with blue accent, white cards, light gray page bg
- Status tags: light-coloured pill badges (green/red/blue) with dot indicators
- Remove all dark glassmorphism and near-black surfaces
- Sync count badge across topbar and table header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Full-screen split layout: left branding panel + right login card
- Animated background gradient blobs with CSS keyframes
- Dot-grid overlay for depth
- Glassmorphism login card (backdrop-filter blur, subtle borders)
- Brand icon with pulsing glow animation
- Feature list on left panel
- Input fields with icon prefix (user/key) and password show/hide toggle
- Shimmer effect on sign-in button on hover
- Error shake animation
- Secure badge with green dot indicator
- Blobs hidden after login so dashboard background is clean
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- freeAccessStore.js: JSON-persisted whitelist of shops with optional
expiry dates; isShopAllowed(), addShop(), removeShop(), listShops()
- routes/adminPanel.js: password-protected single-page admin dashboard
served at /d4a-admin; cookie-based session auth (no extra deps);
add / remove / list shops with expiry dates and notes
- server.js: mount /d4a-admin panel; expose GET /free-access/:shop
public API for frontend loaders; import freeAccessStore
Credentials: d4a-admin / Data4autos@2026.
Migrates racewerksengg.myshopify.com from hardcode into the JSON store.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>