Skip to content

AdityaByte/Connect-Backend-SpringBoot

Repository files navigation

Connect - Backend

This repository holds the Backend for Connect, a modern application designed to facilitate real-time chat and seamless communication.

License GitHub last commit Build Status Stars

Spring Boot Spring Security Kafka Redis MongoDB Java Lombok Functional Programming

Features

  • 🔐 Spring Security (MVC) – Stateless JWT-based authentication and role-based authorization for both REST and WebSocket endpoints.
  • 📲 STOMP over WebSocket – Real-time bi-directional communication using WebSocket and STOMP protocol.
  • 🧾 User Registration & Login APIs – REST endpoints for secure signup, login, and token generation.
  • 💬 Chat APIs – Send and receive chat messages through REST or live WebSocket connection.
  • 🔄 Kafka Messaging – Asynchronous message streaming for decoupled and scalable communication pipelines.
  • Redis Buffer – Temporary in-memory storage for messages before being persisted to MongoDB.
  • 🧠 MongoDB Storage – Flexible NoSQL data storage for users and message history.
  • 🧼 Clean MVC Architecture – Organized into Controllers, Services, Repositories, DTOs, and Config layers.
  • 🧪 Functional Programming Style – Uses Optional, lambdas, immutable DTOs, and method references for clean and modern Java code.
  • 📦 Configurable via application.properties – Easily switch between dev, test, and prod profiles with Spring Profiles.

Architecture

Enforces a Monolithic Architecture with modular layering, built for scalability and clean separation of concerns.

Connect Architecture Diagram

Tech Stack

  • Java 17
  • 🌱 Spring Boot 3
  • 🔐 Spring Security (JWT)
  • 💬 STOMP WebSocket
  • 📨 Apache Kafka
  • Redis
  • 🍃 MongoDB
  • 🧪 Lombok + Functional Java

Getting Started

# 1. Clone the repository
git clone https://github.com/AdityaByte/Connect-Backend-SpringBoot.git
cd Connect-Backend-SpringBoot

# 2. Start MongoDB, Redis, and Kafka locally or via Docker

# 3. Configure environment in:
src/main/resources/application.properties

# 4. Build and run the app
./mvnw spring-boot:run

Author

Aditya Pawar 🚀 Software Developer 🌐 GitHub • 📬 Email