How ashutoshmodi/socialplatform_backend works
SocialPlatform is an ASP.NET Core social-platform backend: clients enter through an Ocelot gateway, then use user and post capabilities, while comment and notification services are documented as health-only scaffolds. The main workflows include registration/login, profiles and follows, post creation and feeds, and likes. The README documents gateway routing, per-service databases, Redis caching, and the protected post-to-user internal call. Some service internals and scaffold implementations were not sampled, so their details are limited to documented behavior.
Main entry points: Program.cs API gateway · PostService.cs Posts, feeds, likes · ProfileService.cs Profiles and follows · UserDbContext.cs User persistence
Components 21
Gateway edge
- API gateway
gateway/ApiGateway/Program.cs - Rate limiting
gateway/ApiGateway/Middleware/RateLimitMiddleware.cs - Request logging
gateway/ApiGateway/Middleware/RequestLoggingMiddleware.cs
Users and social graph
- Registration and login
services/user-service/UserService/Controllers/AuthController.cs - User accounts and JWT
services/user-service/UserService/Services/UserService.cs - Profile and follow API
services/user-service/UserService/Controllers/ProfilesController.cs - Internal user API
services/user-service/UserService/Controllers/InternalController.cs - Profiles and follows
services/user-service/UserService/Services/ProfileService.cs - User persistence
services/user-service/UserService/Data/UserDbContext.cs - Redis cache
Posts and feeds
- Posts API
services/post-service/PostService/Controller/PostsController.cs - Posts, feeds, likes
services/post-service/PostService/Services/PostService.cs - User service client
services/post-service/PostService/Clients/UserServiceClient.cs - Post persistence
services/post-service/PostService/Data/PostDbContext.cs - Post and feed models
services/post-service/PostService/Models/Post.cs
Scaffold services
- Notification scaffold
services/notification-service/NotificationService/Program.cs - Comment scaffold
services/comment-service/CommentService/Program.cs
Other components
- Browser or app
- User PostgreSQL
- Post PostgreSQL
- Notification PostgreSQL
Connections 21
- Browser or app → API gateway: sends HTTP
README.md - API gateway → Rate limiting: uses middleware
gateway/ApiGateway/Program.cs - API gateway → Request logging: uses middleware
gateway/ApiGateway/Program.cs - API gateway → Registration and login: routes requests
README.md - API gateway → Posts API: routes requests
README.md - API gateway → Notification scaffold: routes requests
README.md - API gateway → Comment scaffold: routes requests
README.md - Registration and login → User accounts and JWT: calls
services/user-service/UserService/Controllers/AuthController.cs - User accounts and JWT → User persistence: reads and writes
services/user-service/UserService/Services/UserService.cs - Profile and follow API → Profiles and follows: calls
services/user-service/UserService/Controllers/ProfilesController.cs - Internal user API → Profiles and follows: calls
services/user-service/UserService/Controllers/InternalController.cs - Profiles and follows → User persistence: reads and writes
services/user-service/UserService/Services/ProfileService.cs - Profiles and follows → Redis cache: caches profiles and follows
services/user-service/UserService/Services/ProfileService.cs - User persistence → User PostgreSQL: persists users and follows
README.md - Posts API → Posts, feeds, likes: calls
services/post-service/PostService/Controller/PostsController.cs - Posts, feeds, likes → Post persistence: reads and writes
services/post-service/PostService/Services/PostService.cs - Posts, feeds, likes → User service client: requests follow IDs
services/post-service/PostService/Services/PostService.cs - User service client → Internal user API: calls internal API
README.md - Post persistence → Post PostgreSQL: persists posts and likes
README.md - Posts, feeds, likes → Post and feed models: maps post results
services/post-service/PostService/Services/PostService.cs - Notification scaffold → Notification PostgreSQL: owns database
README.md