chore: init from v0

This commit is contained in:
Julien Froidefond
2025-11-27 09:51:18 +01:00
commit e9e44916fd
109 changed files with 15966 additions and 0 deletions

80
lib/types.ts Normal file
View File

@@ -0,0 +1,80 @@
// Types for the banking management application
export interface Transaction {
id: string
accountId: string
date: string
amount: number
description: string
type: "DEBIT" | "CREDIT"
categoryId: string | null
isReconciled: boolean
fitId: string // OFX unique transaction ID
memo?: string
checkNum?: string
}
export interface Account {
id: string
name: string
bankId: string
accountNumber: string
type: "CHECKING" | "SAVINGS" | "CREDIT_CARD" | "OTHER"
folderId: string | null
balance: number
currency: string
lastImport: string | null
}
export interface Folder {
id: string
name: string
parentId: string | null
color: string
icon: string
}
export interface Category {
id: string
name: string
color: string
icon: string
keywords: string[] // For auto-categorization
parentId: string | null
}
export interface CategoryRule {
id: string
categoryId: string
pattern: string
isRegex: boolean
}
export interface BankingData {
accounts: Account[]
transactions: Transaction[]
folders: Folder[]
categories: Category[]
categoryRules: CategoryRule[]
}
// OFX Parsed types
export interface OFXTransaction {
fitId: string
date: string
amount: number
name: string
memo?: string
checkNum?: string
type: string
}
export interface OFXAccount {
bankId: string
accountId: string
accountType: string
balance: number
balanceDate: string
currency: string
transactions: OFXTransaction[]
}