Initial commit: MyMidas personal finance tracker

Full-stack self-hosted finance app with FastAPI backend and React frontend.

Features:
- Accounts, transactions, budgets, investments with GBP base currency
- CSV import with auto-detection for 10 UK bank formats
- ML predictions: spending forecast, net worth projection, Monte Carlo
- 7 selectable themes (Obsidian, Arctic, Midnight, Vault, Terminal, Synthwave, Ledger)
- Receipt/document attachments on transactions (JPEG, PNG, WebP, PDF)
- AES-256-GCM field encryption, RS256 JWT, TOTP 2FA, RLS, audit log
- Encrypted nightly backups + key rotation script
- Mobile-responsive layout with bottom nav

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-04-21 11:56:10 +00:00
commit 61a7884ee5
127 changed files with 13323 additions and 0 deletions

View file

@ -0,0 +1,29 @@
import { create } from "zustand";
import { persist } from "zustand/middleware";
interface AuthState {
token: string | null;
userId: string | null;
displayName: string | null;
totpEnabled: boolean;
setToken: (token: string, userId: string, displayName: string) => void;
setTotpEnabled: (v: boolean) => void;
clearAuth: () => void;
}
export const useAuthStore = create<AuthState>()(
persist(
(set) => ({
token: null,
userId: null,
displayName: null,
totpEnabled: false,
setToken: (token, userId, displayName) =>
set({ token, userId, displayName }),
setTotpEnabled: (v) => set({ totpEnabled: v }),
clearAuth: () =>
set({ token: null, userId: null, displayName: null, totpEnabled: false }),
}),
{ name: "finance-auth" }
)
);

View file

@ -0,0 +1,34 @@
import { create } from "zustand";
import { persist } from "zustand/middleware";
export type Theme =
| "obsidian"
| "arctic"
| "midnight"
| "vault"
| "terminal"
| "synthwave"
| "ledger";
interface UiState {
theme: Theme;
sidebarOpen: boolean;
currency: string;
setTheme: (t: Theme) => void;
setSidebarOpen: (v: boolean) => void;
setCurrency: (c: string) => void;
}
export const useUiStore = create<UiState>()(
persist(
(set) => ({
theme: "obsidian",
sidebarOpen: true,
currency: "GBP",
setTheme: (theme) => set({ theme }),
setSidebarOpen: (v) => set({ sidebarOpen: v }),
setCurrency: (c) => set({ currency: c }),
}),
{ name: "finance-ui" }
)
);