implement better-auth auth with postgres and route protection

This commit is contained in:
2026-02-24 13:32:43 -05:00
parent fd168f607c
commit 52a4ab38d3
31 changed files with 1202 additions and 89 deletions

View File

@@ -1,5 +1,5 @@
export type User = {
id: number;
id: string;
email: string;
name: string | null;
image: string | null;
@@ -7,7 +7,7 @@ export type User = {
export type WatchlistItem = {
id: number;
user_id: number;
user_id: string;
ticker: string;
company_name: string;
sector: string | null;
@@ -16,7 +16,7 @@ export type WatchlistItem = {
export type Holding = {
id: number;
user_id: number;
user_id: string;
ticker: string;
shares: string;
avg_cost: string;
@@ -68,6 +68,7 @@ export type TaskType = 'sync_filings' | 'refresh_prices' | 'analyze_filing' | 'p
export type Task = {
id: string;
user_id: string;
task_type: TaskType;
status: TaskStatus;
priority: number;
@@ -83,7 +84,7 @@ export type Task = {
export type PortfolioInsight = {
id: number;
user_id: number;
user_id: string;
provider: string;
model: string;
content: string;