Set up project configuration and base UI components

Initializes the project with necessary configurations, including Replit settings and a .gitignore file. It also introduces foundational UI components for the application, such as buttons, dialogs, and layout elements, likely for the Pomodoro timer application.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 59a5ae27-3c71-459b-b42f-fe14121bf9c3
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3007b6f6-d03b-45e1-9ed1-7ce8de18ea24/59a5ae27-3c71-459b-b42f-fe14121bf9c3/Uupe4F4
This commit is contained in:
ingecarlosgutie
2025-08-31 20:11:52 +00:00
parent 64aa1e69a0
commit 80595e7002
89 changed files with 17597 additions and 0 deletions

38
shared/schema.ts Normal file
View File

@@ -0,0 +1,38 @@
import { sql } from "drizzle-orm";
import { pgTable, text, varchar, integer, boolean, timestamp } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { z } from "zod";
export const sessions = pgTable("sessions", {
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
deviceId: text("device_id").notNull(),
type: text("type").notNull(), // 'focus' | 'break'
intendedMinutes: integer("intended_minutes").notNull(),
actualSeconds: integer("actual_seconds").notNull(),
startedAt: timestamp("started_at").notNull(),
endedAt: timestamp("ended_at").notNull(),
completed: boolean("completed").notNull(),
interruptions: integer("interruptions").notNull().default(0),
});
export const deviceProfiles = pgTable("device_profiles", {
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
deviceId: text("device_id").notNull().unique(),
createdAt: timestamp("created_at").notNull().default(sql`now()`),
lastActiveAt: timestamp("last_active_at").notNull().default(sql`now()`),
});
export const insertSessionSchema = createInsertSchema(sessions).omit({
id: true,
});
export const insertDeviceProfileSchema = createInsertSchema(deviceProfiles).omit({
id: true,
createdAt: true,
lastActiveAt: true,
});
export type InsertSession = z.infer<typeof insertSessionSchema>;
export type Session = typeof sessions.$inferSelect;
export type InsertDeviceProfile = z.infer<typeof insertDeviceProfileSchema>;
export type DeviceProfile = typeof deviceProfiles.$inferSelect;