feat: implement chatbot logic and notification system with security updates
Overview
This Merge Request implements the core logic for the AI-powered chatbot and the notification system within the Support microservice. It also includes critical security configurations to allow public access to the chatbot and ensures session resilience.
Key Changes
Chatbot & AI Integration
- Integrated OpenAI API to provide intelligent support responses.
- Implemented
ChatbotServiceandChatbotControllerto handle user interactions. - Added Session Resilience: Implemented automatic session recovery to prevent 404 errors during long-running or expired chatbot sessions.
Notification System
- Created the foundation for the notification module (Services, Repositories, and Controllers).
- Added support for templates and user preferences.
🔒 Security & Configuration
- Updated
SecurityConfigto permit public access to chatbot endpoints (no authentication required for basic assistance). - Externalized sensitive data (API Keys) using environment variables.
- Configured CORS and header filtering to ensure smooth communication with the frontend gateway.
Architecture & Refactoring
- Cleaned up exception handling with a
GlobalExceptionHandler. - Added unit tests for
AgentServiceandNotificationServiceto ensure reliability.
Testing Performed
- Validated all endpoints via Postman.
- Verified that the chatbot is accessible without a Keycloak token while other support endpoints remain secured.
- Ran
mvn clean installto ensure no regressions in the build.