Skip to content

Commit d176005

Browse files
committed
docs: update socila media project
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
1 parent dcae260 commit d176005

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

01-system-design/06-scenario/03-social-media.adoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,45 @@ Enterprise_Boundary(b0, "X Platform") {
3838

3939
[source, mermaid]
4040
----
41+
C4Container
42+
title Container Diagram - Social Media Feed (X)
43+
44+
System_Ext(notification_system, "🔔 Notification System", "External push/email infrastructure", $tags="v1.0")
45+
System_Ext(media_service, "🖼️ Media Service", "Stores and serves images/videos", $tags="v1.0")
46+
System_Ext(auth_service, "🔐 Auth Service", "Authentication and token validation", $tags="v1.0")
47+
System_Ext(analytics_system, "📊 Analytics Service", "Collects engagement metrics", $tags="v1.0")
48+
Person(user, "🧑 User", "Person who interacts with the platform via web or mobile", $tags="v1.0")
49+
50+
Container_Boundary(c1, "📣 Feed System") {
51+
Container(web_app, "🌐 Web App", "React", "Web interface to browse, post, and interact with tweets")
52+
Container(mobile_app, "📱 Mobile App", "Flutter", "Mobile access to feed and user actions")
53+
Container(api_gateway, "🛡 API Gateway", "Spring Cloud Gateway", "Entry point for clients and routing")
54+
Container(user_service, "🧑‍🤝‍🧑 User Service", "Java, Spring Boot", "Handles profiles, followers, and authentication integration")
55+
Container(tweet_service, "🐦 Tweet Service", "Java, Spring Boot", "Manages posting, deleting, and retrieving tweets")
56+
Container(feed_service, "📥 Feed Service", "Java, Spring Boot", "Assembles personalized timelines")
57+
Container(interaction_service, "❤️ Interaction Service", "Java, Spring Boot", "Handles likes, retweets, and comments")
58+
ContainerDb(database, "🗃️ Feed Database", "Cassandra", "Stores tweets, timelines, and interactions")
59+
Container(cache, "⚡ Redis Cache", "Redis", "Caches hot feeds and trending posts")
60+
}
61+
62+
Rel(user, web_app, "Uses", "HTTPS")
63+
Rel(user, mobile_app, "Uses", "HTTPS")
64+
Rel(web_app, api_gateway, "Calls", "HTTPS")
65+
Rel(mobile_app, api_gateway, "Calls", "HTTPS")
66+
67+
Rel(api_gateway, user_service, "Routes auth/profile requests", "REST")
68+
Rel(api_gateway, tweet_service, "Routes tweet actions", "REST")
69+
Rel(api_gateway, feed_service, "Routes feed queries", "REST")
70+
Rel(api_gateway, interaction_service, "Routes likes/comments", "REST")
71+
72+
Rel(tweet_service, database, "Stores tweets", "Async/Batch")
73+
Rel(feed_service, cache, "Reads hot timelines", "Redis")
74+
Rel(feed_service, database, "Reads personalized timeline", "Cassandra")
75+
Rel(interaction_service, database, "Updates likes/comments", "Async")
76+
Rel(tweet_service, media_service, "Uploads/loads media", "HTTPS")
77+
Rel(user_service, auth_service, "Validates token", "HTTPS")
78+
Rel(tweet_service, analytics_system, "Tracks tweet activity", "Async")
79+
Rel(interaction_service, notification_system, "Triggers notifications", "HTTPS")
4180
----
4281

4382
=== System Integration Flow

0 commit comments

Comments
 (0)