librelad 875a60f90f LibrePortal v0.1.0 — initial release
A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys,
Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun
VPN routing, and a web dashboard to manage it all.

Free & open forever to self-host; optional paid hosted services fund it.
See PROMISE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-21 20:37:54 +01:00

31 lines
1.4 KiB
TypeScript

import { db } from "@/db";
import { categories } from "@/db/schema";
export const DEFAULT_CATEGORIES: Array<{
name: string;
kind: "income" | "expense" | "transfer";
color: string;
icon: string;
}> = [
{ name: "Salary", kind: "income", color: "#10b981", icon: "Briefcase" },
{ name: "Business", kind: "income", color: "#06b6d4", icon: "Store" },
{ name: "Other Income", kind: "income", color: "#22c55e", icon: "PiggyBank" },
{ name: "Rent", kind: "expense", color: "#f97316", icon: "Home" },
{ name: "Mortgage", kind: "expense", color: "#fb923c", icon: "House" },
{ name: "Groceries", kind: "expense", color: "#eab308", icon: "ShoppingCart" },
{ name: "Food & Dining", kind: "expense", color: "#f59e0b", icon: "UtensilsCrossed" },
{ name: "Subscriptions", kind: "expense", color: "#a855f7", icon: "PlaySquare" },
{ name: "Utilities", kind: "expense", color: "#0ea5e9", icon: "Zap" },
{ name: "Transport", kind: "expense", color: "#3b82f6", icon: "Car" },
{ name: "Insurance", kind: "expense", color: "#ec4899", icon: "ShieldCheck" },
{ name: "Debt Repayment", kind: "expense", color: "#ef4444", icon: "CreditCard" },
{ name: "Savings", kind: "transfer", color: "#14b8a6", icon: "Landmark" },
{ name: "Other", kind: "expense", color: "#6b7280", icon: "Tag" },
];
export async function seedHouseholdDefaults(householdId: string) {
await db.insert(categories).values(
DEFAULT_CATEGORIES.map((c) => ({ householdId, ...c })),
);
}