6d576bad40
Build all 8 primary screens for CAR-33 on top of the Phase 1 scaffold: - Auth: login, register, forgot password with JWT flow and mock fallback - Dashboard: triggered alerts banner, spending stats, price trend sparklines (Recharts), recent purchases - Purchase History: store filter chips, paginated list with item previews - Purchase Detail: receipt view with line items linking to product pages - Products: search with instant filter, store price comparison badges - Product Detail: 90-day price history chart (Recharts), store comparison table - Store Comparison: ranked store cards with savings banner - Price Alerts: triggered/watching sections, create form, progress bars, delete - Coupons: expiration warnings, copy-to-clipboard coupon codes - Account Linking: connect Meijer/Kroger/Target with status indicators - Settings: profile, connected stores, notification toggles, theme switcher, sign out Also adds: - Mock data layer (src/lib/mock-data.ts) for demo/screenshot use - StoreIcon component with store brand colors - Code-split Recharts chunk (initial JS: 117KB, Recharts lazy: 498KB) - All 48px+ touch targets, mobile-first Tailwind layout Co-Authored-By: Paperclip <noreply@paperclip.ing>
66 lines
1.1 KiB
TypeScript
66 lines
1.1 KiB
TypeScript
export interface Purchase {
|
|
id: string
|
|
storeId: string
|
|
storeName: string
|
|
date: string
|
|
total: number
|
|
items: PurchaseItem[]
|
|
}
|
|
|
|
export interface PurchaseItem {
|
|
id: string
|
|
productId: string
|
|
name: string
|
|
quantity: number
|
|
price: number
|
|
unitPrice: number
|
|
}
|
|
|
|
export interface Product {
|
|
id: string
|
|
name: string
|
|
brand: string
|
|
category: string
|
|
imageUrl?: string
|
|
prices: ProductPrice[]
|
|
}
|
|
|
|
export interface ProductPrice {
|
|
storeId: string
|
|
storeName: string
|
|
price: number
|
|
lastUpdated: string
|
|
}
|
|
|
|
export interface PriceHistory {
|
|
date: string
|
|
price: number
|
|
storeId: string
|
|
}
|
|
|
|
export interface Coupon {
|
|
id: string
|
|
productId?: string
|
|
storeName: string
|
|
description: string
|
|
discount: string
|
|
expiresAt: string
|
|
code?: string
|
|
}
|
|
|
|
export interface PriceAlert {
|
|
id: string
|
|
productId: string
|
|
productName: string
|
|
targetPrice: number
|
|
currentPrice: number
|
|
triggered: boolean
|
|
}
|
|
|
|
export interface User {
|
|
id: string
|
|
email: string
|
|
name: string
|
|
connectedStores: string[]
|
|
}
|