+ {/* Main Timer Area */}
+
+
+
+ {isWorkSession ? 'Work Session' : 'Break Time'}
+
+
+
+
+
+
+
+
+
+
+ {/* History Sidebar */}
+
+
+
+
+ );
+}
diff --git a/pomodoro-timer-by-jules/src/lib/db.ts b/pomodoro-timer-by-jules/src/lib/db.ts
new file mode 100644
index 0000000..e47aa09
--- /dev/null
+++ b/pomodoro-timer-by-jules/src/lib/db.ts
@@ -0,0 +1,91 @@
+import sqlite3 from 'sqlite3';
+import { open, Database } from 'sqlite';
+import path from 'path';
+
+// Define the database file path.
+const dbPath = process.env.NODE_ENV === 'production'
+ ? path.join(process.cwd(), 'pomodoro.db')
+ : path.join(process.cwd(), 'pomodoro.db');
+
+let db: Database | null = null;
+
+export interface PomodoroSession {
+ id: number;
+ session_type: 'work' | 'break';
+ start_time: string; // Stored as ISO string
+ end_time: string; // Stored as ISO string
+ duration_minutes: number;
+}
+
+export async function initDb(): Promise