Suppliers & Reports

Last updated on 2026-04-05

The suppliers module manages vendor relationships and order history. The reports module provides analytics dashboards for stock valuation, supplier performance, and inventory turnover. All screens share the (dashboard) route group layout.

Supplier Directory

Route: /suppliers

A data table of all suppliers with contact information and order summary metrics.

  • Data table -- columns for supplier name (linked to detail), contact person, email, phone, location (city, country), total orders count, total order value, average lead time, and a row actions dropdown
  • Search -- text input filtering by supplier name, contact person, or email
  • Filters -- dropdown filter by location (country) and active status
  • Sorting -- column header click to sort by name, total orders, total value, or lead time
  • Pagination -- page-based navigation with configurable page size (10, 25, 50)
  • Row actions -- dropdown menu with View, Edit, and Delete options
  • Create button -- "Add Supplier" button in the page header
import { SuppliersTable } from "@/components/inventory/suppliers-table"
import { SupplierFilters } from "@/components/inventory/supplier-filters"

Data Sources

Data Source Location
Suppliers suppliers data/seed.ts
Purchase orders (for metrics) purchaseOrders data/seed.ts

Supplier Detail

Route: /suppliers/[id]

A detailed view of an individual supplier with contact information, order history, and performance metrics.

  • Supplier header -- name, contact person, email (mailto), phone (tel), website link, full address, and status badge (Active/Inactive)
  • Performance metrics -- KPI cards showing total orders, total spend, average order value, average lead time (days), and on-time delivery rate percentage
  • Tabbed content -- three tabs:
    • Orders -- data table of all purchase orders from this supplier, showing PO number (linked to PO detail), order date, expected delivery, actual delivery, total amount, and status badge
    • Products -- data table of all products supplied by this vendor, showing product name (linked to product detail), SKU, unit cost, last order date, and total quantity ordered
    • Performance -- lead time trend line chart (orders vs lead time over the past 12 months), on-time delivery rate bar chart, and order value trend
  • Notes section -- freeform notes about the supplier relationship with timestamps
import { SupplierHeader } from "@/components/inventory/supplier-header"
import { SupplierMetrics } from "@/components/inventory/supplier-metrics"
import { SupplierTabs } from "@/components/inventory/supplier-tabs"

Supplier Detail Layout

┌─────────────────────────────────────────────┐
│ Supplier Name          Status: Active       │
│ Contact  Email  Phone  Website  Address     │
├──────────┬──────────┬──────────┬────────────┤
│ Total    │ Total    │ Avg      │ On-Time    │
│ Orders   │ Spend    │ Lead Time│ Delivery   │
├──────────┴──────────┴──────────┴────────────┤
│ [Orders] [Products] [Performance]           │
│                                             │
│ Tab content area                            │
│                                             │
├─────────────────────────────────────────────┤
│ Notes                                       │
└─────────────────────────────────────────────┘

Add New Supplier

Route: /suppliers/new

A form for adding a new supplier to the directory.

  • Contact Info -- supplier/company name, contact person name, email (validated), phone, website URL
  • Address -- street, city, state, zip, country select
  • Business Details -- payment terms select (Net 30, Net 60, Net 90, Prepaid), currency select, tax ID
  • Lead Time -- default lead time in days (number input)
  • Notes -- freeform textarea for relationship notes
  • Products -- optional multi-select to associate existing products with this supplier, including per-product supplier SKU and cost price
import { SupplierForm } from "@/components/inventory/supplier-form"

Reports Overview

Route: /reports

The reports landing page providing a summary of available reports with preview cards.

  • Report cards -- each card displays the report name, description, a small preview chart or metric, and a "View Report" link
  • Available reports:
    • Stock Value Report -- total inventory valuation breakdown
    • Supplier Performance Report -- vendor metrics and comparisons
    • Inventory Turnover Report -- how quickly stock is selling/moving
  • Quick metrics -- top-level summary cards showing total stock value, average turnover rate, and top-performing supplier
import { ReportCard } from "@/components/inventory/report-card"
import { ReportQuickMetrics } from "@/components/inventory/report-quick-metrics"

Stock Value Report

Route: /reports/stock-value

A detailed report on inventory valuation across all warehouses and categories.

  • Total stock value card -- headline figure showing total inventory value with trend vs. previous period
  • Value by warehouse -- horizontal bar chart showing stock value per warehouse via Recharts BarChart
  • Value by category -- donut chart breaking down total value by product category
  • Value trend -- area chart showing total stock value over the past 12 months with month-over-month change annotations
  • Detailed table -- sortable data table with product name, SKU, category, warehouse, quantity, unit cost, total value, and percentage of total inventory value
  • Date range selector -- filter the report by a custom date range
  • Export -- download report as CSV
import { StockValueChart } from "@/components/charts/stock-value-chart"
import { ValueByWarehouseChart } from "@/components/charts/stock-value-chart"
import { ValueByCategoryChart } from "@/components/charts/category-breakdown"
import { StockValueTable } from "@/components/inventory/stock-value-table"

Supplier Performance Report

Route: /reports/suppliers

A comparative analysis of supplier performance metrics.

  • Supplier comparison table -- data table showing each supplier with total orders, total spend, average lead time, on-time delivery rate, defect rate, and an overall performance score
  • Lead time comparison -- grouped bar chart comparing average lead time across suppliers
  • On-time delivery chart -- bar chart showing delivery rate percentage per supplier, with a reference line at the target threshold (e.g., 95%)
  • Spend distribution -- pie chart showing spending proportion across suppliers
  • Top supplier highlight -- callout card for the best-performing supplier with key metrics
  • Date range selector -- filter by order date range
  • Export -- download report as CSV
import { SupplierComparisonChart } from "@/components/charts/supplier-chart"
import { SupplierPerformanceTable } from "@/components/inventory/supplier-performance-table"

Inventory Turnover Report

Route: /reports/turnover

A report analyzing how quickly inventory moves through the system.

  • Turnover rate KPI -- headline figure showing overall inventory turnover ratio with trend indicator
  • Turnover by category -- bar chart comparing turnover rates across product categories
  • Turnover trend -- line chart showing monthly turnover rate over the past 12 months
  • Slow-moving products -- data table highlighting products with the lowest turnover rates (below threshold), showing product name, SKU, category, current stock, average monthly sales, days of supply remaining, and recommended action (markdown, promote, discontinue)
  • Fast-moving products -- data table showing products with highest turnover rates, with reorder recommendations
  • Days of supply -- gauge chart showing average days of supply across the entire inventory
  • Date range selector -- filter by time period
  • Export -- download report as CSV
import { TurnoverChart } from "@/components/charts/turnover-chart"
import { SlowMovingTable } from "@/components/inventory/slow-moving-table"
import { FastMovingTable } from "@/components/inventory/fast-moving-table"

Data Sources

Data Source Location
Suppliers suppliers data/seed.ts
Purchase orders purchaseOrders data/seed.ts
Products products data/seed.ts
Stock levels stockLevels data/seed.ts
Stock movements stockMovements data/seed.ts

Next Steps