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