Avery Felts bf9da84553 fix: Replace Prisma with native D1 and fix timezone issues
- Created native D1 database layer (src/lib/d1.ts) to bypass Prisma fs.readdir issues
- Updated all API routes to use direct D1 queries
- Added date-utils.ts with local date helpers to fix UTC timezone mismatch
- Calendar now correctly colors today's usage
- Data persists correctly across page refreshes
2026-01-25 18:10:04 -07:00

46 lines
954 B
JSON

{
// Worker name - change this to your preferred name
"name": "quit-smoking-app",
// Use the OpenNext preset for Next.js on Cloudflare Workers
"main": ".open-next/worker.js",
// Compatibility settings for Node.js APIs
"compatibility_date": "2024-09-23",
"compatibility_flags": [
"nodejs_compat"
],
// Set up route matching for static assets
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS"
},
// D1 Database binding
"d1_databases": [
{
"binding": "DB",
"database_name": "quit-smoking-db",
"database_id": "1fca511a-cf91-4fde-854b-561ed92abfa8"
}
],
// Environment variables
"vars": {
"NODE_ENV": "production"
},
// Custom domain
"routes": [
{
"pattern": "quittraq.com/*",
"zone_name": "quittraq.com"
},
{
"pattern": "www.quittraq.com/*",
"zone_name": "quittraq.com"
}
],
// Observability
"observability": {
"logs": {
"enabled": false,
"invocation_logs": true
}
}
}