This project contains a simple implementation for a web-based customer service chat using Kotlin as the programming language and Spring Boot as the web framework.
The project scope is a simple CRUD REST server that allows clients to create chat rooms or sessions and send messages between customers and service agents.
Using HTTP REST verbs following the RESTful principles. Details can be found in the OpenAPI documentation:
To test a basic use case check the following http file: testing-requests.http
The project implementation only deals with the most basic functionalities of a customer chat software. and doesn't include several concepts that would be needed to be considered production ready. Here is a list of possible extensions that could be implemented:
- Containerization (Docker) and TestContainers: Incorporate Docker to facilitate project deployment, scalability, and isolation, and to make the project and prepare it for a possible future cloud deployment (e.g. with Kubernetes).
- Complete end-to-end testing coverage: Essential to verify the full functionality of the system, ensure that the business logic is correct, and therefore increase confidence in deployments.
- Public OpenAPI Documentation (Swagger). Publishing the OpenAPI documentation will improve the development experience for those working with the project. For example, front-end developers.
- Authentication and Authorization (JWT). For a production-ready application, it would be really important to include authentication of all users to access the system. Also protect the different entry points depending on user permissions. This could be implemented using a Json Web Token (JWT) standard.
- The presentation layer (frontend) The scope of the project does not include the presentation layer, but it would be necessary to to provide its services to end users. This layer could be implemented as an SPA using React and possibly React Native to provide a better UX on mobile devices.
- On-Disk Persistence Layer Another important point. Currently, the database is an embedded in-memory managed (H2). This would need to be updated to use an on-disk, independent database like Postgresql.
- Real-Time Communication To provide a realistic chat experience, a bidirectional channel for messages would need to be implemented between clients and these services. This is currently outside the scope of the project, but it would be interesting to have for a production-ready solution. WebSockets could be used to implement this two-way channel communication.
- Scalability Related to Docker and Kubernetes. Including a load balancing and autoscaling implementation would help the project to scale and perform while serving a large number of concurrent users.
- Additional business cases.
- Binary compatibility (images, audio, video, documents)
- Message history for each logged-in user
- Search capabilities
- Message replies
- Emoticons
- Archiving of chat sessions
- Feedback mechanism (users rate their experience)
- Integration with third party applications such as CRM or ticket systems
- Analytics, logging and reporting To track and analyze metrics such as message volume, response times, and user engagement to optimize chat performance and user satisfaction.
- Localization: To Provide automatic translation or support for multiple languages to enable global deployment.
- Security and Encryption: Being compliant with GDPR and include end-to-end message encryption, audit logs
- Chatbots (AI): Integrate chatbots for automated responses, FAQ handling, and AI-driven customer support.