Skip to content

A microservices-based architecture consisting of 6 microservices(Upload, Notification, Messaging, Authentication, Discovery, API gateway). These were dockerized and managed using Kubernetes making the services highly available and scalable.

Notifications You must be signed in to change notification settings

Yugma2605/Microservices-Chat-Platform

Repository files navigation

Typing SVG

📚 About The Project

The **Secure Messaging Microservices Architecture** is a modern messaging platform designed to handle high volumes of users while maintaining a strong focus on security and performance. This system consists of microservices built using **Spring Boot**, **Docker**, **Kubernetes**, and **Kafka** to provide efficient and scalable communication between users.

Key features include secure authentication, real-time messaging, file uploads, and notifications. The system supports 10,000+ users while optimizing latency and reducing server costs. By using technologies such as JWT, WebSocket, and Kafka, the architecture improves security, reduces latency by 20%, and ensures that the platform can scale horizontally.

💻 Technologies Used:

  • Backend: Spring Boot (Java)
  • Messaging: WebSocket, Kafka
  • Security: JWT (JSON Web Tokens)
  • Containerization: Docker
  • Orchestration: Kubernetes
  • CI/CD: Jenkins, GitLab CI

🚀 Key Features:

  • Authentication: Secure user authentication using JWT tokens.
  • Real-time Messaging: Messages sent via WebSocket with low latency.
  • File Uploads: Efficient handling of media using microservices.
  • Notifications: Real-time push notifications for message updates.
  • High Scalability: Supports 10,000+ concurrent users.
  • CI/CD Pipeline: Automated deployments to production using Docker and Kubernetes.

🔧 Tech Stack

Spring Boot Docker Kubernetes Kafka JWT WebSocket CI/CD

🎨 Features

  • Secure Authentication:

    • User authentication using JWT to secure access to the platform.
    • Token-based authentication ensures stateless and scalable user sessions.
  • Real-Time Messaging:

    • WebSocket is used for real-time communication with low-latency delivery of messages.
    • Support for group messaging, private messaging, and message history.
  • File Uploads:

    • Secure upload and storage of media files (images, documents, etc.).
    • Media files are handled through a dedicated microservice, ensuring scalability and performance.
  • Notifications:

    • Real-time push notifications notify users of new messages, updates, and activities.
  • Kafka for Messaging:

    • Kafka is integrated to handle asynchronous messaging, which helps improve performance, message queuing, and ensure system reliability at scale.
  • CI/CD:

    • Docker containers encapsulate the microservices.
    • Kubernetes orchestrates the deployment, scaling, and management of microservices.
    • Automated CI/CD pipeline using Jenkins or GitLab CI for seamless deployment to AWS EC2.

🏗️ Architecture

The Secure Messaging Microservices Architecture is designed to be scalable, secure, and performant. The architecture includes several core components:

  • Microservices:

    • Authentication Service: Manages user registration, login, and JWT token generation.
    • Messaging Service: Handles real-time messaging using WebSocket.
    • File Upload Service: Manages media file uploads.
    • Notification Service: Sends real-time notifications to users.
  • Kafka:

    • Used for asynchronous communication between microservices, ensuring that the system can scale horizontally without bottlenecks.
  • Docker & Kubernetes:

    • Docker containers are used to package each microservice, making them portable and consistent across environments.
    • Kubernetes manages the containers, enabling automatic scaling, load balancing, and failure recovery.
  • CI/CD Pipeline:

    • Automated build and deployment pipeline using Jenkins or GitLab CI, reducing manual intervention and improving deployment speed by 30%.
    • Continuous testing and deployment to AWS EC2 reduce costs and optimize resources by 15%.

⚙️ Installation Steps

To run this project locally or deploy it to a cloud provider, follow these steps:

Prerequisites:

  1. Docker installed on your machine.
  2. Kubernetes configured for container orchestration.
  3. Kafka running locally or on a cloud provider.
  4. Jenkins or GitLab CI for CI/CD pipeline.
  5. AWS EC2 (or another cloud provider) for deployment.

Steps to Run:

  1. Clone the repository:

    git clone https://github.com/your-username/secure-messaging-microservices.git
    cd secure-messaging-microservices
  2. Build Docker Images: For each microservice, build a Docker image:

    docker build -t messaging-auth-service ./auth-service
    docker build -t messaging-service ./messaging-service
    docker build -t file-upload-service ./file-upload-service
    docker build -t notification-service ./notification-service
  3. Set Up Kafka:

    • Install Kafka locally or set up an instance on a cloud provider.
    • Ensure that each microservice is configured to connect to Kafka.
  4. Set Up Kubernetes:

    • Use kubectl to deploy the Docker containers to a Kubernetes cluster.
    • Apply the Kubernetes deployment files for each microservice:
    kubectl apply -f k8s/auth-service-deployment.yaml
    kubectl apply -f k8s/messaging-service-deployment.yaml
    kubectl apply -f k8s/file-upload-service-deployment.yaml
    kubectl apply -f k8s/notification-service-deployment.yaml
  5. Run the Application:

    • The system will automatically scale and handle requests across the deployed containers.
  6. Access the App: Once deployed, you can access the platform through the AWS EC2 instance or your local Kubernetes setup.

🌐 Live Demo

Check out the live version of the Secure Messaging Platform:

Secure Messaging Platform - Live Demo

🔮 Future Improvements

  • End-to-End Encryption for secure messaging.
  • Voice/Video Call Integration for real-time communication.
  • AI-Powered Message Classification and spam detection.
  • Implement Message Search with filters.

📬 Contact

Feel free to reach out for any inquiries or suggestions related to the project!

LinkedIn: Vrukshal Patel LinkedIn: Yugma Patel LinkedIn: Ansh Ray

About

A microservices-based architecture consisting of 6 microservices(Upload, Notification, Messaging, Authentication, Discovery, API gateway). These were dockerized and managed using Kubernetes making the services highly available and scalable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •