How mubashirtech56/expense-tracker works
Friends Expense Manager is a collaborative expense-splitting web app for friends and groups. Users sign in, manage shared expenses and settlements, and view personal or group balances; administrators also manage members, group settings, and audit activity. The browser controller coordinates the UI, authentication, and data access, while Supabase provides persistence and authentication. The README documents realtime sync and PWA/offline support. Some feature implementations were not sampled, so those documented capabilities are shown without speculative internal call paths.
Main entry points: script.js App controller · api.js Data access and sync · auth.js Authentication · index.ts Create member function
Components 19
Web application
- App interface
index.html - App controller
js/script.js - Offline shell
public/sw.js
Identity and access
- Authentication
js/auth.js - Login ID normalization
js/slugify.js - Supabase client setup
js/supabase.js
Expense management
- Data access and sync
js/api.js - Offline state cache
js/api.js - Expenses and settlements
js/script.js - Member administration
js/script.js - Group settings and audit
js/script.js - Data backups
js/script.js
Supabase services
- PostgreSQL with RLS
supabase/schema.sql - Supabase Auth
js/supabase.js - Create member function
supabase/functions/create-friend/index.ts - Delete member function
supabase/functions/delete-friend/index.ts - Reset password function
supabase/functions/reset-password/index.ts - Supabase Realtime
Other components
- Friend or admin
Connections 22
- Friend or admin → App interface: uses
README.md - App interface → App controller: renders
README.md - App controller → Authentication: uses
js/script.js - App controller → Data access and sync: calls
js/script.js - App controller → Expenses and settlements: coordinates
README.md - App controller → Member administration: provides
README.md - App controller → Group settings and audit: provides
README.md - App controller → Data backups: provides
README.md - Authentication → Supabase client setup: uses
js/auth.js - Authentication → Login ID normalization: normalizes IDs
js/auth.js - Authentication → Supabase Auth: authenticates
js/auth.js - Data access and sync → Supabase client setup: uses
js/api.js - Data access and sync → Offline state cache: caches state
js/api.js - Data access and sync → PostgreSQL with RLS: reads and writes
README.md - Data access and sync → Create member function: invokes
js/api.js - Create member function → Supabase Auth: creates users
supabase/functions/create-friend/index.ts - Create member function → PostgreSQL with RLS: inserts profiles
supabase/functions/create-friend/index.ts - Delete member function → PostgreSQL with RLS: updates profiles
supabase/functions/delete-friend/index.ts - App controller → Delete member function: admin actions
- App controller → Reset password function: admin actions
- Supabase Realtime → Data access and sync: syncs changes
README.md - Offline shell → App interface: serves offline shell
public/sw.js