Home & core pages
modules/dashboard/pages/{HomeUI, DashboardUI, tradersUI, tradersdetailsUI, customersUI, CustomerDetailsUI, ordersUI, ordersdetailsUI.tsx, productsUI, settingsUI}
:::tip Status legend Live — real data + real mutations · Partial — mostly live, some dead/mock controls · Mock — UI only, no API call · Legacy — redirect shim or superseded route :::
Home — Partial
Route: /
Secondary/simplified KPI landing page (distinct from /dashboard) — accounts-in-danger, amount-at-risk, drawdown, and suspicious-activity KPIs. No capability/session guard, unlike /dashboard.
Sub-modules
components/KPIcomponents/* — AccountsInDangerKPI, AmountAtRiskKPI, AmountPaidOutKPI, DetailedAccountMetrics, DrawDownTrackingKPI, ReccomendationKPI, SuspiciousActivities, TotalActiveAccounts, TotalTradersKPI
| Control | Effect |
|---|---|
| Funded/Live toggle | Local state only — not wired to any child component's props. Dead toggle. |
| Daily/Weekly/Monthly toggle | Same — local state, never passed down. Dead toggle. |
:::danger Mock
DrawDownTrackingKPI on this page is fed hardcoded static mock dates/values, not an API hook. No filters, export, or refresh button exist on this page at all.
:::
Dashboard — Live
Route: /dashboard
Main authenticated KPI overview — 20 parallel React Query hooks feeding 11 Section cards. Capability-gated on dashboard_home_view via SessionCapabilityPageShell specifically to avoid firing dozens of 403s for login-only users.
Sub-modules (11 sections)
- Financial Metrics —
FinanceKPI: Payout MTD, Revenue MTD, Pending Transactions - Trading Metrics —
TradingKPI: Active Traders, Total Orders, Max Drawdown Avg, New Traders - E-commerce Metrics —
ECommerceKPI: Weekly/Daily Revenue, New Orders, MRR - Risk Metrics —
KeyOverallTraderMetricsKPI: Trader Equity, Active Challenges, Pass Rate (30d), Funded Accounts - Danger Zone donut + trend —
RiskPaiChartKPI(echarts donut, day-range selector) +CurrentAccoutnLineChart(trend line, own day-range selector) - Top traders —
HighRiskTradersKPI,ProfitableTradersKPI— top-5 tables, row → encrypted-id deep link to Trader Details - E-commerce Operations —
TodayRevenewKPI— revenue/order-volume trend, own day-range selector - Order Status Overview —
OrderStatusOverviewKPI— counts by status - Worthy Card List —
WorthyCardListKPIs— payment-card table with users-count and per-card orders modals
| Control | Effect |
|---|---|
Refresh (AdminPageRefresh) | handleRefreshAll() refetches all 20 hooks in parallel |
| 3 independent day-range pickers | Danger-zone donut, danger-zone trend, and revenue/orders trend each re-query independently |
| Top-trader row "Details" | AES-encrypts trader id → localStorage → navigates to Trader Details |
| Worthy Card List row action | Opens users-count modal (UserListTableModal) and a per-card orders modal (WrothyOrdersListKPI) |
Traders — Live
Route: /dashboard/traders
Lists all traders with summary KPIs and a searchable/paginated table.
Sub-modules
- TradersCardKPI — 4 stat cards: Total Active Traders, Active Challenges, Funded Accounts, Total Capital Deployed
- TradersTableKPI —
CommonFilterSection+CommonDashboardTable
| Control | Effect | Hook |
|---|---|---|
| Refresh | Refetches active traders, challenges, funded accounts, capital deployed, table | handleRefreshAll |
| Search ("name, email") | 500ms debounce, resets page | useGetTraderListTable |
| Date range picker | Filters KPI cards + table, resets page | useGetActiveTraders, useGetTraderListTable |
| Clear search / date / all | Resets respective filter state | — |
| Pagination | Server-paginated table | useGetTraderListTable |
| "Details" row button | AES-encrypts user_id → localStorage["dtl_data"] → full-page nav to Trader Details (not client router) | — |
Trader Details — Partial
Routes: /dashboard/trader_details /dashboard/traders/details
Deep-dive profile + performance-analytics page for a single trader, loaded via AES-encrypted id in localStorage (no query-param guard — silently blank if missing).
Sub-modules
- Trader Profile Summary —
CommonContent: name, email (mailto), status, active accounts, total P/L, drawdown - TradingAccountsKPI — paginated table of the trader's trading accounts
- PerformanceAnalyticsMainKPI — composes
DetailedStatisticsKPI(9 stat cards),DayliPLChart,EquityChart,TradeHistoryKPI,RuleComplianceKPI
| Control | Effect | Hook |
|---|---|---|
| Back | router.back() | — |
| Refresh | Refetches profile, accounts, and (if account selected) performance stats/PnL/equity | handleRefreshAll |
| Account selector | Drives detail-stats, daily-PnL chart, Trade History, Rule Compliance | useGetTraderPerformanceAnalyticsAccountDetailStats |
| Daily P/L chart day-range | Independent re-query | ...DailyPnlChart |
| Equity chart day-range | Independent re-query | ...DailyEquityChart |
| Trade History: search/date/clear/pagination | Filters trade rows | ...TradeHistory |
| Trade History: Export CSV | Client-side only — builds a Blob from currently-loaded rows and triggers browser download (not a server export) | — |
| Rule Compliance pagination | Server-paginated | ...RuleCompliance |
:::danger Dead code
Two full action-button stacks are commented out and never rendered: header (Edit Profile / Send Password Reset / Suspend User Account) and performance panel (Suspend Trading / Manage Payouts / Graduate to Funded / Reset Challenge / Activate Trading). AdminNotesKPI is also commented out. The Username field renders as a dead link (href="#").
:::
Customers — Live
Route: /dashboard/customers
Lists all customers with summary KPIs and a searchable/paginated table.
Sub-modules
- CustomersCardKPI — 4 cards: Total Customers, New Customers (30d), Active Traders, Customers w/ Orders (30d)
- CustomersTableKPI —
CommonFilterSection+CommonDashboardTable
| Control | Effect |
|---|---|
| Refresh | Refetches all 4 cards + table |
| Search ("name, email") | 500ms debounce — note: page-reset-on-search is commented out here, unlike Traders/Orders |
| Date range picker (joined) | Filters table |
| Clear search / date / all | Resets filter state |
| Pagination | Server-paginated table |
| "Details" row button | Encrypts user_id → localStorage["cst_data"] → full-page nav to Customer Details |
:::danger Dead code
A bulk-selection "floating action bar" (Activate Selected / Export Selected / Suspend Selected, all wired to alert()) is fully commented out; the table's isCheckboxEnabled is also set false, so no bulk UI renders at all.
:::
Customer Details — Mock (read-only)
Routes: /dashboard/customer_details /dashboard/customers/[customer_id] /dashboard/customers/details
Detail view: profile, contact info, order history, trading-account summary, IP logs. Despite the dynamic-id route validating a numeric customer_id, data is actually read from encrypted localStorage["cst_data"] in all three route variants — the URL param is effectively cosmetic.
Sub-modules
- CommonContent × 3 — Customer Basic Information, Contact & Account Details, Trading Activity Summary
- CommonDashboardTableCopy × 3 — Order History, Trading Account Summary, IP Logs — each with independent pagination
| Control | Effect |
|---|---|
| Back / Refresh | router.back() / refetches details, order history, trading summary, IP logs |
| 3 independent table paginations | Order History / Trading Account Summary / IP Logs each server-paginated separately |
| Email field | mailto: link only |
:::danger Mock
The entire header action stack (Edit Profile/Save/Close, Activate Account, Send Password Reset, Suspend Account) is commented out — currently no action buttons render on this page besides Back/Refresh. Even if reachable, the handler only does console.log + a fake setTimeout + alert() — no real API call exists. The confirmation modal is mounted but can never be opened.
:::
Orders — Live
Route: /dashboard/orders
Lists all commerce orders with today's-metrics KPIs, rich filtering, and a detailed order table.
Sub-modules
- TraderMetricsKPI — Orders Today, Pending Confirmation, Sales Today
- OrderListKPI —
CommonDashboardTableCopywith colored chips for payment/order status/type
| Control | Effect |
|---|---|
| Refresh | Refetches all KPI cards + table |
| Search ("Order Id or Email") | Debounced |
| Date range picker | Ignored whenever "Relative Period" filter is set |
| Filter popover | Broker (multi-select), Relative Period, Payment Gateway, Payment Status, Order Type, Account Type — Apply/Discard |
| Per-chip clear | Removes a single active filter value |
| Pagination | Server-paginated |
| "Details" row button | Encrypts both order_id and product → localStorage → full-page nav to Order Details |
| Order ID column | Copy-to-clipboard enabled |
Order Details — Mock (read-only)
Route: /dashboard/order_details
Detail view: order summary, customer info, line items, payment info.
Sub-modules
- CommonContent × 4 — Order Summary, Customer Information, Order Items, Payment Information
- CommonDashboardTable — Order Items (non-paginated, computed Sub Total/Discount/Total rows)
| Control | Effect |
|---|---|
| Back / Refresh | router.back() / refetches summary, items, payment info |
| Customer name link | Client-side nav to /dashboard/customers/{user_id} — uses plaintext user_id, inconsistent with the encrypted-localStorage pattern used everywhere else |
| Email field | mailto: link |
:::danger Mock
Header action stack (Issue Refund, Resend Confirmation Email, Cancel Order) is commented out — not rendered. Handler is console.log + fake setTimeout only, explicitly flagged in-source as dummy scaffolding.
:::
Products — Live
Route: /dashboard/commerce/products
Product-performance analytics — KPI cards, revenue/units pie charts by product, detailed per-product stats table.
Sub-modules
- ProductCardKPI — Total Units Sold, Total Revenue, Best Product by Revenue, Best Product by Units
- FinancePieChart × 2 — Revenue by Product / Units Sold by Product, each with own day-range selector
- DetailedProductStatisticsKPI — Per-product Units/Revenue/Avg Price/Net Revenue table
| Control | Effect |
|---|---|
| Refresh | Refetches all 6 underlying queries |
| Revenue-by-Product day selector | Independent re-query |
| Units-Sold-by-Product day selector | Independent re-query |
:::warning Dead code
A shared selectedDay state exists for the top KPI cards + detail table but has no UI control that ever changes it — effectively a fixed 30-day window with no visible selector. A leftover mock-data useEffect (fake products, 1.2s artificial delay) sets state that's never read except its loading flags.
:::
Settings — Mock
Route: /settings
Account settings — personal info, 2FA toggle, change password. Every interactive control on this page is a UI-only mock, confirmed by reading source.
Sub-modules
- PersonalInfo — Edit/Save toggle, hardcoded default values, no
onSubmithandler at all - TwoFactorAuthComp — Switch,
onSubmitisconsole.logonly - ChangePasswordComp — Real form fields, but submit does
console.log+alert("...dummy") - Not rendered —
BillingInfo,AppearenceKPIcommented out;notificationspreferencesKPIorphaned/unreferenced entirely
:::danger Mock No API hook is imported anywhere on this page. "Save" on Personal Info just toggles edit mode off with nothing persisted; the 2FA switch and Change Password submit both log to console / alert and stop there. No refresh, export, or navigation actions exist on this page. :::