Skip to content

Feature: Add Gateway and Users services; Remove legacy API monolith#48

Merged
Atsilut merged 9 commits into
developfrom
feature/msa-user
Jul 5, 2026
Merged

Feature: Add Gateway and Users services; Remove legacy API monolith#48
Atsilut merged 9 commits into
developfrom
feature/msa-user

Conversation

@Atsilut

@Atsilut Atsilut commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Extracts identity and edge routing into dedicated services and removes the legacy monolith from the repo.

  • Adds Users service for login, JWT issuance, profile CRUD, internal user-access APIs, and cross-service user-delete orchestration
  • Adds Gateway service (YARP) for edge JWT validation and routing to domain services
  • Replaces IMonolithAccessClient with IUserClient and gateway identity auth across Chat, Media, Social, and other domain services
  • Updates Compose, nginx, CI, Azure CD scripts, observability, and migrate.sh for the new stack
  • Moves cross-stack harness E2E from Api.Tests to Stack.Tests
  • Relocates shared platform docs (AGENTS, EVENTS, QUEUE, REDIS) to docs/

Azure production still references the removed monolith image until Bicep/parameters cutover on main. See docs/MSA_MIGRATION.md.

Test plan

  • ./scripts/ci/docker-test.sh
  • ./scripts/ci/run-media-harness.sh
  • docker compose up --build — sign up / login via web client
  • Authenticated API calls through gateway (profile CRUD, domain endpoints)
  • ./scripts/migrate.sh
  • Grafana/Prometheus targets for gateway, users, and domain services

Atsilut added 6 commits July 5, 2026 09:00
… APIs

Extract user domain, JWT issuance, nickname cache, and delete orchestration from the monolith into a dedicated service with its own Postgres schema.
Validate Bearer tokens once at the gateway and forward trusted X-User-Id and X-Gateway-Secret headers to downstream domain services.
…ay identity auth

Drop per-service JWT validation and IMonolithAccessClient in favor of IUserClient and GatewayIdentityAuthenticationHandler so domain services trust gateway headers.
Route public traffic through the gateway, publish Users and Gateway runtime images, and update Prometheus and Grafana targets for the new service layout.
…tover

Document the new request flow, service boundaries, CI ladder, and deployment model now that identity lives in Users and routing in Gateway.
Delete services/Api and Api.Tests now that Gateway and domain microservices
own all runtime paths. Move cross-stack media harness E2E to Stack.Tests,
relocate platform docs (AGENTS, EVENTS, QUEUE, REDIS) under docs/, and
retarget CI, compose, migrate, and tooling for per-service ownership.
@cursor

cursor Bot commented Jul 5, 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 added 3 commits July 5, 2026 09:55
Add prometheus-net /metrics, MetricsScrapeAuthMiddleware, and
Gateway.Tests integration coverage. Include gateway in Prometheus scrape
targets, recording rules, Grafana dashboard panels, and alert queries.
LoginAsInternal in Community, Group, and Social tests now sends
X-Gateway-Secret and X-User-Id instead of a JWT when an acting user is
needed, matching service auth for internal routes.
Use the shared multiplexer from DI instead of a raw connection string so
the health probe matches the app's Redis registration.
@cursor

cursor Bot commented Jul 5, 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 45256b3 into develop Jul 5, 2026
14 checks passed
@Atsilut
Atsilut deleted the feature/msa-user branch July 5, 2026 01:15
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