Skip to Content

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

  1. Open My Account — The user opens the page. The navigation is shown with the Profile section open first (BR-01). 🚧 Not yet: FE
  2. 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
  3. 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
  4. 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
  5. View Admin-Managed Data — The user views their employee, supplier, or customer information. The data is read-only (BR-02). 🚧 Not yet: FE + BE
  6. 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).
  7. 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).
  8. 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

FieldTypeRequiredDefaultRules
Display NameTextYes—Used in the header, activity logs, and notifications (BR-04) 🚧 Not yet: FE + BE
Full NameTextYes—Official name; changes also update linked data (BR-04) 🚧 Not yet: FE + BE
EmailTextYes—A new email takes effect after its owner verifies it (BR-06)
Email VerifiedBoolean——Set by the system when the verification link is opened
Current PasswordTextYes, when changing the password—Used to prove the account owner (BR-07)
New PasswordTextYes, when changing the password—Follows the password rules in Authentication; must not be the same as the previous password (BR-07)
Confirm New PasswordTextYes, when changing the password—Must match New Password exactly (BR-07)
Phone NumberTextNo—May be empty (BR-04) 🚧 Not yet: FE + BE
GenderEnumNo—Male or Female (BR-04) 🚧 Not yet: FE + BE
Profile PhotoFileNoName initialsA single JPG, PNG, or WEBP image, at most 2 MB (BR-05)
CategoryEnum—Follows the entity dataIndividual, Company, or Organization; managed by an admin (BR-02)
RolesRef. Role, many—Follows admin settingsManaged by an admin (BR-02)

6.2 Managed by Admin

FieldTypeRequiredDefaultRules
StatusEnum—Follows admin dataActive or Inactive; exists on employee, supplier, and customer data (BR-02)
Employee CodeText—Generated by the systemOnly shown if the account is linked to an employee (BR-02)
Assigned StoresRef. Store, many—Follows the employee dataOnly shown if the account is linked to an employee (BR-02)
Supplier CodeText—Generated by the systemOnly shown if the account is linked to a supplier (BR-02)
Customer CodeText—Generated by the systemOnly shown if the account is linked to a customer (BR-02)

6.3 Address

FieldTypeRequiredDefaultRules
Address NameTextYes—Address label, for example Main Office (BR-09)
Full AddressTextYes—(BR-09)
Phone NumberTextYes—(BR-09)
EmailTextNo—Must be valid if filled in (BR-09)
Address TypeEnum, manyNoThe first address holds all typesPrimary, Billing, Shipping; exactly one address per type (BR-10)

6.4 Contact

FieldTypeRequiredDefaultRules
Contact NameTextYes—(BR-11)
Phone NumberTextYes—(BR-11)
EmailTextNo—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

GroupSectionShown WhenContent
AccountProfileAlwaysPhoto and personal data, editable
SecurityEmail & PasswordAlwaysEditable
EmployeeEmployee InformationAccount is linked to an employeeRead-only, marked Managed by Admin
SupplierSupplier InformationAccount is linked to a supplierRead-only, marked Managed by Admin
CustomerCustomer InformationAccount is linked to a customerRead-only, marked Managed by Admin
Addresses & ContactsAddresses, ContactsAccount is linked to a supplier or customerEditable; the count is shown in the navigation

7.2 Form

Profile 🚧 Not yet: FE

FieldControlOptions SourceBehavior
Display NameText Input——
Full NameText Input——
Phone NumberText Input——
GenderRadio GroupMale, Female—
Profile PhotoFile UploaderUpload, Webcam, Link, My FilesCan only be changed in edit mode
CategoryBadge—Read-only, marked Managed by Admin
RolesText—Read-only, marked Managed by Admin

Actions: Edit Data, Cancel, Save.

Email

FieldControlOptions SourceBehavior
Current EmailText—Shown with a verified icon; read-only
New EmailText 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

FieldControlOptions SourceBehavior
Current PasswordText Input (can be revealed)——
New PasswordText Input (can be revealed)——
Confirm New PasswordText 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

FieldControlOptions SourceBehavior
StatusBadgeActive, InactiveRead-only
Employee Code, Supplier Code, or Customer CodeText—Read-only; depends on the section opened
Assigned StoresText—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.

FieldControlOptions SourceBehavior
Address NameText Input——
Full AddressTextarea——
Phone NumberText Input——
EmailText Input——
Address TypeAction Menu (“Make This”)Primary, Billing, ShippingOn 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.

FieldControlOptions SourceBehavior
Contact NameText Input——
Phone NumberText Input——
EmailText 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.

IDAcceptance criteria
AC-01.1The page shows a grouped navigation, and the Profile section is shown first (BR-01). 🚧 Not yet: FE
AC-01.2The Employee, Supplier, and Customer sections only appear if the account is linked to that data (BR-02). 🚧 Not yet: FE + BE
AC-01.3The Addresses and Contacts sections only appear if the account is linked to a supplier or customer (BR-08). 🚧 Not yet: FE + BE
AC-01.4The email is shown with a verified icon once verified.
AC-01.5Admin-managed data is marked Managed by Admin with a lock icon and cannot be changed (BR-02). 🚧 Not yet: FE
AC-01.6A skeleton is shown while data loads.
AC-01.7A 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.

IDAcceptance criteria
AC-02.1The 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.2Display name and full name are required (BR-04). 🚧 Not yet: FE + BE
AC-02.3Gender and phone number may be empty (BR-04). 🚧 Not yet: FE + BE
AC-02.4Category and roles are shown but cannot be changed (BR-02). 🚧 Not yet: FE
AC-02.5The 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.6After success, a success toast appears and the new data is used immediately, including the photo (BR-04, BR-05).
AC-02.7The 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.8A photo is chosen but not saved — the old photo stays in effect (BR-05).
AC-02.9The photo is replaced — the old photo stays in My Files as unused (BR-05).
AC-02.10The 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.

IDAcceptance criteria
AC-03.1The new email is required and must have a valid format (BR-06).
AC-03.2The 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.3After saving, a verification link is sent to the new email (BR-06).
AC-03.4Opening the link verifies the email, logs the user out of all devices, and takes them to the login page (BR-06).
AC-03.5Link expired or invalid — the verification page shows a failed status (BR-06).
AC-03.6The 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.7The 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.

IDAcceptance criteria
AC-04.1When not being changed, the password is not shown; there is only a message that the password is hidden for security.
AC-04.2Current password, new password, and confirmation are required; all three can be shown or hidden.
AC-04.3The 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.4After 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.

IDAcceptance criteria
AC-05.1Employee Information shows status, employee code, and assigned stores (BR-02). 🚧 Not yet: FE
AC-05.2Supplier Information and Customer Information show status and code (BR-02). 🚧 Not yet: FE + BE
AC-05.3All 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.

IDAcceptance criteria
AC-06.1The 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.2No addresses yet — an empty message is shown with a prompt to add the first address. 🚧 Not yet: FE + BE
AC-06.3Address 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.4The first address created automatically holds all address types (BR-10). 🚧 Not yet: FE + BE
AC-06.5The 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.6Deleting an address asks for confirmation first (BR-08). 🚧 Not yet: FE + BE
AC-06.7Deleting 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.

IDAcceptance criteria
AC-07.1The 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.2No contacts yet — an empty message is shown with a prompt to add the first contact. 🚧 Not yet: FE + BE
AC-07.3Contact name and phone number are required; email is optional and must be valid if filled in (BR-11). 🚧 Not yet: FE + BE
AC-07.4Deleting 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.

IDAcceptance criteria
AC-08.1The 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

RoleScenario
UserChanges their password regularly from My Account, then logs in again on all devices
UserUploads a profile photo and corrects their name so they are easy to recognize in activity logs and notifications
UserChanges their login email to a work email and verifies it through the link in the new email
UserChecks the roles and store assignments linked to their account
UserViews the history of activities they did themselves
User who is also a supplierAdds a new warehouse address and makes it the shipping address
User who is also a customerAdds a new contact who can be reached on behalf of their business

10. Permissions & Actions

10.1 Permission by Action

ActionPermissionCondition
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 Logssettings:user:list:anyUser 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.
Last updated on