Skip to main content

Component Inventory

Bilko Component Inventory

Last Updated: 2026-02-20 Source of Truth: Filesystem scan of apps/web/components/


Layout Components

Sidebar

  • File: components/sidebar.tsx
  • Purpose: Dark left navigation sidebar with hierarchical menu
  • Props: None (uses pathname from Next.js navigation)
  • Features:
    • Expandable sections (Sales, Purchases, Reports)
    • Active link highlighting (primary green border + background)
    • Dark theme (#111113 background)
    • Logo at top ("BILKO" in primary color)
    • Collapsible sub-navigation with chevron icons
  • Navigation Items:
    • Dashboard (direct link)
    • Sales → Invoices
    • Purchases → Expenses
    • Banking (direct link)
    • Reports → VAT Report
    • Settings (direct link)
  • State: Local state for expanded sections
  • Dependencies: Lucide icons (ChevronDown, ChevronRight, LayoutDashboard, Receipt, ShoppingCart, Landmark, BarChart3, Settings)

TopBar

  • File: components/top-bar.tsx
  • Purpose: Header bar with search, notifications, user menu
  • Props:
    • onMenuClick?: () => void — callback for mobile menu toggle
  • Features:
    • Mobile menu button (hidden on desktop)
    • Mobile logo (hidden on desktop)
    • Search input (placeholder: "Search... (Cmd+K)")
    • Notification bell icon (no badge count yet)
    • User dropdown menu (Profile, Settings, Logout)
  • Dependencies: Lucide icons (Search, Bell, Menu, User), shadcn/ui dropdown-menu
  • Mobile Responsive: Shows menu button + logo on mobile, hides on desktop

UI Components (shadcn/ui)

All components in components/ui/ are from shadcn/ui library (Radix UI primitives + Tailwind).

Avatar

  • File: components/ui/avatar.tsx
  • Purpose: User avatar with fallback
  • Radix Primitive: @radix-ui/react-avatar
  • Usage: Not yet used in current pages (ready for user profile)

Badge

  • File: components/ui/badge.tsx
  • Purpose: Status indicators (draft, sent, paid, overdue, success, warning, etc.)
  • Variants: default, secondary, success, warning, destructive
  • Usage:
    • Invoice status badges
    • Expense status badges
    • "Coming Soon" tags on report cards
    • User status in settings
  • Props: variant?: "default" | "secondary" | "destructive" | "outline" | "success" | "warning"

Button

  • File: components/ui/button.tsx
  • Purpose: Primary UI button
  • Variants: default, destructive, outline, secondary, ghost, link
  • Sizes: default, sm, lg, icon
  • Usage: All action buttons throughout the app
  • Radix Primitive: @radix-ui/react-slot (asChild support)

Card

  • File: components/ui/card.tsx
  • Purpose: Content container with header/content sections
  • Sub-components:
    • Card — outer wrapper
    • CardHeader — header section
    • CardTitle — title text
    • CardDescription — subtitle/description text
    • CardContent — body content
    • CardFooter — footer section (not used yet)
  • Usage:
    • Dashboard metric cards
    • Report cards
    • Settings content wrapper
    • Banking account/transaction tables
  • Shadow: shadow-card (0 2px 8px rgba(0, 0, 0, 0.08))

Dialog

  • File: components/ui/dialog.tsx
  • Purpose: Modal dialogs
  • Radix Primitive: @radix-ui/react-dialog
  • Sub-components:
    • Dialog — wrapper
    • DialogTrigger — trigger button
    • DialogContent — modal content
    • DialogHeader — header section
    • DialogTitle — modal title
    • DialogDescription — modal description
    • DialogFooter — action buttons
  • Usage:
    • Add Customer dialog (invoice wizard)
    • Add Expense dialog
  • Overlay: Black 50% opacity, click-to-close

Dropdown Menu

  • File: components/ui/dropdown-menu.tsx
  • Purpose: Context menus and dropdowns
  • Radix Primitive: @radix-ui/react-dropdown-menu
  • Sub-components:
    • DropdownMenu — wrapper
    • DropdownMenuTrigger — trigger button
    • DropdownMenuContent — menu content
    • DropdownMenuItem — menu item
    • DropdownMenuLabel — label text
    • DropdownMenuSeparator — divider
  • Usage:
    • Invoice row actions (view, edit, send, download, delete)
    • User menu in top bar
  • Shadow: shadow-dropdown (0 4px 16px rgba(0, 0, 0, 0.10))

Input

  • File: components/ui/input.tsx
  • Purpose: Text input field
  • Types Supported: text, email, number, date, search
  • Usage:
    • All form inputs (invoice wizard, expense form, settings)
    • Search inputs (invoice list, expense list)
    • Filter inputs
  • Styling: Border, padding, focus ring (primary color)

Label

  • File: components/ui/label.tsx
  • Purpose: Form field labels
  • Radix Primitive: @radix-ui/react-label
  • Usage: All form field labels
  • Accessibility: Proper label-input association

Select

  • File: components/ui/select.tsx
  • Purpose: Dropdown select input
  • Radix Primitive: @radix-ui/react-select
  • Sub-components:
    • Select — wrapper
    • SelectTrigger — trigger button
    • SelectValue — selected value display
    • SelectContent — dropdown content
    • SelectItem — option item
  • Usage:
    • Status filters (invoices, expenses)
    • Date range filters
    • Currency selectors
    • Category selectors
    • Settings dropdowns
  • Styling: Chevron icon, border, focus ring

Separator

  • File: components/ui/separator.tsx
  • Purpose: Visual divider line
  • Radix Primitive: @radix-ui/react-separator
  • Orientations: horizontal, vertical
  • Usage: Not heavily used yet (potential in settings/forms)

Sheet

  • File: components/ui/sheet.tsx
  • Purpose: Slide-out panel (mobile sidebar alternative)
  • Radix Primitive: @radix-ui/react-dialog (styled as sheet)
  • Usage: Not yet used (potential for mobile sidebar instead of overlay)
  • Direction: Can slide from left/right/top/bottom

Skeleton

  • File: components/ui/skeleton.tsx
  • Purpose: Loading placeholder
  • Usage: Not yet used (ready for loading states)
  • Animation: Pulse animation
  • Future Use: Data fetching loading states

Table

  • File: components/ui/table.tsx
  • Purpose: Data table
  • Sub-components:
    • Table — wrapper
    • TableHeader — header section
    • TableBody — body section
    • TableRow — row
    • TableHead — header cell
    • TableCell — data cell
    • TableCaption — caption text (not used)
    • TableFooter — footer section (not used)
  • Usage:
    • Invoice list
    • Expense list
    • Bank transactions
    • VAT transactions
    • Recent transactions (dashboard)
    • Settings (users, integrations)
  • Styling: Border, alternating row hover

Tabs

  • File: components/ui/tabs.tsx
  • Purpose: Tab navigation
  • Radix Primitive: @radix-ui/react-tabs
  • Sub-components:
    • Tabs — wrapper
    • TabsList — tab button container
    • TabsTrigger — tab button
    • TabsContent — tab panel
  • Usage:
    • Banking page (Accounts, Reconcile, Transactions)
    • VAT Report (Reconciliation, Audit, Summary)
  • Styling: Primary underline for active tab

Textarea

  • File: components/ui/textarea.tsx
  • Purpose: Multi-line text input
  • Usage:
    • Invoice notes (customization step)
    • Invoice terms (customization step)
    • Email message (send step)
    • Expense description (optional)
  • Rows: Configurable (default: 3-6 rows)

Chart Components

Charts are built with Recharts 2.15.0 (not custom components). Key chart types used:

  • BarChart — P&L trend, receivables aging
  • PieChart — Expenses by category (donut)
  • ResponsiveContainer — Wrapper for all charts (100% width, fixed height)
  • XAxis, YAxis, CartesianGrid, Tooltip, Legend — Chart primitives

Chart Colors (from tailwind.config.ts):

  • Revenue: #22C55E (chart-revenue)
  • Expense: #EF4444 (chart-expense)
  • Profit: #3B82F6 (chart-profit)
  • Neutral: #6B7280 (chart-neutral)

Utility Components

cn (lib/utils.ts)

  • Purpose: Utility function for conditional class names
  • Usage: cn("base-class", condition && "conditional-class")
  • Dependencies: clsx + tailwind-merge

Page-Specific Components

None. All components are reusable shadcn/ui components + layout components. No page-specific components exist yet.

Potential future page-specific components:

  • InvoicePreview (extracted from wizard step 5)
  • MetricCard (extracted from dashboard)
  • TransactionRow (extracted from dashboard/banking)
  • ExpenseFormDialog (extracted from expenses page)

Component Usage Map

Component Used In Count
Button All pages 50+
Card Dashboard, Reports, Banking, Settings, Expenses 20+
Table Invoices, Expenses, Banking, Reports, Dashboard, Settings 10+
Input Invoice wizard, Expenses, Settings, TopBar 30+
Select Invoices, Expenses, Banking, Settings, Invoice wizard 20+
Badge Invoices, Expenses, Banking, Reports, Settings 15+
Dialog Invoice wizard, Expenses 2
Dropdown Menu Invoices, TopBar 2
Tabs Banking, VAT Report 2
Textarea Invoice wizard 3
Sidebar All pages 1
TopBar All pages 1
Label All forms 40+
Separator Minimal 1-2
Avatar None yet 0
Sheet None yet 0
Skeleton None yet 0

Notes

  • All UI components are from shadcn/ui (no custom variants yet)
  • No phantom components — this list is exhaustive based on filesystem scan
  • Radix UI primitives provide accessibility out of the box
  • Tailwind CSS 4 for styling (all tokens in tailwind.config.ts)
  • Lucide React for all icons (consistent icon library)