# user-lifecycle

## Overview

Manages the lifecycle of user accounts. Users with appropriate roles can create accounts, browse and view other users, edit profile information, and control the active/inactive status. Any user can view and update their own profile.

## Actors Involved

- [user](../../actor/user.md)

## Flow Diagram

```mermaid
sequenceDiagram
    actor User as user
    participant System

    User->>System: Create User Account
    System-->>User: User created (ACTIVE)
    User->>System: Browse User List
    System-->>User: Paginated user list
    User->>System: View User Detail
    System-->>User: User profile details
    User->>System: Update User Profile
    System-->>User: Profile updated
    User->>System: View Own Profile
    System-->>User: Own profile details
    User->>System: Update Own Profile
    System-->>User: Own profile updated
    alt Deactivate
        User->>System: Deactivate User
        System-->>User: User set to INACTIVE
    end
    alt Reactivate
        User->>System: Reactivate User
        System-->>User: User set to ACTIVE
    end
```

## Stories

- [Create User Account](./story/user--create-user-account.md)
- [Browse User List](./story/user--browse-user-list.md)
- [View User Detail](./story/user--view-user-detail.md)
- [Update User Profile](./story/user--update-user-profile.md)
- [View Own Profile](./story/user--view-own-profile.md)
- [Update Own Profile](./story/user--update-own-profile.md)
- [Toggle User Status](./story/user--toggle-user-status.md)
