5. Building Block View¶
5.1 Level 1 — Containers¶
Container |
Technology |
Responsibility |
|---|---|---|
React SPA |
React / TypeScript |
Renders UI, routes user actions to the appropriate service |
Users Service |
Python 3.12 / FastAPI |
Authentication (JWT), user profiles, follow graph |
Posts Service |
Python 3.12 / FastAPI |
Create/read posts, likes, aggregated timeline feed |
Messaging Service |
Python 3.12 / FastAPI |
Direct messages, mentions |
Users DB |
PostgreSQL ( |
Persistent store for Users Service |
Posts DB |
PostgreSQL ( |
Persistent store for Posts Service |
Messaging DB |
PostgreSQL ( |
Persistent store for Messaging Service |
5.2 Level 2 — Internal Structure per Service¶
Users Service¶
Module |
Responsibility |
|---|---|
|
JWT issuance (RS256), login, registration, email verification |
|
CRUD for user profiles, avatar handling |
|
Follow / unfollow, follower/followee lists |
Posts Service¶
Module |
Responsibility |
|---|---|
|
Create, edit, delete posts |
|
Aggregate timeline from followed users; fan-out on read |
|
Like / unlike a post |
Messaging Service¶
Module |
Responsibility |
|---|---|
|
Create and list direct-message conversations |
|
Send and retrieve messages within a conversation |
|
Detect and store @mentions; notify Users Service |
5.3 Cross-Context Interfaces¶
Caller |
Callee |
Endpoint |
Purpose |
|---|---|---|---|
Posts Service |
Users Service |
|
Enrich post with author profile |
Messaging Service |
Users Service |
|
Enrich message with sender/recipient profile |