feat: add iOS support and harden receipt scanning

This commit is contained in:
Timo
2026-08-20 23:48:26 +02:00
parent f5e06c32b0
commit cf1b799e1b
107 changed files with 11755 additions and 122 deletions

View File

@@ -0,0 +1,26 @@
import Foundation
/// Mirrors the objects returned by `GET /api/projects` (src/app/api/projects/route.ts).
/// Projects are Pro-only "folders" receipts can be filed under.
struct Project: Codable, Identifiable, Equatable {
let id: String
var name: String
var color: String?
var receiptCount: Int
let createdAt: String
let updatedAt: String
/// Fixed palette the web app offers when creating/editing a project
/// keep in sync with `PROJECT_COLORS` in src/app/api/projects/route.ts.
static let colorPalette = ["slate", "blue", "emerald", "amber", "rose", "violet"]
}
struct ProjectListResponse: Decodable {
let success: Bool
let projects: [Project]
}
struct CreateProjectRequest: Encodable {
let name: String
let color: String?
}