A real-time feedback processing system that uses AI to analyze user feedback and provides instant insights through sentiment analysis, categorization, and summarization.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Infrastructure β
β (React) β β (Spring Boot) β β (Docker) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β User Input β β API Gateway β β Kafka + Redis β
β Dashboard β β WebSocket β β OpenAI API β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- User submits feedback through the React dashboard
- Backend receives the feedback via REST API
- Kafka processes the message asynchronously
- OpenAI analyzes the feedback using GPT-3.5-turbo
- Redis stores the enriched data
- WebSocket pushes real-time updates to the frontend
- Dashboard updates automatically with AI insights
- β Real-time Processing - Instant feedback analysis
- β AI Enrichment - Sentiment, category, and summary generation
- β Scalable Architecture - Kafka message queuing + Redis caching
- β Live Updates - WebSocket push notifications
- β Docker Ready - Easy deployment and scaling
- β Monitoring - Health checks and metrics
- Framework: Spring Boot 3.2.0
- Language: Java 17
- Build Tool: Maven
- Message Queue: Apache Kafka
- Cache: Redis
- Real-time: WebSocket
- AI: OpenAI GPT-3.5-turbo
- Framework: React 18.2.0
- HTTP Client: Axios
- WebSocket: SockJS + StompJS
- Routing: React Router
- Containerization: Docker + Docker Compose
- CI/CD: GitHub Actions
- Java 17
- Node.js 16+
- Docker & Docker Compose
- OpenAI API Key
git clone <repository-url>
cd insightflow# Create .env file
echo "OPENAI_API_KEY=your-openai-api-key" > .envdocker-compose up -dcd backend
./mvnw spring-boot:runcd frontend
npm install
npm start- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- Health Check: http://localhost:8080/api/health
POST /api/feedback
Content-Type: application/json
{
"userId": "user123",
"message": "I love the new dashboard!"
}GET /api/healthws://localhost:8080/ws-feedback
Topic: /topic/feedback
# OpenAI Configuration
OPENAI_API_KEY=your-openai-api-key
# Kafka Configuration
SPRING_KAFKA_BOOTSTRAP_SERVERS=localhost:9092
# Redis Configuration
SPRING_REDIS_HOST=localhost
SPRING_REDIS_PORT=6379
# Application Configuration
SERVER_PORT=8080- Kafka: localhost:9092
- Redis: localhost:6379
- Zookeeper: localhost:2181
{
"userId": "user123",
"message": "The new dashboard is amazing! Much better than before.",
"timestamp": 1718900000
}{
"userId": "user123",
"message": "The new dashboard is amazing! Much better than before.",
"timestamp": 1718900000,
"sentiment": "positive",
"category": "praise",
"summary": "User is very satisfied with the new dashboard improvements"
}insightflow/
βββ backend/ # Spring Boot Application
β βββ src/main/java/
β β βββ com/insightflow/
β β βββ controller/ # REST Controllers
β β βββ service/ # Business Logic
β β βββ config/ # Configuration
β β βββ model/ # Data Models
β β βββ consumer/ # Kafka Consumers
β βββ pom.xml
β βββ Dockerfile
βββ frontend/ # React Application
β βββ src/
β β βββ components/ # React Components
β β βββ services/ # API Services
β β βββ utils/ # Utilities
β βββ package.json
β βββ Dockerfile
βββ docs/ # Documentation
β βββ system-flow.md # Detailed system flow
β βββ architecture-diagram.md # Mermaid diagrams
β βββ quick-reference.md # Quick reference guide
βββ docker-compose.yml # Infrastructure setup
βββ README.md # This file
- Health: http://localhost:8080/actuator/health
- Metrics: http://localhost:8080/actuator/metrics
- Info: http://localhost:8080/actuator/info
# Check container status
docker-compose ps
# View logs
docker-compose logs -f kafka
docker-compose logs -f redis-
Java Version Mismatch
# Check Java version java -version # Should show Java 17
-
Maven Build Issues
cd backend ./mvnw clean install -
Docker Issues
# Restart containers docker-compose down docker-compose up -d -
OpenAI API Issues
- Verify API key is valid
- Check API quota and limits
- Ensure network connectivity
# Backend logs
./mvnw spring-boot:run
# Docker logs
docker-compose logs -f
# Frontend logs
npm startcd backend
./mvnw test# Test feedback submission
curl -X POST http://localhost:8080/api/feedback \
-H "Content-Type: application/json" \
-d '{"userId":"test","message":"Great app!"}'
# Test health check
curl http://localhost:8080/api/health- System Flow - Detailed system architecture and flow
- Architecture Diagrams - Visual diagrams using Mermaid
- Quick Reference - Quick start and troubleshooting guide
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the troubleshooting section
- Review the documentation
Built with β€οΈ using Spring Boot, React, Kafka, Redis, and OpenAI