BLOCK 1 — Orders persistence + expiration:
- New GET /api/[slug]/orders loads active orders from PostgreSQL on mount, so the
dashboard survives reloads (SSE only carries live events); it also prunes
completed orders older than the retention window on read (no cron)
- Restaurant.orderRetentionHours (default 24, migration 0007) + editor control in
the Orders tab; settings PATCH accepts it
BLOCK 2 — Smart cart pairings (precomputed, zero tokens at runtime):
- Restaurant.pairings JSON (migration 0008) stores { productId: [productId] }
- Optional 'Generate smart suggestions' checkbox in the publish modal; on publish,
one cheap Haiku call analyzes the snapshot and stores validated complements
(lib/pairings.ts, reuses parseLenientJson). AI failure never breaks publishing
- pairings read live and exposed via the public menu; cart shows an auto-rotating,
swipeable SuggestionCarousel of complements for what's in the cart (excluding
items already added), each with Add — only when orders are on and pairings exist
BLOCK 3 — Brand header:
- Restaurant.bannerImage, profileImage, socialLinks (migration 0009)
- New editor Brand tab: upload banner + circular logo (reuses /upload), social
links with common-platform suggestions and basic URL validation; saved via settings
- Public BrandHeader: full-bleed banner (edge-to-edge behind the island, safe-area
aware), circular logo avatar, name, and clickable social icons (lucide-react).
Graceful fallbacks (palette gradient banner, initial avatar) — no broken images.
Images are language-independent
All read live (no republish needed). i18n es/en at parity; glassmorphism,
mobile-first and safe areas preserved. Adds lucide-react.
Verified: build passes; 9 migrations apply; orders persist + prune on read;
publish survives missing API key; pairings + brand exposed via /menu.
47 lines
1.1 KiB
JSON
47 lines
1.1 KiB
JSON
{
|
|
"name": "smartmenu-collina",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "prisma generate && next build",
|
|
"start": "next start",
|
|
"lint": "next lint",
|
|
"prisma:generate": "prisma generate",
|
|
"prisma:migrate": "prisma migrate dev",
|
|
"prisma:deploy": "prisma migrate deploy",
|
|
"db:seed": "tsx prisma/seed.ts"
|
|
},
|
|
"prisma": {
|
|
"seed": "tsx prisma/seed.ts"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/sdk": "^0.65.0",
|
|
"@prisma/client": "^5.22.0",
|
|
"bcryptjs": "^2.4.3",
|
|
"clsx": "^2.1.1",
|
|
"jose": "^5.9.6",
|
|
"lucide-react": "^0.469.0",
|
|
"next": "14.2.21",
|
|
"next-intl": "^3.26.3",
|
|
"qr-code-styling": "^1.9.2",
|
|
"qrcode": "^1.5.4",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"xlsx": "^0.18.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/node": "^20.17.10",
|
|
"@types/qrcode": "^1.5.5",
|
|
"@types/react": "^18.3.18",
|
|
"@types/react-dom": "^18.3.5",
|
|
"autoprefixer": "^10.4.20",
|
|
"postcss": "^8.4.49",
|
|
"prisma": "^5.22.0",
|
|
"tailwindcss": "^3.4.17",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.7.2"
|
|
}
|
|
}
|