> ## Documentation Index
> Fetch the complete documentation index at: https://dhanurgo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# HostMetrics Documentation

> Complete technical and business documentation for the HostMetrics fleet management platform

# Welcome to HostMetrics

HostMetrics (internally TuroDashboard) is a comprehensive fleet management and analytics platform for Turo hosts. It enables hosts to track vehicles, trips, earnings, expenses, investors/co-hosts, and generate profitability reports.

## Who This Documentation Is For

| Audience                   | Start Here                                                                                                                                      |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **New Developer / Intern** | [Prerequisites](/getting-started/prerequisites) → [Local Setup](/getting-started/local-setup) → [Architecture Overview](/architecture/overview) |
| **Product Owner**          | [Features](/features/dashboard-kpis) → [Business Rules](/business-rules/revenue-decomposition)                                                  |
| **Returning Developer**    | [Hooks Reference](/development/hooks-reference) → [DB Operations](/development/db-operations)                                                   |

## Tech Stack

| Layer           | Technology                 |
| --------------- | -------------------------- |
| Framework       | Next.js 15 (App Router)    |
| Language        | TypeScript 5               |
| Database        | Supabase (PostgreSQL)      |
| Auth            | Supabase Auth (JWT)        |
| Styling         | Tailwind CSS 4             |
| UI Components   | shadcn/ui (Radix UI)       |
| Charts          | Recharts                   |
| PDF Generation  | jsPDF                      |
| Payments        | Stripe                     |
| Testing         | Vitest + Playwright        |
| Deployment      | Vercel                     |
| Background Jobs | AWS Lambda (toll scraping) |

## Core Features

<CardGroup cols={2}>
  <Card title="Dashboard & KPIs" icon="chart-line">
    Financial metrics, trip analytics, revenue breakdowns, fleet health, and monthly trends
  </Card>

  <Card title="Trip Management" icon="car">
    Import Turo CSVs, filter by status, view earnings breakdowns per trip
  </Card>

  <Card title="Vehicle Fleet" icon="truck">
    Add vehicles, manage photos, track status, per-vehicle profitability
  </Card>

  <Card title="Investor Management" icon="users">
    Revenue sharing, vehicle assignments, payment tracking, agreements, 1099 generation
  </Card>

  <Card title="Toll Reconciliation" icon="road">
    Connect toll accounts (NTTA, EZPass, SunPass), match tolls to trips, track costs
  </Card>

  <Card title="Expense Tracking" icon="receipt">
    Per-vehicle and global expenses, splitting, categories, recurring support
  </Card>

  <Card title="Reports & Analytics" icon="file-chart-line">
    Monthly earnings, vehicle profitability, discrepancy detection, toll analysis
  </Card>

  <Card title="Fleet Showcase" icon="globe">
    Public fleet pages with customizable templates for marketing your fleet
  </Card>
</CardGroup>

## Project Stats

| Metric              | Count |
| ------------------- | ----- |
| Page Routes         | 28    |
| React Components    | 200+  |
| Custom Hooks        | 28    |
| Database Tables     | 25+   |
| API Routes          | 16    |
| Test Files          | 60+   |
| Supabase Migrations | 24+   |

## Documentation Structure

* **Getting Started** — Environment setup, dependencies, first run
* **Architecture** — System diagrams, database schema, data flows, API routes
* **Features** — What each feature does and how it works (for all audiences)
* **Business Rules** — Revenue formulas, payment calculations, timezone rules
* **Development Guide** — Code patterns, design system, testing, PR process
* **Data Reference** — CSV field specifications with downloadable sample files
