medium complexity extracted User Management Confidence: 100%
6
Components
39
Shared
0
User Stories
Yes
Analyzed

Description

User CRUD provides the administrative interface for creating, reading, updating, and deactivating user accounts across the Meander platform. Administrators can invite new users by email, assign them to organizations, and configure their initial role. The invitation flow generates a secure onboarding link and sends it via email, eliminating the need for admins to set passwords on behalf of users. The feature supports viewing and editing user profiles, including contact details, organization memberships, and role assignments. Deactivation (soft delete) is preferred over hard deletion to preserve audit trails and Bufdir reporting integrity. Reactivation of deactivated accounts is also supported.

Analysis

Business Value

Without user management, organizations cannot onboard peer mentors or coordinators into the platform, making every other feature inaccessible. The invite-based flow removes the need for users to self-register, which is critical for a platform where org admins control who participates and in what role. This directly supports the multi-tenant model where each organization manages its own user base in isolation. Soft deactivation preserves historical data for Bufdir reporting and audit requirements - a hard delete would create referential gaps in activity and expense records. The feature also reduces coordinator overhead by giving org admins a single pane of glass for all user lifecycle operations, from invite through offboarding.

Implementation Notes

Built as a Next.js admin portal page with server-side rendering. The invite endpoint generates a time-limited signed token (JWT, 48h expiry) stored in the database and sent via email. The token links to the authentication module's onboarding flow where the user sets their password. User records are stored in the shared PostgreSQL `users` table; deactivation sets a `deactivated_at` timestamp rather than deleting rows. The users list page uses server-side pagination and filtering (by role, status, organization). All mutations go through the REST API (`/api/v1/admin/users`) with org-scoped authorization - org admins can only see and modify users within their own organization. Global admins can query across organizations. Role assignment is delegated to the Role Assignment feature to keep concerns separated.

Components (45)

User Interface (3)

Service Layer (2)

Data Layer (1)

Shared Components

These components are reused across multiple features

User Stories

No user stories have been generated for this feature yet.