A comprehensive web application for analyzing contact center conversations with sentiment analysis, entity recognition, script compliance checking, and call quality assessment.
- Conversation Upload: Upload conversation transcriptions via Excel files
- Text Analysis: Sentiment analysis, entity extraction, and conversational categorization
- Script Compliance: Verify agents followed the prescribed call script
- Call Quality Scoring: Comprehensive call quality metrics based on multiple factors
- Multi-Client Support: Support for multiple clients, products, and agents
- RESTful API: Complete API for all operations
- Real-time Dashboard: Monitor conversations and analysis in real-time
- Frontend: Next.js 16, React 19, TypeScript
- Backend: Next.js API Routes
- Database: MySQL 8.0+
- Styling: Tailwind CSS 4, Radix UI
- File Upload: XLSX parsing
- UI Components: Radix UI, Lucide Icons
- Node.js 20.9.0 or higher
- MySQL 8.0 or higher
- npm or yarn
-
Clone and navigate to the project
cd app -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local # Edit .env.local with your MySQL credentials -
Create the database
mysql -u root -p < scripts/schema.sql
src/
├── app/
│ ├── api/
│ │ ├── analyze/ # Conversation analysis endpoint
│ │ ├── clients/ # Client management
│ │ ├── conversations/ # Conversation CRUD
│ │ ├── products/ # Product management
│ │ └── upload/ # File upload handler
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── components/
│ ├── AnalyzeConversation.tsx
│ ├── AnalysisResults.tsx
│ ├── ConversationUpload.tsx
│ └── ui/
│ └── button.tsx
├── lib/
│ ├── db.ts # Database connection
│ └── helpers.ts # Helper functions
├── services/
│ ├── analysisService.ts # Text analysis logic
│ └── excelService.ts # Excel parsing
├── types/
│ └── index.ts # TypeScript types
└── utils/
scripts/
└── schema.sql # MySQL schema
GET /api/clients- List all clientsPOST /api/clients- Create a new client
GET /api/products?client_id={id}- List productsPOST /api/products- Create a new product
GET /api/conversations?client_id={id}&analyzed=true|false- List conversationsPOST /api/conversations- Create a conversation
POST /api/analyze- Analyze a conversationGET /api/analyze?conversation_id={id}- Get analysis results
POST /api/upload- Upload Excel file with conversations
- clients - Client organization records
- products - Products/services offered by clients
- product_questions - Questions agents should ask for each product
- conversations - Call transcriptions
- sentiment_analysis - Sentiment analysis results
- entities - Extracted entities from conversations
- analysis_results - Overall analysis results
- conversation_categories - Categorized conversation topics
- call_quality_history - Agent performance tracking
npm run devThe app will be available at http://localhost:3002
npm run build
npm startnpm run lintExpected columns in the Excel file:
transcription- The conversation text (required)agent_id- ID of the agent handling the callduration_seconds- Call duration in secondsproduct_name- Optional product name referenceclient_name- Optional client name reference
- Positive, negative, or neutral classification
- Confidence scoring based on keyword analysis
- Customizable sentiment keywords
- Email addresses
- Phone numbers
- Product mentions
- Organization names
- Measures adherence to the prescribed call script
- Identifies script deviations
- Tracks questions asked vs. required questions
- Script Compliance Score (40% weight)
- Question Coverage Score (40% weight)
- Sentiment Score (20% weight)
- Overall quality range: 0-100
Edit .env.local to configure:
- MySQL connection details
- Server port
- Node environment
- Real NLP/ML models for sentiment and NER
- Advanced analytics and reporting
- Agent performance dashboards
- Keyword spotting for competitive intelligence
- Call recordings storage and player
- Integration with contact center systems
- Custom script templates per product
- A/B testing for call scripts
- Multi-language support
This project is proprietary and confidential.
For issues or questions, please contact the development team.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.