Refactor monolithic modules and harden booking, email, and auth infrastructure.
Split oversized frontend API client, email service, and admin/booking pages into focused modules while preserving import surfaces, and add Redis-backed queues, stale booking cleanup, stronger auth, and scale deployment configs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -432,6 +432,18 @@ async function migrate() {
|
||||
)
|
||||
`);
|
||||
|
||||
await (db as any).run(sql`
|
||||
CREATE TABLE IF NOT EXISTS email_queue (
|
||||
id TEXT PRIMARY KEY,
|
||||
params TEXT NOT NULL,
|
||||
status TEXT NOT NULL DEFAULT 'pending',
|
||||
attempts INTEGER NOT NULL DEFAULT 0,
|
||||
last_error TEXT,
|
||||
created_at TEXT NOT NULL,
|
||||
processed_at TEXT
|
||||
)
|
||||
`);
|
||||
|
||||
// Site settings table
|
||||
await (db as any).run(sql`
|
||||
CREATE TABLE IF NOT EXISTS site_settings (
|
||||
@@ -899,6 +911,18 @@ async function migrate() {
|
||||
)
|
||||
`);
|
||||
|
||||
await (db as any).execute(sql`
|
||||
CREATE TABLE IF NOT EXISTS email_queue (
|
||||
id UUID PRIMARY KEY,
|
||||
params TEXT NOT NULL,
|
||||
status VARCHAR(20) NOT NULL DEFAULT 'pending',
|
||||
attempts INTEGER NOT NULL DEFAULT 0,
|
||||
last_error TEXT,
|
||||
created_at TIMESTAMP NOT NULL,
|
||||
processed_at TIMESTAMP
|
||||
)
|
||||
`);
|
||||
|
||||
// Site settings table
|
||||
await (db as any).execute(sql`
|
||||
CREATE TABLE IF NOT EXISTS site_settings (
|
||||
|
||||
Reference in New Issue
Block a user