How dhiliprn/customer-engagement-platform works
Customer Engagement Platform provides a browser-based console and authenticated API for managing businesses, customers, purchases, message templates, campaigns, messages, appointments, and review automations. Users sign in, select business data, and manage these capabilities through the UI; the API validates access and persists records in Supabase. Backend workers process scheduled messages, campaigns, and appointment reminders. WhatsApp delivery is explicitly simulated in this phase. Route-to-service links are supported by the source index and excerpts; unsampled implementation details are not assumed.
Main entry points: App.jsx Console application · app.js HTTP API · purchases.js Purchase routes · messages.js Message routes
Components 34
Web console
- Console application
frontend/src/App.jsx - Sign-in
frontend/src/Login.jsx - API client
frontend/src/api.js - Dashboard
frontend/src/UI_Pages/Dashboard.jsx - Business management
frontend/src/UI_Pages/Businesses.jsx - Customer management
frontend/src/UI_Pages/Customers.jsx - Purchase management
frontend/src/UI_Pages/Purchases.jsx - Message templates
frontend/src/UI_Pages/MessageTemplates.jsx - Campaign management
frontend/src/UI_Pages/Campaigns.jsx - Message management
frontend/src/UI_Pages/Messages.jsx - Appointment management
frontend/src/UI_Pages/Appointments.jsx - Review automation
frontend/src/UI_Pages/ReviewAutomation.jsx - User profiles
frontend/src/UI_Pages/UserProfiles.jsx - Supabase auth client
frontend/src/supabaseClient.js
API and access
- HTTP API
backend/src/app.js - Authentication and access
backend/src/middleware/auth.js - Business routes
backend/src/routes/businesses.js - Customer routes
backend/src/routes/customers.js - Purchase routes
backend/src/routes/purchases.js - Template routes
backend/src/routes/messageTemplates.js - Campaign routes
backend/src/routes/campaigns.js - Message routes
backend/src/routes/messages.js - Appointment routes
backend/src/routes/Appointments.js - Review routes
backend/src/routes/reviewAutomations.js - Profile routes
backend/src/routes/userProfiles.js
Engagement services
- Business records
backend/src/services/businesses.js - Customer records
backend/src/services/customers.js - Purchase records
backend/src/services/purchases.js - Template records
backend/src/services/messageTemplates.js - Campaign records
backend/src/services/campaigns.js - Message records
backend/src/services/messages.js - Appointment records
backend/src/services/Appointments.js - Review automation records
backend/src/services/reviewAutomations.js
Other components
- Console user
Connections 48
- Console user → Console application: uses
- Console application → Sign-in: renders
frontend/src/App.jsx - Console application → API client: calls
frontend/src/App.jsx - Console application → Dashboard: renders
frontend/src/App.jsx - Console application → Business management: renders
frontend/src/App.jsx - Console application → Customer management: renders
frontend/src/App.jsx - Console application → Purchase management: renders
frontend/src/App.jsx - Console application → Message templates: renders
frontend/src/App.jsx - Console application → Campaign management: renders
frontend/src/App.jsx - Console application → Message management: renders
frontend/src/App.jsx - Console application → Appointment management: renders
frontend/src/App.jsx - Console application → Review automation: renders
frontend/src/App.jsx - Console application → User profiles: renders
frontend/src/App.jsx - Console application → Supabase auth client: checks session
frontend/src/App.jsx - Sign-in → Supabase auth client: authenticates
frontend/src/Login.jsx - API client → Supabase auth client: gets token
frontend/src/api.js - API client → HTTP API: sends requests
- HTTP API → Authentication and access: applies
backend/src/app.js - HTTP API → Business routes: mounts
backend/src/app.js - HTTP API → Customer routes: mounts
backend/src/app.js - HTTP API → Purchase routes: mounts
backend/src/app.js - HTTP API → Template routes: mounts
backend/src/app.js - HTTP API → Campaign routes: mounts
backend/src/app.js - HTTP API → Message routes: mounts
backend/src/app.js - HTTP API → Appointment routes: mounts
backend/src/app.js - HTTP API → Review routes: mounts
backend/src/app.js - HTTP API → Profile routes: mounts
backend/src/app.js - Business routes → Business records: calls
- Customer routes → Customer records: calls
backend/src/routes/customers.js - Customer routes → Business records: validates business
backend/src/routes/customers.js - Purchase routes → Purchase records: calls
backend/src/routes/purchases.js - Purchase routes → Customer records: calls
backend/src/routes/purchases.js - Purchase routes → Business records: validates business
backend/src/routes/purchases.js - Purchase routes → Review automation records: calls
backend/src/routes/purchases.js - Purchase routes → Template records: calls
backend/src/routes/purchases.js - Purchase routes → Message records: calls
backend/src/routes/purchases.js - Template routes → Template records: calls
backend/src/routes/messageTemplates.js - Template routes → Business records: validates business
backend/src/routes/messageTemplates.js - Campaign routes → Campaign records: calls
backend/src/routes/campaigns.js - Campaign routes → Business records: validates business
backend/src/routes/campaigns.js - Campaign routes → Template records: calls
backend/src/routes/campaigns.js - Message routes → Message records: calls
backend/src/routes/messages.js - Message routes → Business records: calls
backend/src/routes/messages.js - Message routes → Customer records: calls
backend/src/routes/messages.js - Message routes → Campaign records: calls
backend/src/routes/messages.js - Message routes → Template records: calls
backend/src/routes/messages.js - Appointment routes → Appointment records: calls
backend/src/routes/Appointments.js - Appointment routes → Business records: calls
backend/src/routes/Appointments.js