feat: add Home page with user dashboard and habit tracking features
- Implemented Home component with user authentication and loading states. - Created Welcome component for unauthenticated users with a sign-in option. - Developed Dashboard component to display user's habits and progress. - Added functionality for habit management, including adding, updating, and deleting habits. - Integrated HabitChart and HabitHistory components for visual representation of habits. - Introduced sharing functionality for progress via Discord integration. feat: establish Discord sharing configuration and routes - Added DiscordSharingConfig type and readDiscordSharingConfig function for environment variable management. - Created sharing contracts for input validation and data structure. - Implemented sharing routes for previewing and sending progress images to Discord. - Added tests for sharing routes to ensure authentication and proper error handling.
This commit is contained in:
@@ -21,6 +21,15 @@ export const sessions = sqliteTable("sessions", {
|
||||
index("sessions_expires_at_idx").on(table.expiresAt),
|
||||
]);
|
||||
|
||||
export const discordDeliveries = sqliteTable("discord_deliveries", {
|
||||
id: text("id").primaryKey(),
|
||||
userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
||||
imageHash: text("image_hash").notNull(),
|
||||
status: text("status").notNull(),
|
||||
messageUrl: text("message_url"),
|
||||
createdAt: integer("created_at").notNull(),
|
||||
});
|
||||
|
||||
// Revisions are append-only, including multiple edits on the same local date.
|
||||
export const habits = sqliteTable('habits', {
|
||||
id: text('id').primaryKey(), userId: text('user_id').notNull().references(() => users.id),
|
||||
|
||||
Reference in New Issue
Block a user