How utkarsh-pratik/ai-powered-dynamic-web-personalization-engine works
Project Type and Purpose
• This is a full-stack web application comprised of:
– A client-side personalization engine (JavaScript snippet embedded in any website)
– An admin dashboard (React SPA) for configuration, analytics, A/B tests, and segment management
– A backend Node.js service exposing REST endpoints for settings, segment data, tracking events, and analytics storage
• Purpose: Enable in-browser AI-driven personalization of website content, collect user events, and provide analytics and management via a dashboard.
File Structure
• Top-level folders:
– /backend: Node.js API server (server.js, package.json)
– /dashboard: React front-end (src/*.jsx), static assets in public/, including the published engine under public/engine
• The engine subfolder (dashboard/public/engine/src) holds core modules: dom.js, features.js, ml.js, privacy.js, tracking.js
• No microservices; it’s a monolithic backend + separate front-end + distributed JS engine.
README for Insights
• Confirms plug-and-play nature: embed engine snippet, configure via dashboard.
• Mentions extensibility: adding new event types and clusters in the engine source, customizing dashboard components.
a. Main Components
1. Personalization Engine (client-side JS)
2. Host Website (where engine is embedded)
3. Dashboard Front-End (React SPA)
4. Backend API Server (Node.js)
5. Database (e.g., MongoDB or PostgreSQL) for persisting configurations, events, analytics
6. (Optional) Authentication Service / External ML Service if added later
b. Relationships & Data Flows
• Engine → Backend API:
– Fetch personalization rules / segment configs
– Post tracking events and analytics data
• Host Website <– Engine:
– Engine reads DOM, applies AI models to personalize elements in real time
• Dashboard → Backend API:
– CRUD operations on settings, segments, A/B tests
– Query analytics events & usage statistics
• Backend API ↔ Database: read/write persisted data
c. Architectural Patterns & Principles
• Single-page app for dashboard front-end (component-based React)
• RESTful service layer in backend
• Client-side “edge compute” AI module (in-browser ML)
• Separation of concerns: personalization logic (engine), presentation/management (dashboard), data & business logic (API + DB)
d. Key Technologies
• JavaScript engine modules (vanilla JS + in-browser ML code)
• React + JSX for dashboard UI
• Node.js + Express (implied) for API server
• (Database of choice) for persistence
Diagramming Conventions
• Labels:
– Name each component clearly (e.g., “Personalization Engine”, “React Dashboard”, “Node.js API”)
• Blue for client-side components
• Green for backend
• Orange for data stores