Modules

Account

Profile, settings (profile, preferences, security, notifications, billing, danger zone) and plans and pricing.

composables/useAccount.ts
View in the demo

The account area (/account/profile, /account/settings, /account/pricing) reads everything from useAccount() over mocks/account.mock.ts: profile, sessions, notifications, security, preferences, billing history and subscription. Its components live in components/pages/account/.

Files

File
Role
pages/account/profile.vueThe profile with real work from the apps.
pages/account/settings.vueSettings with six tabs.
pages/account/pricing.vuePlans and pricing.
composables/useAccount.tsAll the account data and its updates.
config/account.config.tsSettings tabs, security checks, date formats, presence and covers.
utils/account.tsSecurity and pricing rules, unit tested.
utils/profile.tsProfile work, agenda and collaborators.

Data

useAccount() keeps the data in useState over a mock. Replace the mock with requests to your API (useApi() + useAsyncData) and keep the same return values (profile, security, preferences, subscription, updateProfile…): the pages do not change. The full example is in Connect your API — for this module the collection is /account.

Permissions

Settings needs settings.view; the profile and pricing only need a session.

Configuration

SETTINGS_TABS

The tabs of settings, synced with ?tab=.

config/account.config.ts
const SETTINGS_TABS: readonly ["profile", "preferences", "security", "notifications", "billing", "danger"]

SECURITY_CHECKS

The checks of the security level.

config/account.config.ts
const SECURITY_CHECKS: SecurityCheckId[]

PASSWORD_MAX_AGE_DAYS

Days before the password check fails.

config/account.config.ts
const PASSWORD_MAX_AGE_DAYS: 90

PRESENCE_STATUSES

Presence statuses of the profile.

config/account.config.ts
const PRESENCE_STATUSES: PresenceStatus[]

RECOVERY_CODE_COUNT

Codes in a new recovery set.

config/account.config.ts
const RECOVERY_CODE_COUNT: 10

RECOVERY_CODES_LOW

Unused codes left at which the dialog warns.

config/account.config.ts
const RECOVERY_CODES_LOW: 2

PROFILE_COVERS

Cover presets of the profile header.

config/account.config.ts
const PROFILE_COVERS: ProfileCover[]

Rules

Pure functions in utils/, unit tested in tests/unit/. Statuses and segments are derived from the stored data, never stored themselves.

securityLevel()

The security level.

utils/account.ts
securityLevel(checks: { ok: boolean }[]): "strong" | "good" | "weak"

recommendedPlan()

The plan to highlight.

utils/account.ts
recommendedPlan(current: PlanId): PlanId | undefined

downgradeImpact()

What a downgrade removes.

utils/account.ts
downgradeImpact(plan: Pick<PlanModel, 'seatLimit' | 'projectLimit'>, usage: { seatsUsed: number; projects: number; customRoles: number }, options: { credit: number; keepsCustomRoles: boolean }): DowngradeImpact
ReturnsremovedMembersreadOnlyProjectsremovedRolescreditblocked

prorationCredit()

The credit left.

utils/account.ts
prorationCredit(subscription: Pick<Subscription, 'period' | 'renewsAt'>, charge: number, now: Date): number

profileWork()

The work tiles of the profile.

utils/profile.ts
profileWork({ tasks, board, events, me, today }: ProfileWorkSources): { open: number; dueToday: number; overdue: number; done: number; assigned: number; cards: number; cardsDueSoon: number; boardName: string; meetings: number; nextMeeting: CalendarE…
ReturnsopendueTodayoverduedoneassignedcardscardsDueSoonboardNamemeetingsnextMeeting

How it works

  • Settings uses BaseSectionNav (a select below md). Profile uses BaseForm dirty-actions, a save bar that only appears with unsaved changes (call markClean() after saving). Preferences save as you go: theme, the app-wide density, time zone, date and time formats with a live preview.
  • Security starts with a level from securityChecks() (AccountSecurityLevelCard); its pending count is the nav badge. It lists passkeys, the password (AccountPasswordDialog), recovery codes (AccountRecoveryCodesDialog: numbered, used ones struck through, how many are left with a warning at RECOVERY_CODES_LOW, copy, download or print the unused ones, and regenerate after a confirmation) and sessions with “It was not me” (AccountSessionsCard).
  • Notifications has do-not-disturb, a BaseMatrixTable of events × channels with select-all per channel (required events stay read-only), a test button and the next digest date.
  • Billing shows the next charge, usage meters, editable billing details and the history. The danger zone exports with progress, transfers ownership, deactivates and deletes through BaseConfirmDialog confirm-text.
  • Profile shows real work from the Todo, Kanban and Calendar providers: stat tiles that link to each app, a Today card, a “complete your profile” card, collaborators and the activity filtered by module. AccountProfileHeader edits the photo, presence and cover; AccountProfileToday, AccountProfileCompletion, AccountProfileAbout and AccountProfileActivity render the cards.
  • Pricing starts with AccountSubscriptionSummary, then one BasePlanCard per plan (current, highlighted, struck-through monthly price on yearly), AccountDowngradeDialog for lower plans, AccountPlanComparison and AccountPricingFaq. BasePlanCard is the same card the landing uses.
© 2026 melsami UI.
Developer documentation for melsami UI.