Initial commit

This commit is contained in:
Doh
2024-12-30 13:20:12 -05:00
committed by dohsimpson
commit c4f0db329b
71 changed files with 11302 additions and 0 deletions

35
lib/types.ts Normal file
View File

@@ -0,0 +1,35 @@
export type Habit = {
id: string
name: string
description: string
frequency: 'daily' | 'weekly' | 'monthly'
coinReward: number
completions: string[] // Array of ISO date strings
}
export type WishlistItemType = {
id: string
name: string
description: string
coinCost: number
}
export type TransactionType = 'HABIT_COMPLETION' | 'HABIT_UNDO' | 'WISH_REDEMPTION' | 'MANUAL_ADJUSTMENT';
export interface CoinTransaction {
id: string;
amount: number;
type: TransactionType;
description: string;
timestamp: string;
relatedItemId?: string;
}
export interface HabitsData {
habits: Habit[];
}
export interface CoinsData {
balance: number;
transactions: CoinTransaction[];
}