My Account
- Code: ACC-ME
- Module: Account
- Type: Configuration
1. Overview
My Account is the page where users manage their own account data and security. The page is divided into sections: profile, email and password, information managed by admins, and addresses and contacts for users who are also suppliers or customers. Every change only applies to that account itself.
Expected outcome: users can look after their own account data and security without asking an admin, and it is clear which data they can change and which is managed by an admin.
2. Problem
Without a page for managing one’s own account, even the smallest change to personal data has to go through an admin. As a result:
- Users have to contact an admin just to change their name, photo, or password.
- Users are confused about which data they can change themselves and which is set by an admin.
- Users who are also suppliers or customers cannot update their own addresses and contacts.
3. Goals & Non-goals
3.1 Goals
- Users update their own profile, email, and password without involving an admin.
- Changing the email stays safe because the owner of the new email must verify it.
- Users know which data they can change and which is managed by an admin.
- Users who are also suppliers or customers manage their own addresses and contacts.
3.2 Non-goals
- Changing one’s own category, roles, active status, or store assignments; all of these are set by an admin.
- Deleting one’s own account.
- Two-factor authentication.
4. Business Rules
Business rules are the set of provisions and constraints that apply to My Account across the whole application, on every screen and action involved, whoever performs them. These rules are the single source of truth: if another part of this PRD seems to differ, the rule here applies.
- BR-01 My Account only shows and changes the data of the account that is logged in. Other people’s accounts cannot be viewed or changed from here.
- BR-02 Data managed by an admin can only be viewed and cannot be changed from here: category, roles, and employee, supplier, and customer information (status, code, and store assignments). The employee, supplier, and customer sections only appear if the account is linked to that data. 🚧 Not yet: FE + BE
- BR-03 A user whose email is not yet verified can only view their account data. All changes are rejected until the email is verified (see Authentication).
- BR-04 Display name and full name are required, while gender and phone number may be empty. The display name is used in the header, activity logs, and notifications. A changed full name also updates the linked employee, supplier, or customer data. 🚧 Not yet: FE + BE
- BR-05 The profile photo is a single image (JPG, PNG, or WEBP) of at most 2 MB, from upload, webcam, link, or My Files. A new photo is used right after it is saved, and the old photo stays in My Files. Without a photo, the name’s initials are shown.
- BR-06 A new login email only takes effect after its owner opens the verification link sent to the new email (valid for 60 minutes); until then the old email stays in use. A target email that is still waiting for verification, by any account, is rejected. After the email is verified, the user is logged out of all devices and logs in with the new email (see Authentication).
- BR-07 Changing the password requires the current password. The new password follows the rules in Authentication and must not be the same as the previous password. After success, the user is logged out of all devices and logs in again. 🚧 Not yet: FE
- BR-08 Addresses and contacts are only available to accounts linked to supplier or customer data. Users manage them themselves: adding, changing, and deleting. 🚧 Not yet: FE + BE
- BR-09 An address requires an address name, a full address, and a phone number. Email is optional but must be valid if filled in. An address may have more than one type: primary, billing, and shipping. 🚧 Not yet: FE + BE
- BR-10 Each address type is held by exactly one address. Making another address that type automatically moves it from the previous address, and the first address automatically holds all three types. 🚧 Not yet: FE + BE
- BR-11 Contacts may be more than one and may be empty. Contact name and phone number are required, while email is optional but must be valid if filled in. 🚧 Not yet: FE + BE
- BR-12 Every change is recorded in the activity log with who did it and when. The activity log on this page only contains activities the user did themselves.
5. Flow
5.1 Main Flowchart
- Open My Account — The user opens the page. The navigation is shown with the Profile section open first (BR-01). 🚧 Not yet: FE
- Choose Section — The user chooses the section to open: Profile, Email & Password, Employee, Supplier, or Customer Information (depending on linked data), Addresses, or Contacts. The section list follows the account’s data (BR-02, BR-08). 🚧 Not yet: FE + BE
- Edit Profile — In the Profile section, the user presses Edit Data, changes their photo or personal data, then saves. The change takes effect immediately (BR-04, BR-05). 🚧 Not yet: FE + BE
- Email & Password — In this section, the user chooses to change the email or the password.
- 4a. Fill In New Email — The user fills in a new email, then a verification link is sent to that address. The old email stays in use until the link is opened.
- 4b. Verify New Email — The user opens the link to prove the new email is theirs.
- 4c. Log In Again — The new email takes effect, the user is logged out of all devices, then logs in with the new email (BR-06).
- 4d. Fill In Password — The user fills in the current password, the new password, and its confirmation (BR-07).
- 4e. Log In Again — After success, the user is logged out of all devices and logs in again with the new password (BR-07). 🚧 Not yet: FE
- View Admin-Managed Data — The user views their employee, supplier, or customer information. The data is read-only (BR-02). 🚧 Not yet: FE + BE
- Addresses — In this section, the user chooses an action for their addresses. 🚧 Not yet: FE + BE
- 6a. Fill In Address — The user adds a new address or edits one through a dialog (BR-09).
- 6b. Set Address Type — The user makes an address the primary, billing, or shipping address. That type moves from another address (BR-10).
- 6c. Confirm Delete — The user confirms, then the address is deleted (BR-08).
- Contacts — In this section, the user chooses an action for their contacts. 🚧 Not yet: FE + BE
- 7a. Fill In Contact — The user adds a new contact or edits one through a dialog (BR-11).
- 7b. Confirm Delete — The user confirms, then the contact is deleted (BR-08).
- View Activity Logs — From the Activity Logs button in the header, the user browses the record of changes they have made (BR-12).
6. Document Structure
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Display Name | Text | Yes | — | Used in the header, activity logs, and notifications (BR-04) 🚧 Not yet: FE + BE |
| Full Name | Text | Yes | — | Official name; changes also update linked data (BR-04) 🚧 Not yet: FE + BE |
| Text | Yes | — | A new email takes effect after its owner verifies it (BR-06) | |
| Email Verified | Boolean | — | — | Set by the system when the verification link is opened |
| Current Password | Text | Yes, when changing the password | — | Used to prove the account owner (BR-07) |
| New Password | Text | Yes, when changing the password | — | Follows the password rules in Authentication; must not be the same as the previous password (BR-07) |
| Confirm New Password | Text | Yes, when changing the password | — | Must match New Password exactly (BR-07) |
| Phone Number | Text | No | — | May be empty (BR-04) 🚧 Not yet: FE + BE |
| Gender | Enum | No | — | Male or Female (BR-04) 🚧 Not yet: FE + BE |
| Profile Photo | File | No | Name initials | A single JPG, PNG, or WEBP image, at most 2 MB (BR-05) |
| Category | Enum | — | Follows the entity data | Individual, Company, or Organization; managed by an admin (BR-02) |
| Roles | Ref. Role, many | — | Follows admin settings | Managed by an admin (BR-02) |
6.2 Managed by Admin
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Status | Enum | — | Follows admin data | Active or Inactive; exists on employee, supplier, and customer data (BR-02) |
| Employee Code | Text | — | Generated by the system | Only shown if the account is linked to an employee (BR-02) |
| Assigned Stores | Ref. Store, many | — | Follows the employee data | Only shown if the account is linked to an employee (BR-02) |
| Supplier Code | Text | — | Generated by the system | Only shown if the account is linked to a supplier (BR-02) |
| Customer Code | Text | — | Generated by the system | Only shown if the account is linked to a customer (BR-02) |
6.3 Address
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Address Name | Text | Yes | — | Address label, for example Main Office (BR-09) |
| Full Address | Text | Yes | — | (BR-09) |
| Phone Number | Text | Yes | — | (BR-09) |
| Text | No | — | Must be valid if filled in (BR-09) | |
| Address Type | Enum, many | No | The first address holds all types | Primary, Billing, Shipping; exactly one address per type (BR-10) |
6.4 Contact
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Contact Name | Text | Yes | — | (BR-11) |
| Phone Number | Text | Yes | — | (BR-11) |
| Text | No | — | Must be valid if filled in (BR-11) |
7. UI Structure
This section defines how My Account is displayed and operated: the navigation, form controls, and their option sources. It only governs presentation and interaction; the rules for content and values still follow Document Structure.
7.1 Navigation
The navigation is grouped so it is clear what the data is and who manages it. There is no edit mode for the whole page: each section has its own edit button, and the result takes effect immediately. Action in the page header: Activity Logs. 🚧 Not yet: FE
| Group | Section | Shown When | Content |
|---|---|---|---|
| Account | Profile | Always | Photo and personal data, editable |
| Security | Email & Password | Always | Editable |
| Employee | Employee Information | Account is linked to an employee | Read-only, marked Managed by Admin |
| Supplier | Supplier Information | Account is linked to a supplier | Read-only, marked Managed by Admin |
| Customer | Customer Information | Account is linked to a customer | Read-only, marked Managed by Admin |
| Addresses & Contacts | Addresses, Contacts | Account is linked to a supplier or customer | Editable; the count is shown in the navigation |
7.2 Form
Profile 🚧 Not yet: FE
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Display Name | Text Input | — | — |
| Full Name | Text Input | — | — |
| Phone Number | Text Input | — | — |
| Gender | Radio Group | Male, Female | — |
| Profile Photo | File Uploader | Upload, Webcam, Link, My Files | Can only be changed in edit mode |
| Category | Badge | — | Read-only, marked Managed by Admin |
| Roles | Text | — | Read-only, marked Managed by Admin |
Actions: Edit Data, Cancel, Save.
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Current Email | Text | — | Shown with a verified icon; read-only |
| New Email | Text Input | — | Shown in edit mode, with info that a link is sent to the new email and the old email stays in use until the link is opened |
Actions: Change Email, Cancel, Send Link.
Password
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Current Password | Text Input (can be revealed) | — | — |
| New Password | Text Input (can be revealed) | — | — |
| Confirm New Password | Text Input (can be revealed) | — | Must match New Password |
When not being changed, this section only shows a message that the password is hidden for security. Actions: Change Password, Cancel, Update.
Employee, Supplier, and Customer Information 🚧 Not yet: FE + BE
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Status | Badge | Active, Inactive | Read-only |
| Employee Code, Supplier Code, or Customer Code | Text | — | Read-only; depends on the section opened |
| Assigned Stores | Text | — | Read-only; only in Employee Information |
Actions: none.
Addresses 🚧 Not yet: FE + BE
Addresses are shown as numbered cards with address type badges. Adding and editing use a dialog.
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Address Name | Text Input | — | — |
| Full Address | Textarea | — | — |
| Phone Number | Text Input | — | — |
| Text Input | — | — | |
| Address Type | Action Menu (“Make This”) | Primary, Billing, Shipping | On the address card, not in the dialog; only shows types the address does not yet hold, and setting one removes that type from another address |
Actions: Add Address, Edit, Delete (with confirmation), Cancel, Save.
Contacts 🚧 Not yet: FE + BE
Contacts are shown as numbered cards. Adding and editing use a dialog.
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Contact Name | Text Input | — | — |
| Phone Number | Text Input | — | — |
| Text Input | — | — |
Actions: Add Contact, Edit, Delete (with confirmation), Cancel, Save.
8. User Stories
US-01 - View my account
As a user, I want to view my account data, so I know my profile and access.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | The page shows a grouped navigation, and the Profile section is shown first (BR-01). 🚧 Not yet: FE |
| AC-01.2 | The Employee, Supplier, and Customer sections only appear if the account is linked to that data (BR-02). 🚧 Not yet: FE + BE |
| AC-01.3 | The Addresses and Contacts sections only appear if the account is linked to a supplier or customer (BR-08). 🚧 Not yet: FE + BE |
| AC-01.4 | The email is shown with a verified icon once verified. |
| AC-01.5 | Admin-managed data is marked Managed by Admin with a lock icon and cannot be changed (BR-02). 🚧 Not yet: FE |
| AC-01.6 | A skeleton is shown while data loads. |
| AC-01.7 | A user whose email is not yet verified opens this page — the data is shown, but every change is rejected (BR-03). |
US-02 - Edit profile
As a user, I want to update my photo and personal data, so I am easy to recognize.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | The Edit Data button opens the profile form without affecting other sections; Cancel discards the changes and shows the old data. 🚧 Not yet: FE |
| AC-02.2 | Display name and full name are required (BR-04). 🚧 Not yet: FE + BE |
| AC-02.3 | Gender and phone number may be empty (BR-04). 🚧 Not yet: FE + BE |
| AC-02.4 | Category and roles are shown but cannot be changed (BR-02). 🚧 Not yet: FE |
| AC-02.5 | The photo can only be changed in edit mode and only accepts a single JPG, PNG, or WEBP image of at most 2 MB (BR-05). |
| AC-02.6 | After success, a success toast appears and the new data is used immediately, including the photo (BR-04, BR-05). |
| AC-02.7 | The full name is changed and the account is linked to an employee, supplier, or customer — the name on that data changes too (BR-04). |
| AC-02.8 | A photo is chosen but not saved — the old photo stays in effect (BR-05). |
| AC-02.9 | The photo is replaced — the old photo stays in My Files as unused (BR-05). |
| AC-02.10 | The photo is rejected (size, file type, or a My Files file that is not the user’s own) — a generic failed-to-change-photo toast appears without giving the reason (BR-05). |
US-03 - Change login email
As a user, I want to change my login email safely.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | The new email is required and must have a valid format (BR-06). |
| AC-03.2 | The form shows info that a link is sent to the new email and the old email stays in use until the link is opened. |
| AC-03.3 | After saving, a verification link is sent to the new email (BR-06). |
| AC-03.4 | Opening the link verifies the email, logs the user out of all devices, and takes them to the login page (BR-06). |
| AC-03.5 | Link expired or invalid — the verification page shows a failed status (BR-06). |
| AC-03.6 | The target email is already used or still waiting for verification, by any account — the request is rejected with a generic message (BR-06). |
| AC-03.7 | The user requests an email change twice before verifying with different emails — both links stay valid until they expire (BR-06). Needs confirmation: only the latest link should be valid. |
US-04 - Change password
As a user, I want to change my password, so my account stays secure.
| ID | Acceptance criteria |
|---|---|
| AC-04.1 | When not being changed, the password is not shown; there is only a message that the password is hidden for security. |
| AC-04.2 | Current password, new password, and confirmation are required; all three can be shown or hidden. |
| AC-04.3 | The current password, the new password rules, that it differs from the previous password, and the confirmation match are checked on save, with errors on the related fields (BR-07). |
| AC-04.4 | After success, a success toast appears, the user is logged out of all devices including this one, then logs in again with the new password (BR-07). 🚧 Not yet: FE |
US-05 - View admin-managed information
As a user, I want to view my employee, supplier, or customer data, so I know my status and assignments.
| ID | Acceptance criteria |
|---|---|
| AC-05.1 | Employee Information shows status, employee code, and assigned stores (BR-02). 🚧 Not yet: FE |
| AC-05.2 | Supplier Information and Customer Information show status and code (BR-02). 🚧 Not yet: FE + BE |
| AC-05.3 | All these sections are read-only and have no edit button (BR-02). |
US-06 - Manage addresses
As a user who is also a supplier or customer, I want to manage my addresses, so my business data is always up to date.
| ID | Acceptance criteria |
|---|---|
| AC-06.1 | The address list is shown as numbered cards with address type badges, and the number of addresses is shown in the navigation (BR-08). 🚧 Not yet: FE + BE |
| AC-06.2 | No addresses yet — an empty message is shown with a prompt to add the first address. 🚧 Not yet: FE + BE |
| AC-06.3 | Address name, full address, and phone number are required; email is optional and must be valid if filled in (BR-09). 🚧 Not yet: FE + BE |
| AC-06.4 | The first address created automatically holds all address types (BR-10). 🚧 Not yet: FE + BE |
| AC-06.5 | The Make This menu only shows types the address does not yet hold; setting one moves that type from another address (BR-10). 🚧 Not yet: FE + BE |
| AC-06.6 | Deleting an address asks for confirmation first (BR-08). 🚧 Not yet: FE + BE |
| AC-06.7 | Deleting the last address (BR-08). Needs confirmation: the Supplier PRD requires at least one address, while this page provides an empty state. |
US-07 - Manage contacts
As a user who is also a supplier or customer, I want to manage my contacts, so the people to reach are always up to date.
| ID | Acceptance criteria |
|---|---|
| AC-07.1 | The contact list is shown as numbered cards, and the number of contacts is shown in the navigation (BR-08). 🚧 Not yet: FE + BE |
| AC-07.2 | No contacts yet — an empty message is shown with a prompt to add the first contact. 🚧 Not yet: FE + BE |
| AC-07.3 | Contact name and phone number are required; email is optional and must be valid if filled in (BR-11). 🚧 Not yet: FE + BE |
| AC-07.4 | Deleting a contact asks for confirmation first (BR-08). 🚧 Not yet: FE + BE |
US-08 - My activity logs
As a user, I want to see the activities I have done.
| ID | Acceptance criteria |
|---|---|
| AC-08.1 | The Activity Logs button in the header opens the activities the user did themselves, with an event filter and a date range (BR-12). Needs confirmation: access to the activity log currently requires the settings:user:list:any permission; users without it are denied even though the button is still shown. |
9. User Scenarios
| Role | Scenario |
|---|---|
| User | Changes their password regularly from My Account, then logs in again on all devices |
| User | Uploads a profile photo and corrects their name so they are easy to recognize in activity logs and notifications |
| User | Changes their login email to a work email and verifies it through the link in the new email |
| User | Checks the roles and store assignments linked to their account |
| User | Views the history of activities they did themselves |
| User who is also a supplier | Adds a new warehouse address and makes it the shipping address |
| User who is also a customer | Adds a new contact who can be reached on behalf of their business |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View My Account | — | User is logged in; own account only |
| Edit Profile, Email, Password, Addresses, and Contacts | — | User is logged in; own account only; email is verified |
| View My Activity Logs | settings:user:list:any | User is logged in; own activities only (see the needs-confirmation note in AC-08.1) |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- Authentication — password rules, email verification, logging out of all devices, and restrictions for unverified accounts.
- Users (Settings) — admins manage the same account (roles, status, email).
- Entities (Settings) — category and personal data come from the entity linked to the account.
- Employees (Settings) — source of employee information and store assignments.
- Suppliers (Purchasing) — source of supplier information, addresses, and contacts; the address and contact rules here are the same as there.
- My Files — the profile photo is stored as a file owned by the user, and a photo can be chosen from My Files.
- Linked Devices — revokes logins on other devices.
- Activity Logs — source of the activity log.
Effects on other modules
- The display name and photo are used in the dashboard header, activity logs (as the actor), notifications, and the “Created By” column in various lists.
- Changes to the full name, addresses, and contacts update the same employee, supplier, or customer data.