A full-stack customer messaging application with AI-powered analysis, real-time updates and a web dashboard.
| Service | URL |
|---|---|
| Frontend | https://branch-chat-system-application.vercel.app |
| Backend API | https://branch-chat-system-application-1.onrender.com/api/health |
- Customer Message Management: View, filter and respond to customer messages
- AI-Powered Analysis: Automatic message analysis for urgency, sentiment and suggested responses using Google Gemini AI
- Real-time Updates: Server-Sent Events (SSE) for live message notifications
- CSV Import: Bulk import messages from CSV files
- Canned Responses: Pre-built response templates for quick replies
- Advanced Search: Search by customer name, email or message content with debouncing
- Pagination: Load more functionality for large message volumes
- Offline Detection: Visual indicator and graceful handling of offline states
- Keyboard Shortcuts: Quick actions (Escape to close modals, Ctrl+R to refresh)
- Responsive Design: Works on desktop and mobile devices
- Request Caching: Optimized API calls with client-side caching
- Error Boundaries: Graceful error handling with recovery options
- Skeleton Loading: Smooth loading states for better perceived performance
- Memoized Components: Optimized React rendering with React.memo
- Framework: Express.js
- Database: SQLite
- AI: Google Gemini 2.0 Flash
- Real-time: Server-Sent Events
- Framework: React.js
- Styling: Tailwind CSS
- Node.js v18.0.0 or higher
- npm or yarn package manager
- Google Gemini API key (optional, for AI features)
git clone https://github.com/imhrsit/Branch-chat-system-application.git
cd Branch-chat-system-applicationcd server
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Edit .env with your configuration
# Add your Gemini API key if you want AI features
# Start the server
npm startThe backend will start on http://localhost:3001
cd client
# Install dependencies
npm install
# Start the development server
npm run devThe frontend will start on http://localhost:5173
The CSV file should contain the following columns:
customer_name,customer_email,customer_phone,message_content,account_type
John Smith,john@example.com,+1234567890,I need help with my account billing,premium
Jane Doe,jane@example.com,+0987654321,How do I reset my password?,standard
Bob Wilson,bob@company.com,+1122334455,URGENT: System is down for our team,enterprisecustomer_name- Customer's full namecustomer_email- Customer's email addressmessage_content- The message content
customer_phone- Customer's phone numberaccount_type- Account type:standard,premium,enterprise
| Shortcut | Action |
|---|---|
Escape |
Close modals or go back from conversation view |
Ctrl + R |
Refresh message list |
Ctrl + Shift + I |
Open CSV import modal |
branch_assignment/
├── server/ # Backend application
│ ├── app.js # Express app entry point
│ ├── routes/ # API route handlers
│ │ ├── messages.js # Message endpoints
│ │ ├── customers.js # Customer endpoints
│ │ ├── agents.js # Agent endpoints
│ │ └── cannedResponses.js
│ ├── services/ # Business logic
│ │ └── aiService.js # Gemini AI integration
│ ├── db/ # Database
│ │ └── init.js # Database initialization
│ ├── utils/ # Utility functions
│ │ └── csvParser.js # CSV parsing
│ └── data/ # Sample data
│
├── client/ # Frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Navbar.jsx
│ │ │ ├── Sidebar.jsx
│ │ │ ├── MessageList.jsx
│ │ │ ├── MessageCard.jsx
│ │ │ ├── ConversationView.jsx
│ │ │ ├── Toast.jsx
│ │ │ ├── ImportCSVModal.jsx
│ │ │ ├── CannedResponsesModal.jsx
│ │ │ └── ErrorBoundary.jsx
│ │ ├── hooks/ # Custom React hooks
│ │ │ └── useSSE.js # SSE, debounce, online status hooks
│ │ ├── services/ # API services
│ │ │ └── api.js # API client with caching
│ │ ├── utils/ # Utility functions
│ │ │ └── helpers.js
│ │ ├── App.jsx # Main app component
│ │ ├── main.jsx # App entry point
│ │ └── index.css # Global styles
│ └── index.html
│
└── README.md
This project is created as an assignment for Branch International and is not licensed for commercial use.
For questions or feedback about this project:
- Developer: Harsh Tiwari