# NanoLog — Integrated Changelog, Roadmap & Feedback Widget NanoLog is an ultra-lightweight (<17KB gzipped), zero-dependency, whitelabel product engagement widget for modern SaaS applications. It operates in a secure, isolated Shadow DOM to prevent any style bleeding or host site conflict. ## Installation & Script Block Integration Inject the standard script tag directly before the closing `` tag of your application: ```html ``` --- ## Production Security: HMAC User Verification To prevent spoofing or unauthorized user payload injection in production, sign the user payload on your backend using an HMAC-SHA256 signature with your project's webhook/HMAC secret. ### 1. Backend Signature Generation (Node.js/Next.js) ```javascript import crypto from 'crypto'; export function generateNanoLogSignature(userId, secretKey) { return crypto .createHmac('sha256', secretKey) .update(userId) .digest('hex'); } ``` ### 2. Frontend Signature Verification Delivery Pass the computed `signature` value inside the initialization context block: ```javascript window.NanoLog.init({ appId: 'YOUR_APP_ID', context: { userId: 'user_123_prod', signature: 'computed_hmac_hex_signature', // Backend-verified signature role: 'customer' } }); ``` --- ## B2B Compliance & Client-Side Privacy (GDPR & HIPAA) NanoLog captures user feedback safely by sanitizing inputs and visual assets locally *before* they are sent to our servers: * **Interactive PII Paint Tool**: Allows end users to use a paint brush directly on screenshots to overlay solid black blackout redaction blocks on sensitive numbers, charts, or personal details before submitting. * **Automated Text Redaction Scrubber**: Client-side scanner automatically targets and masks common PII patterns (emails, phone numbers) and password/CVV fields. --- ## Capture Context & Diagnostics Every visual feedback ticket automatically packages a clean client diagnostics payload to help engineering diagnose bugs without asking for HAR files: 1. **Viewport Screensize**: Current width and height (e.g., `1440x900`). 2. **Browser & Operating System**: Derived user-agent details (e.g., `Chrome 122 / macOS`). 3. **Current Location URL**: The exact active path where the user triggered the feedback. 4. **Client Console Logs & Exceptions**: Real-time error logs and client exceptions captured at the moment of submission. --- ## Widget Customization & White-Label Styling You can configure the widget's appearance directly in your dashboard or override styling on the fly using standard CSS variables targeting the Shadow DOM host. ### Custom CSS Variables Override Apply a `