How dysthmia/web-forum-backend works
Fomo Forum is an ASP.NET Core REST API for a discussion forum. The principal workflow is a client authenticating, browsing categories and topics, then creating topics or replies; related capabilities include profiles, reactions, bookmarks, search, reports, and moderation. Feature controllers delegate to services, with PostgreSQL persistence and Redis-backed caching, rate limiting, and view counting. The source index and excerpts support the shown relationships; unsampled feature internals are represented at their listed service paths, with uncertain wiring omitted.
Main entry points: ForumDbContext.cs PostgreSQL data · TopicsService.cs Topics and replies · ActiveUserBanService.cs Ban checks · AuthController.cs Authentication
Components 19
Forum content
- Categories
src/Forum.Api/Features/Categories/CategoriesService.cs - Topics and replies
src/Forum.Api/Features/Topics/TopicsService.cs - Post management
src/Forum.Api/Features/Posts/PostsService.cs - Full-text search
src/Forum.Api/Features/Search/SearchService.cs
Community tools
Identity and moderation
- Authentication
src/Forum.Api/Features/Auth/AuthController.cs - User profiles
src/Forum.Api/Features/Users/UsersService.cs - Admin users
src/Forum.Api/Features/Users/AdminUsersService.cs - Ban checks
src/Forum.Api/Common/Authorization/ActiveUserBanService.cs - Reports
src/Forum.Api/Features/Reports/ReportsService.cs - Moderation
src/Forum.Api/Features/Moderation/ModerationService.cs
Runtime infrastructure
- PostgreSQL data
src/Forum.Api/Infrastructure/Persistence/ForumDbContext.cs - Redis cache
src/Forum.Api/Infrastructure/Redis/CacheService.cs - Rate limiting
src/Forum.Api/Infrastructure/Redis/RateLimitService.cs - View counter
src/Forum.Api/Infrastructure/Redis/ViewCounterService.cs - View count worker
src/Forum.Api/Infrastructure/BackgroundJobs/ViewCounterBackgroundService.cs
Other components
- Forum client
- Redis
Connections 36
- Forum client → Authentication: sends auth requests
- Forum client → User profiles: uses profiles
- Forum client → Categories: browses categories
- Forum client → Topics and replies: reads and creates
- Forum client → Full-text search: searches topics
- Forum client → Reactions: reacts to posts
- Forum client → Bookmarks: saves topics
- Forum client → Reports: submits reports
- Forum client → Moderation: moderates forum
- Authentication → Ban checks: checks bans
- Authentication → Rate limiting: checks login limit
src/Forum.Api/Features/Auth/AuthController.cs - Categories → Redis cache: reads and writes
src/Forum.Api/Features/Categories/CategoriesService.cs - Topics and replies → Redis cache: caches category topics
src/Forum.Api/Features/Topics/TopicsService.cs - Topics and replies → Ban checks: checks bans
src/Forum.Api/Features/Topics/TopicsService.cs - Topics and replies → Rate limiting: checks publish limit
src/Forum.Api/Features/Topics/TopicsController.cs - Topics and replies → View counter: records views
src/Forum.Api/Features/Topics/TopicsController.cs - Post management → Ban checks: checks bans
src/Forum.Api/Features/Posts/PostsService.cs - Reactions → Ban checks: checks bans
src/Forum.Api/Features/Reactions/ReactionsService.cs - Bookmarks → Ban checks: checks bans
src/Forum.Api/Features/Bookmarks/BookmarksService.cs - Full-text search → PostgreSQL data: queries topics and posts
src/Forum.Api/Features/Search/SearchService.cs - Ban checks → PostgreSQL data: reads active bans
src/Forum.Api/Common/Authorization/ActiveUserBanService.cs - Authentication → PostgreSQL data: reads and writes
- Categories → PostgreSQL data: reads and writes
src/Forum.Api/Features/Categories/CategoriesService.cs - Topics and replies → PostgreSQL data: reads and writes
src/Forum.Api/Features/Topics/TopicsService.cs - Post management → PostgreSQL data: reads and writes
src/Forum.Api/Features/Posts/PostsService.cs - Reactions → PostgreSQL data: reads and writes
src/Forum.Api/Features/Reactions/ReactionsService.cs - Bookmarks → PostgreSQL data: reads and writes
src/Forum.Api/Features/Bookmarks/BookmarksService.cs - Moderation → PostgreSQL data: reads and writes
src/Forum.Api/Features/Moderation/ModerationService.cs - User profiles → PostgreSQL data: reads and writes
src/Forum.Api/Features/Users/UsersService.cs - Admin users → PostgreSQL data: reads and writes
src/Forum.Api/Features/Users/AdminUsersService.cs - Reports → PostgreSQL data: reads and writes
src/Forum.Api/Features/Reports/ReportsService.cs - Redis cache → Redis: stores cached data
src/Forum.Api/Infrastructure/Redis/CacheService.cs - Rate limiting → Redis: increments limits
src/Forum.Api/Infrastructure/Redis/RateLimitService.cs - View counter → Redis: records view keys
- View count worker → View counter: drains view counts
src/Forum.Api/Infrastructure/BackgroundJobs/ViewCounterBackgroundService.cs - View count worker → PostgreSQL data: persists view counts
src/Forum.Api/Infrastructure/BackgroundJobs/ViewCounterBackgroundService.cs