feat: scaffold Antonym fashion store
Anonymous Bitcoin-only fashion e-commerce with: - Vue 3 + Tailwind 4 frontend with glassmorphism dark/light design system - Express 5 + SQLite backend with BTCPay Server integration - Nostr identity (NIP-07/keypair) for anonymous purchase tracking - ChaCha20-Poly1305 encrypted shipping addresses - Admin panel with order/product/stock management - SVG logo splash animation with clip-path reveal - 5 seeded products across 4 categories Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
96
shared/types.ts
Normal file
96
shared/types.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
export interface Product {
|
||||
id: string
|
||||
name: string
|
||||
slug: string
|
||||
description: string
|
||||
priceSats: number
|
||||
images: string[]
|
||||
sizes: SizeStock[]
|
||||
category: string
|
||||
isActive: boolean
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export interface SizeStock {
|
||||
size: string
|
||||
stock: number
|
||||
}
|
||||
|
||||
export type OrderStatus =
|
||||
| 'pending'
|
||||
| 'paid'
|
||||
| 'confirmed'
|
||||
| 'shipped'
|
||||
| 'delivered'
|
||||
| 'cancelled'
|
||||
|
||||
export interface Order {
|
||||
id: string
|
||||
nostrPubkey: string | null
|
||||
email: string | null
|
||||
btcpayInvoiceId: string | null
|
||||
status: OrderStatus
|
||||
items: OrderItem[]
|
||||
totalSats: number
|
||||
note: string | null
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export interface OrderItem {
|
||||
productId: string
|
||||
productName: string
|
||||
size: string
|
||||
quantity: number
|
||||
priceSats: number
|
||||
}
|
||||
|
||||
export interface OrderEvent {
|
||||
id: number
|
||||
orderId: string
|
||||
status: OrderStatus
|
||||
note: string | null
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface CartItem {
|
||||
productId: string
|
||||
slug: string
|
||||
name: string
|
||||
size: string
|
||||
quantity: number
|
||||
priceSats: number
|
||||
image: string
|
||||
}
|
||||
|
||||
export interface CreateOrderRequest {
|
||||
items: { productId: string; size: string; quantity: number }[]
|
||||
shippingAddress: ShippingAddress
|
||||
email?: string
|
||||
nostrPubkey?: string
|
||||
note?: string
|
||||
}
|
||||
|
||||
export interface ShippingAddress {
|
||||
name: string
|
||||
line1: string
|
||||
line2?: string
|
||||
city: string
|
||||
state?: string
|
||||
postalCode: string
|
||||
country: string
|
||||
}
|
||||
|
||||
export interface CreateOrderResponse {
|
||||
orderId: string
|
||||
invoiceUrl: string
|
||||
invoiceId: string
|
||||
}
|
||||
|
||||
export interface ApiError {
|
||||
error: {
|
||||
code: string
|
||||
message: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user