Dashboard
Understand the NkapBooks Dashboard — your at-a-glance view of business financial health with interactive charts, unpaid invoice summaries, and configurable time periods.
3. Dashboard
The Dashboard is the default landing page after you log in to NkapBooks. It provides an at-a-glance view of your business's financial health through interactive charts and summary widgets — all updated in real time from your accounting data.
/). It is available to all users regardless of role, and is marked with bypassPermissionCheck: true in the routing configuration.3.1 Overview
The Dashboard is organized into four distinct sections, laid out vertically:
| Section | Chart Type | Position | Description |
|---|---|---|---|
| Cashflow | Line Chart | Top (full width) | Visualizes cash inflows and outflows over time |
| Unpaid Sales Invoices | Horizontal Bar | Middle left | Shows paid vs. unpaid amounts for Sales Invoices |
| Unpaid Purchase Invoices | Horizontal Bar | Middle right | Shows paid vs. unpaid amounts for Purchase Invoices |
| Profit and Loss | Bar Chart | Bottom left | Revenue minus expenses per period |
| Top Expenses | Donut Chart | Bottom right | Breakdown of top expense accounts |
Each section operates independently with its own Period Selector, but a global Period Selector in the page header can synchronize all sections at once.
Dark Mode Support
Every chart and widget on the Dashboard fully supports dark mode. Colors, grid lines, fonts, and background shades adapt automatically when you toggle dark mode from the sidebar. For example:
- Chart grid lines become semi-transparent white (
rgba(200, 200, 200, 0.2)) - Font colors shift to
gray-400 - Bar and line colors use the
600shade variants instead of500
Empty States
When there is no data for a particular section, the Dashboard displays a friendly placeholder message instead of an empty chart:
- Cashflow: Shows a dimmed placeholder line chart with dummy data points in gray tones, giving you a preview of what the chart will look like once you start recording transactions.
- Profit and Loss: Displays "No transactions yet"
- Top Expenses: Displays "No expenses in this period"
- Unpaid Invoices: Shows a grayed-out bar with no amounts
3.2 Dashboard Components
3.2.1 Cashflow
The Cashflow section occupies the full width at the top of the Dashboard. It uses a Line Chart with two data series:
| Series | Color (Light) | Color (Dark) | Description |
|---|---|---|---|
| Inflow | Blue 500 | Blue 600 | Cash received into Cash and Bank accounts |
| Outflow | Pink 500 | Pink 600 | Cash paid out from Cash and Bank accounts |
How it works:
- The system queries all
AccountingLedgerEntryrecords linked to accounts of type Cash or Bank. - Data is aggregated by month (format:
yyyy-MM) within the selected period. - Each month shows two data points — total inflow and total outflow.
- Hovering over any data point shows a tooltip with the formatted currency value.
Legend: A color-coded legend appears between the title and the period selector, showing:
- 🟦 Inflow — Blue indicator
- 🟥 Outflow — Pink indicator
Period Options: This Year, This Quarter, YTD
3.2.2 Unpaid Invoices
The Unpaid Invoices section is split into two side-by-side widgets:
| Widget | Schema | Color Theme | Position |
|---|---|---|---|
| Sales Invoices | SalesInvoice | Blue | Left |
| Purchase Invoices | PurchaseInvoice | Pink | Right |
Each widget displays:
- Paid Amount — Total amount already paid across all invoices in the period, shown on the left. Clicking this navigates to a filtered list of paid invoices (
outstandingAmount = 0). - Unpaid Amount — Total outstanding amount across all invoices in the period, shown on the right. Clicking this navigates to a filtered list of unpaid invoices (
outstandingAmount != 0). - Progress Bar — A horizontal bar showing the proportion of paid (filled) vs. unpaid (unfilled). The filled portion uses the theme color (blue for sales, pink for purchases).
- Hover Tooltip — A
MouseFollowertooltip appears on hover, showing the count of paid and unpaid invoices.
How it works:
- Queries
getTotalOutstandingfrom the database for the selected date range. - Separately counts total invoices and outstanding invoices using raw queries on
outstandingAmount. - Calculates the bar width as:
paid / total × 100%.
Period Options: This Year, YTD, This Quarter, This Month
Interactivity:
- Click the Paid amount to navigate to:
/list/SalesInvoice/Paid Sales Invoice(filtered) - Click the Unpaid amount to navigate to:
/list/SalesInvoice/Unpaid Sales Invoice(filtered) - The + action (via the section header) creates a new invoice directly
3.2.3 Profit and Loss
The Profit and Loss section appears in the bottom-left quadrant. It uses a Bar Chart that shows net profit (or loss) for each month in the selected period.
| Element | Color (Light) | Color (Dark) | Description |
|---|---|---|---|
| Positive bars | Blue 500 | Blue 600 | Months where income exceeds expenses |
| Negative bars | Pink 500 | Pink 600 | Months where expenses exceed income |
How it works:
- Calls
getIncomeAndExpensesfrom the database for the selected date range. - For each month in the period list, calculates:
net = income - expenses. - Positive values appear as upward bars (blue), negative values as downward bars (pink).
- The Y-axis automatically scales to accommodate both positive and negative values (
yMaxandyMin). - X-axis labels are formatted as abbreviated month-year (e.g., "Jan 25", "Feb 25").
Period Options: This Year, This Quarter, YTD
3.2.4 Top Expenses
The Top Expenses section appears in the bottom-right quadrant. It uses a Donut Chart showing the top expense accounts for the selected period.
How it works:
- Calls
getTopExpensesfrom the database for the selected date range. - Returns up to 5 expense accounts, sorted by total amount descending.
- Each account is assigned a shade of pink (from darkest to lightest):
- Pink 500, 400, 300, 200, 100 (light mode)
- Pink 600, 500, 400, 300, 200 (dark mode)
Visual Elements:
| Element | Description |
|---|---|
| Donut Chart | Proportional ring chart with interactive hover segments |
| Legend | Left-side legend listing each account name with its color indicator and formatted currency total |
| Center Label | Shows "Total Spending" with the combined total when no segment is active |
| Active Segment | Hovering over a legend item or chart segment highlights it and shows the individual amount |
Period Options: This Year, YTD, This Quarter, This Month
3.3 Period Selector
The Period Selector is a dropdown component used throughout the Dashboard (and in other parts of the application). It allows you to filter data by time range.
Available Periods
| Period | Key | Description |
|---|---|---|
| This Year | This Year | The current fiscal year (based on your configured fiscal year start) |
| This Quarter | This Quarter | The current calendar quarter |
| This Month | This Month | The current calendar month |
| Year to Date | YTD | From the start of the fiscal year to today |
Global vs. Local Period Selectors
The Dashboard has two levels of period selection:
- Global Period Selector — Located in the Page Header (top-right of the Dashboard). When you select a period here, it broadcasts the change to all four sections simultaneously.
- Local Period Selectors — Each section (Cashflow, Unpaid Invoices, Profit & Loss, Top Expenses) has its own period selector. Changing a local selector updates only that section.
Synchronization behavior:
- Selecting a period in the global selector sets the
commonPeriodprop on all child components, which updates their local period to match (if the period is available in their options). - Selecting a period in a local selector emits a
period-changeevent upward. The Dashboard'shandlePeriodChangemethod then clears the global period to indicate that sections are no longer synchronized. - This means: after using the global selector, all sections are in sync. After changing any individual section's period, only that section changes — the others remain at their previous selection.
Period Calculation
Under the hood, the getDatesAndPeriodList utility function converts a period key into:
fromDate— The start date (e.g., January 1 for "This Year")toDate— The end date (e.g., December 31 for "This Year")periodList— An array ofDateTimeobjects representing each month in the range, used to generate X-axis labels and fill in months with zero data
Localized Labels
Period labels are fully translated via the i18n system:
| Key | English | French |
|---|---|---|
This Year | This Year | Cette Année |
YTD | Year to Date | Depuis le début de l'année |
This Quarter | This Quarter | Ce Trimestre |
This Month | This Month | Ce Mois |
3.4 Keyboard Shortcuts
The Dashboard supports the following global keyboard shortcuts:
| Shortcut | Action |
|---|---|
Ctrl+K / Cmd+K | Open Quick Search — search and navigate to any page, document, or action |
Since the Dashboard is the root page, pressing the sidebar shortcut or using the search command will always bring you back here.
3.5 Data Sources
The Dashboard charts pull data from the following database methods:
| Chart | Database Method | Data Source |
|---|---|---|
| Cashflow | fyo.db.getCashflow() | AccountingLedgerEntry records for Cash/Bank accounts |
| Unpaid Invoices | fyo.db.getTotalOutstanding() | SalesInvoice / PurchaseInvoice with submitted, non-cancelled status |
| Profit & Loss | fyo.db.getIncomeAndExpenses() | AccountingLedgerEntry aggregated by Income and Expense root types |
| Top Expenses | fyo.db.getTopExpenses() | AccountingLedgerEntry for Expense accounts, grouped and sorted by total |
All amounts are displayed in your company currency using the configured currency format. Multi-currency invoices are converted using their exchange rate to the base currency before aggregation.
3.6 Tips & Best Practices
- Check the Dashboard daily to stay on top of unpaid invoices and cash flow trends.
- Click on Paid/Unpaid amounts in the invoice widgets to jump directly to filtered invoice lists for follow-up.
- Watch for negative bars in the Profit & Loss chart — they indicate months where expenses exceeded income.
- Review Top Expenses monthly to identify cost-saving opportunities or unexpected spending patterns.
- Use "This Month" for operational monitoring and "This Year" for strategic overview.