- 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>
- 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>