Introducing a new way to review your PRs.

Read the announcement

arhamkhnz / next-shadcn-admin-dashboard

Modern Admin Dashboard Template built with Shadcn UI and Next.js 16

View on GitHub

22 documents · Updated Nov 23, 2026

docs / dashboard-crypto

Cryptocurrency portfolio dashboard

The cryptocurrency portfolio dashboard gives a user one view of portfolio value, asset holdings, market price context, exchange distribution, profit and loss, and account activity. It is a snapshot and review surface rather than a trading system. It is one experience within the dashboard experiences area, alongside the analytics and commerce and human resources dashboards.

Dashboard flow

The page moves from the portfolio summary to market context, then to exchange and performance views, and ends with a searchable activity history. This order lets a user first understand current value, then inspect the reasons and events behind it.

flowchart TD
    A[Portfolio holdings] --> B[Asset price view]
    B --> C[Exchange allocation]
    B --> D[Exchange estimate]
    B --> E[Monthly realized P&L]
    C --> F[Account activity]
    D --> F
    E --> F

Portfolio snapshot

The portfolio snapshot shows the total value of the tracked crypto assets and gives quick access to common account actions. It establishes the current balance before the user reviews market movement or account events.

Holdings summary

The holdings view presents the portfolio total and one summary card for each tracked asset. Each asset card pairs the quantity with its USD value, while the portfolio card shows the number of assets and the combined balance.

References: src/…/portfolio-holdings.tsx• L14-71 src/…/data.ts• L3-77

Portfolio actions

The summary offers deposit, withdraw, and activity actions so that a user can move from the balance view to an account operation or its history. The page header also exposes a wallet connection action and a display-currency control; USD is the active display choice in this experience.

References: src/…/page.tsx• L23-50 src/…/portfolio-holdings.tsx• L23-49

Market views

Market views connect the value snapshot to price movement and investment performance. They use the selected asset and time range to help a user compare the current market price with the asset's average buy price.

Price history

The price view lets a user choose one of the tracked assets and a range from one day to one year. A candlestick view shows open, high, low, and close prices, with markers for the latest price and average buy price. The chart data is illustrative, so the view explains price behavior without serving as a live market feed.

References: src/…/price-chart.tsx• L154-287 src/…/data.ts• L514-583

Monthly realized P&L

The monthly P&L view summarizes realized profit and loss for the latest twelve months. Positive and negative months use separate visual states around a zero line, which makes the direction and size of monthly results easy to compare.

References: src/…/monthly-pnl.tsx• L10-76 src/…/data.ts• L508-528

Exchange views

Exchange views show where portfolio value sits and provide a simple estimate for exchanging one tracked asset for another. Together they cover allocation and conversion context without implying that the dashboard executes a trade.

Exchange allocation

The allocation view divides the portfolio value across Binance, Coinbase, Kraken, and OKX. The chart shows each exchange's share, and the adjoining values provide the USD amount behind each share.

References: src/…/exchange-allocation.tsx• L15-93 src/…/data.ts• L74-108

Asset exchange estimate

The exchange card estimates how much of a selected receiving asset corresponds to a selected payment amount. It shows the rate, applies the displayed exchange fee, and checks for invalid amounts or insufficient balance. The swap control changes the two assets, while the 50% and Max actions use the available balance as a reference.

References: src/…/exchange-card.tsx• L121-211 src/…/data.ts• L3-74

Account activity

The account activity table provides a time-bounded record of portfolio events. It turns the dashboard from a static balance view into a place where a user can trace deposits, withdrawals, transfers, buys, and sells.

Activity records

Each record identifies an asset, an activity type, an amount, a status, and a UTC timestamp. Incoming and outgoing events use signed quantities, while completed and pending states distinguish settled activity from work that is still in progress.

References: src/…/activity-columns.tsx• L31-107 src/…/data.ts• L112-121

Activity controls

The table supports five time windows from 24 hours to one year, text search, adjustable page size, and page navigation. Search and range changes reset the page position so that the result view starts at the first matching record. Empty results explain whether the period has no activity or the search has no match.

References: src/…/account-activity.tsx• L29-57 src/…/account-activity.tsx• L59-215

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the asset set aligned across holdings, price selection, exchange selection, chart data, and activity asset labels.
  • Keep the portfolio total and exchange allocation on the same USD basis so allocation percentages remain meaningful.
  • Preserve the distinction between realized P&L and unrealized price movement when changing chart labels or source data.
  • Keep activity range labels, timestamp handling, and UTC display behavior aligned so filtering and displayed dates describe the same period.
  • Keep incoming and outgoing activity signs aligned with the activity types shown in the table.

Important failure modes

TriggerConsequenceGuard
An asset exists in holdings but not in the shared asset setPrice and exchange selectors cannot represent the full portfolioUpdate the shared asset definition used by all asset views
Exchange values no longer sum to the portfolio balanceAllocation percentages misstate the distributionReconcile allocation values with the portfolio total
Activity timestamps use a different time basis from the range filterRecords appear in an unexpected periodKeep filtering and display in UTC
A transaction uses an unsupported activity type or statusThe table loses its intended color and amount meaningUse the defined activity and status values
A market range has no generated dataThe selected asset chart has no current price or reference markersKeep each supported range mapped to a non-empty series

Key files

FileWhy to read it
src/…/page.tsxShows the page-level order and relationship between all dashboard views.
src/…/data.tsDefines the shared portfolio, exchange, activity, P&L, and chart data model.
src/…/portfolio-holdings.tsxExplains the portfolio balance and per-asset summary.
src/…/price-chart.tsxShows the user-facing price and average-buy-price comparison.
src/…/exchange-allocation.tsxShows how portfolio value is distributed across exchanges.
src/…/exchange-card.tsxShows the asset conversion estimate and balance checks.
src/…/monthly-pnl.tsxShows the realized monthly performance view.
src/…/account-activity.tsxShows filtering, search, paging, and the activity table lifecycle.
src/…/activity-columns.tsxDefines the meaning and display of each activity record field.