📄 Frontend Pages
Status: Implemented (Feb 2026)
📖 Overview
Application pages and routing structure. All authenticated routes are under (app)/. The build is
a static SPA: SSR is off in the root +layout.ts (FastAPI serves the static files), and only the
login page is prerendered; the other routes, the public link pages included, are served through the
SPA fallback.
🗺️ Page Structure
frontend/src/routes/
├── +layout.svelte # Root layout (i18n init, splash removal, <html lang>)
├── +layout.ts # ssr = false
├── +page.svelte # Login page (public)
├── +page.ts # prerender = true
├── +error.svelte # Error page
├── invite/
│ └── +page.svelte # Invitation link page (public, /invite#token=…)
├── reset-password/
│ └── +page.svelte # Password-reset link page (public, /reset-password#token=…)
├── setup/
│ └── +page.svelte # Setup link page of the initial administrator (public, /setup#token=…)
├── (app)/ # Authenticated routes
│ ├── +layout.svelte # App shell: auth check, bootstrap/onboarding gate, sidebar, header, guide host
│ ├── +layout.ts # ssr = false, prerender = false
│ ├── welcome/
│ │ └── +page.svelte # Welcome setup (onboarding), shown without the app shell
│ ├── dashboard/
│ │ └── +page.svelte # Main dashboard
│ ├── brokers/
│ │ ├── +page.svelte # Broker list
│ │ └── [id]/
│ │ ├── +page.svelte # Broker detail
│ │ └── +page.ts # Load function (brokerId)
│ ├── transactions/
│ │ ├── +page.svelte # Transactions list and management
│ │ └── filterState.ts # URL ⇄ filter state
│ ├── assets/
│ │ ├── +page.svelte # Assets list and management
│ │ └── [id]/
│ │ ├── +page.svelte # Asset detail
│ │ └── +page.ts # Load function (assetId; invalid id → /assets)
│ ├── fx/
│ │ ├── +page.svelte # FX pairs list and management
│ │ └── [pair]/
│ │ ├── +page.svelte # FX pair detail
│ │ └── +page.ts # Load function (pair slug; invalid slug → /fx)
│ ├── tools/
│ │ ├── +page.svelte # Tools hub (ToolsHub)
│ │ └── [tool_code]/
│ │ └── +page.svelte # One tool (ToolHost)
│ ├── files/
│ │ └── +page.svelte # Files management (static + BRIM tabs)
│ └── settings/
│ └── +page.svelte # Settings (4 tabs)
📋 Pages
🔐 Login Page (/)
- Public access
- LoginCard / RegisterCard / ForgotPasswordCard (card-style, not modals), inside
AuthPageFrame - Register here only while the instance accepts anyone (
registration_modeopen), or while it has no account yet (first_account_open: the first account can be created in any mode) - Animated background with waves and chart lines
- Redirect to dashboard after login
- User preferences (language, theme) applied on login
🔗 Account Link Pages (/invite, /reset-password, /setup)
- Public access, not prerendered: the SPA fallback serves them
- The token of the link travels in the fragment (
#token=…) and leaves the address bar on load /inviteopens RegisterCard in invitation mode;/reset-passwordopens ResetPasswordCard;/setup, the setup link of the initial administrator, opens SetupCard; a link that cannot be used shows LinkStatusCard/inviteand/reset-passwordend on the login page, with a success message;/setupsigns the administrator in and goes to/dashboard- Details: Account Link Pages
👋 Welcome (/welcome)
- First-run setup of the onboarding: language, base currency and avatar
- Rendered by the
(app)layout without the app shell (no sidebar or header) - The layout's gate sends the user here (
/welcome?returnTo=<requested path>) while the Welcome flow is due or a Welcome replay is armed (appBootstrap.resolveDestination); afterwards the page continues toreturnTo, or to/dashboardwhen the intro tour starts - Architecture: Onboarding Guides
📊 Dashboard (/dashboard)
- Portfolio view in four tabs: Overview (
KpiSection,GrowthChart,AllocationPanel), Positions (PositionsPanel, with the FIFOLotsAnalysisPanel), Risk (RiskLevelsPanel) and Transactions (TransactionsTable) - Toolbar with the date range (
DateRangePicker) and the display currency (CurrencySearchSelect) - DataQualityBanner above the tabs; its actions can open
FxPairAddModalto add a missing FX pair - KPI row —
KpiSection, also mounted on the broker detail Overview:- it reads
PortfolioSummary:period_pnland its rowsperiod_unrealized_gain_loss_delta(tooltip rowsperiod_unrealized_breakdown, in backend order),period_realized_gain_loss,period_incomeandperiod_fees_taxes(a positive magnitude, shown negated; the tooltip splitsperiod_fees/period_taxes);simple_roi_percent,twrr_percent,mwrr_cumulative_percent,mwrr_annualized_percent;net_worth,total_gain_losswithtotal_gain_loss_percent(since inception),market_value,open_cost_basis,cash_totalandnet_deposited_capital(total_deposited/total_withdrawn, period only) - the start-of-period carets come from
period_market_value_start,period_book_value_startand the first history point'scash_value; the Cash tooltip from the last history point'scash_from_contributed_capital/cash_from_generated_returns - the day-change lines read
pnl_change_1d: the Total P&L's change from the calendar day before the valuation date (date_to, else today) to it, from the engine's daily states; null for a portfolio born on the valuation date. Card 1 shows it as «amount (share)», the share beingpnl_change_1d_vs_nav_percent: a fraction of the day before's|nav_value|, with the change's sign, null on a zero base; its tooltip says «versus yesterday's portfolio value». Card 2 repeats nothing of it, and there is no share of the day before's total P&L (it exploded near zero; the field was removed on 07/11/2026). A null change drops Card 1's line, a null share its percentage; the line is not derived fromhistory - the timing effect reads
timing_effect_percent, the backend'smwrr_cumulative_percent − twrr_percent(null when either is missing), shown ×100 in pp:—with no label when null, labelled neutral below 0.05 pp; its colour intensity saturates at 3 pp - each card's help icon is a
DocsLinktouser/dashboard/kpi-cards/#card-1-period-pl,#card-2-returnsand#card-3-net-worth: keep these explicit anchors in every language
- it reads
- Positions tab —
PositionsPanel, also mounted on the broker detail Positions tab:- Portfolio / Period (modes
holdings/performance) × Table / Map:ExposureTable,ExposureTreemap,ContributionTablewithOtherPeriodEffectsTable,PerformanceChart; both toggles persist per user inlocalStorage(dashboard-positions-semantic,dashboard-positions-visual) - the table layouts (
dashboard-holdings-v5,dashboard-performance-v2) are shared with the broker detail page; the Period view's Status filter is a hidden-by-default enum column ofContributionTable, not a panel toggle, andPerformanceChartshows an Open / Closed badge positions_contributionis fetched apart, on demand:PositionsPanelasks for it the first time the Period view is shown; a cached copy shows at once and is refreshed when stale; a failed request is asked again at most three times, 2, 4 and 8 s later (Lazy sections after a failure)ExposureTreemap's type and broker tooltips take their G/L and G/L % fromsummary.holding_groups, passed byPositionsPanelasholdingGroups(only holdings with a known value and G/L count): the group of the same(broker_id, asset_type),asset_typenull for the whole broker. A group not sent, or sent withoutgain_loss, reads Unrealized P&L—; tile areas and NAV weights still add up the holdings' owncurrent_valueandnav_weight_percentPerformanceChartcomputes no return: it shows the backend's fractions of|start_value|, rounded to 4 decimals and ×100 for display only —period_pnl_percentbesideperiod_pnl(the bar label and the tooltip's Period P&L row), andperiod_unrealized_delta_percent,period_realized_gain_loss_percent,period_income_percentandperiod_fees_taxes_percentbeside the tooltip's four component rows (period_fees_taxes_percentis positive, a cost, and shown negative). A null fraction shows no return- the lots panel opens from the Analyze Lots row action (⋮) or the right-click menu of
every view — there is no plain-click trigger — and is mirrored in
?asset=<id>;LotsAnalysisPanelrenders inline below, with a slide transition, and scrolls itself into view. Itsbroker_idsare the broker filter, or every owned broker with a share above 0% - architecture: Lots Analysis and the Lots Analysis Service
- Portfolio / Period (modes
🏦 Brokers (/brokers)
- Grid of broker cards with icons (fallback chain)
- Add/Edit broker via BrokerModal (extends ModalBase); the icon is picked in the form
(
ImagePickerWrapper→ AssetPickerModal) - Sharing via BrokerSharingModal; brokers the user has no access to are listed apart as
BrokerDiscoveryCards, whose sharing view is read-only - Delete via DeleteBrokerDialog, with a force option when the broker still has transactions
🔍 Broker Detail (/brokers/[id])
- Header with back button, icon and name; toolbar actions: edit (BrokerModal, owners and editors), share (opens the Info tab), refresh, and AI export
- Tabs: Overview (KPIs, cash balances, growth chart, allocation), Positions (Analyze Lots, from
the ⋮ menu or the right-click menu, opens the FIFO lots panel, mirrored in
?asset=<id>), Risk, Transactions and Info - Transactions tab: the broker's transactions, its report files (Uploaded Reports → BrokerImportFilesModal), a link to the Transactions page, and — for owners and editors — import and new transaction through the bulk workspace, with this broker pre-selected
- Info tab: broker details and the embedded sharing panel (BrokerSharingPanel)
📝 Transactions (/transactions)
- Master ledger of all user transactions
- Advanced filtering and pagination; filters are mirrored in the URL (
filterState.ts) - A row opens read-only in the Form modal; adding, editing, cloning, deleting and importing go
through the bulk workspace (
TransactionBulkModal). After every saved operation the page clears its selection (Selection on the Transactions page) - Relink events (
tx-reconcile-events-button) opensEventReconciliationModal: the dividends, interest and adjustments without an asset event, each with the event of the same day the server found; see Event Reconciliation
💼 Assets (/assets)
- Full list of tracked financial instruments
- Interactive data tables with sorting and filtering
🔍 Asset Detail (/assets/[id])
- Live prices and historical charts (ECharts)
- Technical signals and related events
- Detailed performance metrics and history
💱 FX Rates (/fx)
- List of configured currency pairs and conversion rates
- Direct route and chain management
- Live data sync and technical signals
🔍 FX Pair Detail (/fx/[pair])
[pair]is a slug such asEUR-USD: its order sets the display direction, while stores and API calls use the alphabetical (canonical) pair; an invalid slug redirects to/fx(+page.ts)- Rate summary (
FxPriceSummary), full chart with signals and measurements (PriceChartFull,ChartSignalsSection,MeasurePanel), and the rate editor (FxDataEditorSection)
🧰 Tools (/tools, /tools/[tool_code])
/toolsmountsToolsHub: the catalogue of computation tools read fromGET /api/v1/tools/catalog, one card per tool with its compatibility label/tools/[tool_code]mountsToolHost, which resolves the tool's compiled renderer inlib/features/tools/registry.tsand mounts it; a tool without a compatible renderer is shown as unavailable. Today the registry holds one tool, the PAC allocator- Contract and frontend binding: Tool plugins
📁 Files (/files)
- Two tabs: Static Resources / Broker Reports (BRIM)
- DataTable with sorting, filtering, pagination, URL-synced filters
- Grid view toggle with image previews and search
- Upload interface with:
- Image files → ImageEditModal (crop, rotate, flip)
- Non-image files → FileEditModal (rename)
- Copy link, download, delete actions; delete only on the files the user may delete (
can_delete) - Static Resources: a Visibility column (common or personal) and the switch between the two, see Scope of uploaded files
- File thumbnails via
?img_preview=API
⚙️ Settings (/settings)
- Tabs from the tab registry (
SETTINGS_TABSandSETTINGS_TAB_GROUPS, see Settings Components): Profile, Preferences, Plugins and About, then, for a superuser only, the Administration group on the right, whose tabs show in a second bar: Global Settings, Users, Backup, Email and Security (since lot N69-2 a regular user has none of them, so no group). Every tab has an address (lot B10):/settings/<tab>for Profile, Preferences, Plugins and About,/settings/admin/<tab>for the group (global,users,backup,email,security), and/settings/adminfor its first tab. The route issettings/[...path]. An address opens its tab from the first render, choosing a tab writes its address, an unknown address or a hidden tab goes back to/settings, the first tab. The?tab=<id>of 1.2 still opens its tab and is replaced by the tab's address. The Security tab's badge, summed on Administration, counts the security checks that need attention - ProfileTab: Avatar editing via AssetPickerModal, username and email editing, account
deletion through
AccountDeletionDialog - PreferencesTab: Language, currency, theme, and the Onboarding category (guide replays — see Settings Components)
- GlobalSettingsTab: superusers only, behind an edit lock (see Settings Components); the values stay readable through the API by every signed-in user, whose app reads them
- AboutTab: Version info (from Git tag), system info
- UsersTab: superusers only — the accounts of the instance, each with its avatar, and the open invitations, with the invitation, reset-link and deletion dialogs (see Settings Components)
- SecurityTab: superusers only — the configuration checks of the instance
(
GET /security/checks) and the browser's open-registration check, most severe first, with Check again and the passed checks folded below (see Settings Components) - PasswordChangeModal from profile
- Mobile responsive with dropdown category selector