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:
commit
61a7884ee5
127 changed files with 13323 additions and 0 deletions
14
postgres/init/02_rls_policies.sql
Normal file
14
postgres/init/02_rls_policies.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- Row Level Security policies
|
||||
-- The application sets: SET LOCAL app.current_user_id = '<uuid>' at the start of each request
|
||||
|
||||
-- Helper function to get current user id safely
|
||||
CREATE OR REPLACE FUNCTION current_app_user_id() RETURNS UUID AS $$
|
||||
BEGIN
|
||||
RETURN current_setting('app.current_user_id', true)::UUID;
|
||||
EXCEPTION WHEN OTHERS THEN
|
||||
RETURN NULL;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql STABLE SECURITY DEFINER;
|
||||
|
||||
-- Policies are applied after table creation via Alembic migration
|
||||
-- This file sets up the helper only; RLS is enabled in the migration
|
||||
Loading…
Add table
Add a link
Reference in a new issue