How ivanshu111/customerrelationshipmanagement_crm works
This is a multi-service enterprise CRM: employees and administrators use a React SPA to manage customers, interactions, lead conversion, workforce lifecycle requests, and analytics. The main request path runs from the authenticated frontend through the Spring REST API into domain services and repositories backed by MySQL. Separate branches provide live SSE notifications, natural-language SQL analytics through a Python service, and transactional email through a .NET service. The README documents these integrations; sampled code confirms selected entry points and calls, so unsampled domain wiring is summarized rather than inferred.
Main entry points: service Domain services · repository Persistence repositories · App.jsx React SPA · controller REST controllers
Components 24
CRM Client
- React SPA
Frontend/CRM/src/App.jsx - Protected routes
Frontend/CRM/src/routers/AppRoutes.jsx - Chatbot widget
Frontend/CRM/src/components/ChatbotWidget.jsx
CRM API
- REST controllers
Backend/CRM/src/main/java/com/sunbeam/CRM/controller - JWT security
Backend/CRM/src/main/java/com/sunbeam/CRM/security - Persistence repositories
Backend/CRM/src/main/java/com/sunbeam/CRM/repository - CRM database
- SSE endpoint
Backend/CRM/src/main/java/com/sunbeam/CRM/controller/NotificationSseController.java - SSE delivery
Backend/CRM/src/main/java/com/sunbeam/CRM/service/impl/SseNotificationService.java
CRM Workflows
- Domain services
Backend/CRM/src/main/java/com/sunbeam/CRM/service - Customer management
Backend/CRM/src/main/java/com/sunbeam/CRM/service/CustomerService.java - Lead pipeline
Backend/CRM/src/main/java/com/sunbeam/CRM/service/LeadsService.java - Interaction history
Backend/CRM/src/main/java/com/sunbeam/CRM/service/InteractionService.java - Workforce lifecycle
Backend/CRM/src/main/java/com/sunbeam/CRM/service/AdminService.java - Applicant workflow
Backend/CRM/src/main/java/com/sunbeam/CRM/service/RecruitmentService.java
AI Analytics
- NL-to-SQL API
chatbot/main.py - SQL generation
chatbot/nlp_sql.py - Analytics database access
chatbot/database.py
External Services
- Gemini AI
- Email client
Backend/CRM/src/main/java/com/sunbeam/CRM/service/impl/EmailClientService.java - Email API
Net/CrmEmailService/Controllers/EmailController.cs - SMTP dispatch
Net/CrmEmailService/Services/EmailService.cs
Other components
- Employees and admins
- SMTP provider
Connections 28
- Employees and admins → React SPA: use
- React SPA → Protected routes: render
- Protected routes → REST controllers: REST requests
- REST controllers → JWT security: authorize
- REST controllers → Domain services: dispatch
- Domain services → Customer management: customer operations
- Domain services → Lead pipeline: lead operations
- Domain services → Interaction history: interaction operations
- Domain services → Workforce lifecycle: admin operations
- Domain services → Applicant workflow: recruitment operations
- Customer management → Persistence repositories: persist and query
- Lead pipeline → Persistence repositories: persist and query
- Interaction history → Persistence repositories: persist and query
- Workforce lifecycle → Persistence repositories: persist and query
- Applicant workflow → Persistence repositories: persist and query
- Persistence repositories → CRM database: read and write
- React SPA → SSE endpoint: EventSource
- SSE endpoint → SSE delivery: open connection
- SSE delivery → React SPA: push events
- Chatbot widget → NL-to-SQL API: submit query
- NL-to-SQL API → SQL generation: process question
- SQL generation → Gemini AI: generate SQL
- SQL generation → Analytics database access: execute query
- Analytics database access → CRM database: read CRM data
- Domain services → Email client: send email
- Email client → Email API: HTTP request
- Email API → SMTP dispatch: dispatch
- SMTP dispatch → SMTP provider: send message