Skip to content

ShaimaaSabry/twitter

Repository files navigation

Twitter Java Version Spring Boot

Practical implementation of a Twitter-like application.

Swagger: http://localhost:8080/swagger-ui/index.html

System Design

A Twitter-style platform built with clean architecture, domain-driven design (DDD), and event-driven architecture. Users can create tweets, follow others, and browse timelines.

Features:

  • Tweets: Create tweets and view your own profile timeline.
  • Search: Find tweets by keyword.
  • Follows & Timelines: Follow users and see their tweets in your home timeline.

Pluggable Data Layer:

The clean architecture design keeps business logic independent of infrastructure so databases and search engines can be swapped and compared, enabling side-by-side evaluation of the following different stores:

  • PostgreSQL
  • MongoDB
  • Elasticsearch

This lets you compare search capabilities (e.g., PostgreSQL full-text, MongoDB text indexes, Elasticsearch inverted index) without changing core domain code.

Event-Driven Architecture:

Timelines are generated via an event-driven flow: when a user posts a new tweet, an event is emitted; a handler consumes the event and fan-outs the tweet into the timelines of all the author’s followers. This decouples write paths from read models and keeps timelines fast.

Technologies

  • Gradle
  • Java 17
  • Spring Boot
  • PostgreSQL
  • Elasticsearch
  • MongoDB
  • Docker Compose

Authors & Copyrights

Shaimaa Sabry

GitHub LinkedIn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published