How minhelly/fakebook works
Fakebook is a microservices social network. A user signs in through the React app and Keycloak, then uses the gateway-backed APIs for profiles, friendships, posts, media, comments, reactions, and a personalized feed. Post events drive feed fan-out and comment-side post-cache updates; realtime events reach the gateway and browser. README-level infrastructure links are shown where documented; the supplied source excerpts are partial, so uncertain implementation-level calls are omitted.
Main entry points: gateway API gateway · App.tsx React application · user Profiles and friends · comment Comments and reactions
Components 16
User experience
- React application
frontend/src/App.tsx - Realtime browser client
frontend/src/services/realtimeService.ts
Gateway and identity
- API gateway
gateway/src/main/java/com/minh/fakebook/gateway - Keycloak IAM
- Auth service
authService/src/main/java/com/minh/fakebook/auth
Social domain services
- Profiles and friends
userService/src/main/java/com/minh/fakebook/user - Posts and reactions
postService/src/main/java/com/minh/fakebook/post - Comments and reactions
commentService/src/main/java/com/minh/fakebook/comment - Media service
mediaService/src/main/java/com/minh/fakebook/media - Personalized feed
feedService/src/main/java/com/minh/fakebook/feed
Events and realtime
- Kafka event stream
- Realtime event hub
gateway/src/main/java/com/minh/fakebook/gateway/realtime
Persistence and media
- Service databases
- Redis cache
- Cloudinary storage
Other components
- Social user
Connections 24
- Social user → React application: uses
- React application → Keycloak IAM: authenticates
- React application → API gateway: calls APIs
- API gateway → Profiles and friends: routes requests
- API gateway → Posts and reactions: routes requests
- API gateway → Comments and reactions: routes requests
- API gateway → Media service: routes requests
- API gateway → Personalized feed: routes requests
- API gateway → Auth service: routes requests
- Posts and reactions → Kafka event stream: publishes post events
- Kafka event stream → Personalized feed: delivers post events
- Kafka event stream → Comments and reactions: delivers post events
- Kafka event stream → Realtime event hub: delivers events
- Realtime event hub → Realtime browser client: streams updates
- React application → Realtime browser client: subscribes
- Comments and reactions → Profiles and friends: checks friendship
- Profiles and friends → Service databases: reads and writes
- Posts and reactions → Service databases: reads and writes
- Comments and reactions → Service databases: reads and writes
- Media service → Service databases: reads and writes
- Personalized feed → Service databases: reads and writes
- Profiles and friends → Redis cache: caches data
- Personalized feed → Redis cache: caches timeline
- Media service → Cloudinary storage: stores files