Skip to content

Latest commit

Β 

History

History
98 lines (69 loc) Β· 2.65 KB

File metadata and controls

98 lines (69 loc) Β· 2.65 KB

πŸ“˜ Scalable MicroservicesArchitecture

A LinkedIn themed social platform built using Java and Spring Boot microservices, featuring scalable and distributed design with Kafka, Redis, Eureka, Docker, and centralized configuration and logging tools.


πŸš€ Tech Stack

  • Backend: Java, Spring Boot, Spring Cloud, Spring Data JPA
  • Microservices: Eureka, Spring Cloud Config, Resilience4j
  • Messaging: Apache Kafka
  • Containers: Docker, Docker Compose
  • Observability: ELK Stack, Zipkin
  • Database: PostgreSQL, Neo4j
  • Others: Redis, Kafka UI, Logstash, Maven

🧩 Microservices Included

Service Name Description
user-service Manages user profiles and authentication
post-service Handles posts, likes, and comments
connections-service Manages user connections (follow system)
notification-service Sends notification and emails
uploader-service Handles media uploads
api-gateway Routes external requests to microservices
discovery-server Eureka server for service registry
config-server Centralized configuration management

πŸ“¦ Setup Instructions

1. Clone the Repository

git clone https://github.com/premtsd-code/LinkedIn.git
cd LinkedIn

2. Run with Docker Compose

Make sure you have Docker and Docker Compose installed.

docker-compose up --build

This will spin up all services including Kafka, Kafka UI, Eureka, Config Server, and your microservices.


πŸ“‚ Project Structure

LinkedIn/
β”œβ”€β”€ api-gateway/
β”œβ”€β”€ config-server/
β”œβ”€β”€ connections-service/
β”œβ”€β”€ discovery-server/
β”œβ”€β”€ notification-service/
β”œβ”€β”€ post-service/
β”œβ”€β”€ uploader-service/
β”œβ”€β”€ user-service/
β”œβ”€β”€ logstash/
β”œβ”€β”€ docker-compose.yml
└── .gitlab-ci.yml

πŸ”§ Configuration

  • Centralized configs are managed via Spring Cloud Config Server
  • Service discovery with Eureka
  • Kafka is used for communication between microservices
  • Redis can be used for caching user data or tokens
  • Logging is routed to Logstash β†’ Elasticsearch β†’ Kibana

πŸ“Š Monitoring & Debugging

  • Kafka UI: Available at http://localhost:8090
  • Eureka Dashboard: Usually http://localhost:8761
  • Zipkin: http://localhost:9411
  • Kibana: Accessible on http://localhost:5601

πŸ–Ό Architecture Diagram

Architecture Diagram