Skip to content

Feature: Extract Social microservice from monolith (MSA step 6) - #47

Merged
Atsilut merged 10 commits into
developfrom
feature/msa-friend
Jul 4, 2026
Merged

Feature: Extract Social microservice from monolith (MSA step 6)#47
Atsilut merged 10 commits into
developfrom
feature/msa-friend

Conversation

@Atsilut

@Atsilut Atsilut commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extract friendships, friend requests, and user-blocks into a standalone Social service (social Postgres schema) with public /api/friendships* and /api/users/blocks routes and internal validate/detach APIs.
  • Route Chat, Community, Group, and Location social checks through ISocialClient / social-service, and have the monolith delegate user-deletion detach to the new service.
  • Remove the monolith Friendships/UserBlocks domains and drop legacy public social tables (no row copy); port coverage to Social.Tests and wire Social into Compose, nginx, CI, and MSA docs.
  • Pass explicit subject user ids on internal validate routes (not JWT caller) so invitee/background paths work; run detach in a transaction and map failures to domain exceptions in Api.
  • Stabilize Community post/comment list ordering (newest-first posts and user comments; chronological comment trees).

Test plan

  • ./scripts/ci/docker-test.sh (or CI social-tests / full ladder) passes
  • Local docker compose down -v && docker compose up --build boots social-service and routes /api/friendships* and /api/users/blocks via nginx
  • Friend request, accept/ignore/reject, block, and friends-list visibility flows behave as before
  • Chat DM/invite/group-room access still enforces friendship and block checks via internal social APIs
  • Community and Location mutual-block filtering still goes through social-service
  • Group invitation block checks still go through social-service
  • User deletion still detaches friendships, requests, and blocks via internal detach endpoint

Atsilut added 10 commits July 4, 2026 21:33
…locks

Own social graph data in a dedicated service with internal access APIs and its own Postgres schema.
Route user detach and related social checks through ISocialClient instead of in-process friendship and block domains.
…h social-service

Move friendship and block checks off IMonolithAccessClient onto ISocialClient so callers no longer depend on Api for social graph data.
Delete friendships, friend requests, and user-blocks from the monolith and drop legacy public tables without copying rows.
…Api.Tests

Port friendship and block integration and unit tests onto the social-service harness, and fake social access in Api.Tests.
Include Social and Social.Tests in the solution, default test runs, and gateway routing, and document the social-service boundary.
Stop reading the JWT caller for friendship and block checks so invitee and background paths work, run detach in a transaction, and map detach failures to domain exceptions in Api.
Move the former Api.Tests friendship, request, block, and internal-access coverage onto the social-service factory and Testcontainers harness.
Run dependent service tests when Social changes, and list Social in publish and full-suite docs.
Order posts and user comments newest-first with Id tie-breakers, keep post comment trees chronological, and cover the behavior in integration tests.
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Atsilut
Atsilut merged commit 86db4ad into develop Jul 4, 2026
14 checks passed
@Atsilut
Atsilut deleted the feature/msa-friend branch July 4, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant