Service Layer medium complexity backend
2
Dependencies
4
Dependents
4
Entities
0
Integrations

Description

Core backend service implementing all user lifecycle operations for the admin portal REST API. Enforces org-scoped authorization so org admins can only read and mutate users within their own organization, while global admins operate across organizations.

Feature: User CRUD

user-management-service

Responsibilities

  • Implement list, read, update, deactivate, and reactivate operations on the users table
  • Enforce org isolation on every mutation by validating the requesting admin's organization scope
  • Apply soft-delete semantics by setting deactivated_at timestamp instead of deleting rows
  • Support server-side pagination and multi-field filtering for the users list endpoint

Interfaces

listUsers(orgId, filters, page)
getUserById(userId, orgId)
updateUser(userId, data, adminId)
deactivateUser(userId, adminId)
reactivateUser(userId, adminId)
GET /api/v1/admin/users
GET /api/v1/admin/users/:id
PATCH /api/v1/admin/users/:id
POST /api/v1/admin/users/:id/deactivate
POST /api/v1/admin/users/:id/reactivate

Relationships

Dependencies (2)

Components this component depends on

Dependents (4)

Components that depend on this component