How tarun1801/rackathon_binarybeast_admin_dasboard works
Project type and purpose
• This is a full-stack web application built for Rakathon’22.
• Purpose: ingest WhatsApp chat data via whatsapp-web.js, load it into a Neo4j graph database, run content/context-aware filtering and analytics, and surface actionable sales insights to both small vendors (frontend) and external consumers (B2B APIs for MNCs).
File structure
• Top-level directories:
• Shop_Frontend – React single-page application.
• Whatsaap_DB/rakathon22-neo4j-analytics-utkarsh – Node.js/Express backend with:
⁃ example.js – sample ingestion or test script.
⁃ routes.js – HTTP API endpoints.
⁃ model.js – Neo4j data-model and analytics logic.
⁃ package.json – dependencies including express, neo4j-driver, whatsapp-web.js.
• Whatsaap_DB/.wwebjs_auth – session storage for whatsapp-web.js.
• insight.ipynb – Jupyter notebook used for exploratory analysis.
README
• Confirms use of Neo4j, content/context filtering, target is to connect small businesses with tourism/food MNCs.
Main components
a. Frontend (React SPA)
• UI components under Shop_Frontend/src/components
• Static assets served from public/index.html
b. Backend (Node.js / Express)
• API layer (routes.js)
• Business logic & data-model (model.js)
• WhatsApp ingestion module (whatsapp-web.js using .wwebjs_auth for credentials)
c. Database
• Neo4j graph DB (hosted or local instance)
d. External services
• WhatsApp Web service (via whatsapp-web.js)
• Potential B2B consumers (Swiggy, Zomato, Makemytrip, etc.) – future API clients
e. Data-science/analysis
• Jupyter notebook (insight.ipynb) – offline analytics and model prototyping
Relationships & interactions
• User in browser → React SPA
• React SPA ↔ HTTP REST (or GraphQL) → Express API endpoints
• Express → (1) whatsapp-web.js client to fetch new chat messages → stores session under .wwebjs_auth
(2) neo4j-driver → persists and queries graph data
• Analytics results → exposed via API → consumed by React or third-party clients
• Notebook connects directly to Neo4j for advanced off-line analysis
Architectural patterns & design principles
• Separation of concerns:
• Presentation Layer (React)
• API Layer (Express routes)
• Data Layer (Neo4j + whatsapp ingestion)
• Modular services: whatsapp ingestion can be factored as its own microservice or background worker
• Graph-oriented data model for relationships (customers ↔ vendors ↔ products)
• Future extensibility: external MNC clients treated as API consumers, authentication/authorization plug-points