A full-stack chatbot conversation analysis platform built with React + Vite frontend and Node.js backend. Generate insightful reports from chatbot conversations using Groq API with LLaMA models, featuring secure authentication, real-time analytics, and flexible export options.
- π€ AI-Powered Analysis - Leverages Groq API with LLaMA models for intelligent conversation insights
- π Comprehensive Reports - Generate detailed analytics from chatbot conversation
- π Secure Authentication - User authentication and authorization system
- β‘ Fast Performance - Built with Vite for lightning-fast development and production builds
- π¬ Interactive Chat Interface - Real-time chatbot interaction and testing
- π Multiple Export Options - Export reports in various formats (PDF, CSV, JSON)
- πΌ Enterprise Ready - Suitable for analytics, research, and business intelligence
- π PostgreSQL Database - Robust data storage with organized models and migrations
- Framework: React 18
- Build Tool: Vite
- Styling: CSS3 / Tailwind CSS
- Routing: React Router
- State Management: React Context / Redux (if applicable)
- Runtime: Node.js
- Framework: Express.js
- Database: PostgreSQL
- ORM: Sequelize / Prisma
- API: RESTful architecture
- Authentication: JWT / Session-based
- AI Provider: Groq API
- Models: LLaMA (via Groq)
- Processing: Natural Language Processing (NLP)
Before you begin, ensure you have:
- Node.js (v18 or higher)
- PostgreSQL (v14 or higher)
- npm or yarn package manager
- Groq API key (Get one here)
git clone https://github.com/yourusername/chatbot-report-generator.git
cd chatbot-report-generator# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .envBackend .env Configuration:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=chatbot_reports
DB_USER=your_db_username
DB_PASSWORD=your_db_password
# Groq API Configuration
GROQ_API_KEY=your_groq_api_key_here
# JWT Secret (generate a random string)
JWT_SECRET=your_jwt_secret_key
# CORS Configuration
FRONTEND_URL=http://localhost:5173Initialize Database:
# Create PostgreSQL database
createdb chatbot_reports
# Run migrations
npm run migrate
# (Optional) Seed database with sample data
npm run seedStart Backend Server:
npm run dev
# Server runs on http://localhost:5000# Open new terminal and navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Create .env file
cp .env.example .envFrontend .env Configuration:
# API Configuration
VITE_API_URL=http://localhost:5000/api
VITE_GROQ_API_KEY=your_groq_api_key_hereStart Frontend Development Server:
npm run dev
# Application runs on http://localhost:5173Open your browser and navigate to:
http://localhost:5173
- Register a new account or login with existing credentials
- Secure JWT-based authentication
- Test your chatbot in real-time
- View conversation history
- Export chat transcripts
- Navigate to the Report Page
- Select conversation data to analyze
- Choose analysis type (sentiment, topics, performance)
- Click "Generate Report" to process with AI
- Access comprehensive dashboards
- View visualizations and metrics
- Track trends over time
- Download reports in PDF format
- Export raw data as CSV
- API integration for automated exports
chatbot-report-generator/
βββ backend/
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ middleware/ # Express middleware
β βββ models/ # Database models (Sequelize/Prisma)
β βββ routes/ # API routes
β βββ node_modules/ # Backend dependencies
β βββ package.json # Backend dependencies
β βββ server.js # Main server file
β
βββ frontend/
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # Reusable React components
β β βββ pages/ # Page components
β β β βββ AboutPage.jsx
β β β βββ AuthPage.jsx
β β β βββ ChatPage.jsx
β β β βββ ContactPage.jsx
β β β βββ HomePage.jsx
β β β βββ ReportPage.jsx
β β βββ services/ # API service functions
β β βββ App.jsx # Main App component
β β βββ index.css # Global styles
β βββ node_modules/ # Frontend dependencies
β βββ package.json # Frontend dependencies
β
βββ README.md # This file
POST /api/auth/register- Register new userPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/me- Get current user
GET /api/chat/history- Get chat historyPOST /api/chat/message- Send chat messageDELETE /api/chat/:id- Delete conversation
GET /api/reports- Get all reportsPOST /api/reports/generate- Generate new reportGET /api/reports/:id- Get specific reportDELETE /api/reports/:id- Delete reportGET /api/reports/:id/export- Export report
The system can generate various types of analytical reports:
- Sentiment Analysis - Understand user emotions and satisfaction levels
- Topic Extraction - Identify common themes, issues, and discussion points
- Performance Metrics - Analyze response times, resolution rates, and effectiveness
- User Engagement - Track conversation patterns, duration, and drop-off points
- Intent Classification - Categorize user queries and request types
- Conversation Flow - Visualize dialogue paths and decision trees
npm run dev # Start development server with nodemon
npm start # Start production server
npm run migrate # Run database migrations
npm run seed # Seed database with sample data
npm test # Run backend testsnpm run dev # Start Vite development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm test # Run frontend tests- JWT-based authentication
- Password hashing with bcrypt
- SQL injection prevention through ORM
- CORS configuration
- Rate limiting on API endpoints
- Input validation and sanitization
- Environment variable protection
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow ESLint configuration
- Write meaningful commit messages
- Add comments for complex logic
- Update documentation as needed
- Write tests for new features
Database Connection Error
# Check PostgreSQL is running
sudo service postgresql status
# Verify database credentials in .env filePort Already in Use
# Change PORT in backend/.env to different port
# Update VITE_API_URL in frontend/.env accordinglyGroq API Rate Limits
- Free tier has usage limits
- Consider upgrading plan for production use
- Implement request queuing for high traffic
- User authentication system
- Real-time chat interface
- AI-powered report generation
- Export functionality
- Real-time conversation monitoring dashboard
- Multi-language support for reports
- Advanced visualization with Chart.js/D3.js
- Integration with Slack, Discord, Telegram
- Custom report templates builder
- Scheduled automated reports via email
- WebSocket support for real-time updates
- Mobile app (React Native)
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, suggestions, or issues:
- GitHub Issues: Create an issue
- Email: your.email@example.com
- Documentation: View Docs
- Groq - For providing ultra-fast LLM inference
- Hugging Face - For LLaMA model hosting
- Vite - For blazing fast build tooling
- PostgreSQL - For robust database support
- The React and Node.js communities
Add screenshots of your application here once available
If you find this project useful, please consider:
- β Starring the repository
- π΄ Forking for your own use
- π’ Sharing with others
- π° Sponsoring the project
Built with β€οΈ for better chatbot analytics and insights
Made possible by Groq API, React, and the open-source community