Identity & theme
Palette is applied by the app at boot from config. Change a color, hit save, reload the app tab.
Term rules β the core business logic
Term length is derived from what the product cost the dealer. An exact dealer-cost match
uses that rule; no match falls back to the product default (flagged unmatched for review).
Rules are data, not code β edits apply to new registrations; existing expirations keep their dates.
Live state (straight from the database)
By product
| Product | Units | Active |
|---|
Dealerships
| Dealer | Units | Profit |
|---|
Pipelines & statuses read-only β lives in code
Coverage (derived from expires_on)
| active | expires today or later (days remaining shown) |
| expired | past expiry (days since shown) |
unknown | registration has no expiry date |
Term source on a registration
rule | dealer cost matched a price rule exactly |
default | product has no rules; default term applies (GlassGuard) |
unmatched | product has rules but cost matched none β review |
Claim lifecycle
new β in_progress β awaiting_customer β approved | open |
closed_paid / closed_denied | closed (payout = sum of claim items) |
Data model
customers | person + address (lat/lng for roadside ranking) |
products / term_rules | TireGuard, GlassGuard + priceβterm rules |
registrations | a sold contract: VIN, deal date, costs, expiry |
claims / claim_items | issue + itemized payouts |
activity | calls, texts, emails, notes, status changes |
dealerships / roadside_vendors | sellers + road rangers |
Routes
Ops
node server/server.js | run the app (port 8788, PORT env overrides) |
data/aws-motor-club.db | SQLite database (seeded with demo data on first run) |
/breakdown | this document |