feat: auth foundation, similar tools, costs, redundancy, anonymous voting

This commit is contained in:
root
2026-07-29 21:59:29 +02:00
parent 8b3b7c9955
commit 59badeaa48
22 changed files with 793 additions and 15 deletions
+5 -1
View File
@@ -5,9 +5,13 @@ import { z } from "zod/v4";
export const usersTable = pgTable("users", {
id: serial("id").primaryKey(),
username: text("username").notNull().unique(),
passwordHash: text("password_hash").notNull(),
email: text("email"),
role: text("role").notNull().default("user"),
passwordHash: text("password_hash"),
tier: text("tier").notNull().default("free"),
authProvider: text("auth_provider").notNull().default("local"),
authProviderId: text("auth_provider_id"),
displayName: text("display_name"),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
});