feat(api): order persistence (Postgres or in-memory fallback) + orders API

lib/db (env-guarded postgres-js), lib/orders-store (createOrder/getOrder/listOrders/setStatus, DB-or-memory), /api/orders (POST create+estimate, GET list), /api/orders/[id] (GET, PATCH status with escrow-safe state machine). Activates fully on DATABASE_URL/POSTGRES_URL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 18:11:34 +02:00
co-authored by Claude Opus 4.8
parent 15c65a584c
commit 0b09ee5795
6 changed files with 191 additions and 5 deletions
+4 -1
View File
@@ -48,6 +48,7 @@
"lucide-react": "^0.454.0",
"next": "16.0.10",
"next-themes": "^0.4.6",
"postgres": "^3.4.9",
"react": "19.2.0",
"react-day-picker": "9.8.0",
"react-dom": "19.2.0",
@@ -71,6 +72,8 @@
"typescript": "^5"
},
"pnpm": {
"onlyBuiltDependencies": ["sharp"]
"onlyBuiltDependencies": [
"sharp"
]
}
}