# elsesystems/else_finance architecture

> Architecture diagram of the GitHub repository elsesystems/else_finance, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/elsesystems/else_finance
- Repository: https://github.com/elsesystems/else_finance

## Overview

FinanceApp is a multi-tenant financial-management web application. Users authenticate, pass protected-route and tenant-access checks, then manage transactions, cost centers, and chart-of-accounts data or review dashboard summaries; voice commands provide an alternate interaction capability. The frontend uses Supabase for authentication and data access, with the README describing database-side RLS. The map preserves documented administration and subscription management. Some capabilities are represented from the README or file tree; unsampled implementation details and their internal links are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/elsesystems/else_finance/blob/main/src/App.tsx) (App routes), [`src/integrations/supabase/client.ts`](https://github.com/elsesystems/else_finance/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/hooks/useAuth.tsx`](https://github.com/elsesystems/else_finance/blob/main/src/hooks/useAuth.tsx) (Authentication), [`src/pages/Dashboard.tsx`](https://github.com/elsesystems/else_finance/blob/main/src/pages/Dashboard.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["App routes<br/>[App.tsx]"]
  node_authpage["Sign in<br/>[Auth.tsx]"]
  node_auth["Authentication<br/>[useAuth.tsx]"]
  node_tenant["Tenant access"]
  node_layout["App layout<br/>[Layout.tsx]"]
end

subgraph group_finance["Financial operations"]
  node_transactions["Transactions<br/>[Transactions.tsx]"]
  node_costcenters["Cost centers<br/>[CostCenters.tsx]"]
  node_chartaccounts["Chart of accounts<br/>[ChartAccounts.tsx]"]
  node_settings["Settings<br/>[Settings.tsx]"]
end

subgraph group_insights["Insights and voice"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_dashcomponents["Dashboard views"]
  node_voicepage["Voice commands<br/>[VoiceCommands.tsx]"]
  node_voicebutton["Voice control<br/>[VoiceButton.tsx]"]
  node_voicehook["Voice command hook"]
end

subgraph group_platform["Administration and platform"]
  node_admin["Admin panel<br/>[Admin.tsx]"]
  node_subscriptions["Subscription manager"]
  node_supabase["Supabase client<br/>[client.ts]"]
  node_supaauth["Supabase Auth"]
  node_database[("PostgreSQL")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_transactions
node_app -->|"routes to"| node_costcenters
node_app -->|"routes to"| node_chartaccounts
node_app -->|"routes to"| node_voicepage
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_admin
node_app -->|"provides context"| node_auth
node_app -->|"checks access"| node_tenant
node_authpage -->|"signs in or up"| node_auth
node_auth -->|"uses client"| node_supabase
node_auth -->|"authenticates"| node_supaauth
node_auth -->|"loads profile"| node_database
node_tenant -->|"queries access"| node_supabase
node_dashboard -->|"renders within"| node_layout
node_dashboard -->|"uses views"| node_dashcomponents
node_dashboard -->|"loads summaries"| node_supabase
node_transactions -->|"renders within"| node_layout
node_transactions -->|"reads and writes"| node_supabase
node_costcenters -->|"manages centers"| node_supabase
node_chartaccounts -->|"manages accounts"| node_supabase
node_settings -->|"loads and updates"| node_supabase
node_layout -->|"renders"| node_voicebutton
node_voicebutton -->|"uses commands"| node_voicehook
node_voicebutton -->|"records transactions"| node_supabase
node_admin -.->|"manages subscriptions"| node_subscriptions
node_subscriptions -->|"updates subscriptions"| node_supabase
node_supabase -->|"connects to"| node_supaauth
node_supabase -->|"queries data"| node_database

click node_app "https://github.com/elsesystems/else_finance/blob/main/src/App.tsx"
click node_authpage "https://github.com/elsesystems/else_finance/blob/main/src/pages/Auth.tsx"
click node_auth "https://github.com/elsesystems/else_finance/blob/main/src/hooks/useAuth.tsx"
click node_tenant "https://github.com/elsesystems/else_finance/blob/main/src/hooks/useTenantAccess.tsx"
click node_layout "https://github.com/elsesystems/else_finance/blob/main/src/components/layout/Layout.tsx"
click node_dashboard "https://github.com/elsesystems/else_finance/blob/main/src/pages/Dashboard.tsx"
click node_dashcomponents "https://github.com/elsesystems/else_finance/tree/main/src/components/dashboard"
click node_transactions "https://github.com/elsesystems/else_finance/blob/main/src/pages/Transactions.tsx"
click node_costcenters "https://github.com/elsesystems/else_finance/blob/main/src/pages/CostCenters.tsx"
click node_chartaccounts "https://github.com/elsesystems/else_finance/blob/main/src/pages/ChartAccounts.tsx"
click node_settings "https://github.com/elsesystems/else_finance/blob/main/src/pages/Settings.tsx"
click node_voicepage "https://github.com/elsesystems/else_finance/blob/main/src/pages/VoiceCommands.tsx"
click node_voicebutton "https://github.com/elsesystems/else_finance/blob/main/src/components/voice/VoiceButton.tsx"
click node_voicehook "https://github.com/elsesystems/else_finance/blob/main/src/hooks/useVoiceCommands.tsx"
click node_admin "https://github.com/elsesystems/else_finance/blob/main/src/pages/Admin.tsx"
click node_subscriptions "https://github.com/elsesystems/else_finance/blob/main/src/components/admin/SubscriptionsManager.tsx"
click node_supabase "https://github.com/elsesystems/else_finance/blob/main/src/integrations/supabase/client.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_authpage,node_auth,node_tenant,node_layout,node_user toneBlue
class node_transactions,node_costcenters,node_chartaccounts,node_settings toneAmber
class node_dashboard,node_dashcomponents,node_voicepage,node_voicebutton,node_voicehook toneMint
class node_admin,node_subscriptions,node_supabase,node_supaauth,node_database toneRose
```

## Components

### Access and navigation

- [App routes](https://github.com/elsesystems/else_finance/blob/main/src/App.tsx): `src/App.tsx`
- [Sign in](https://github.com/elsesystems/else_finance/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Authentication](https://github.com/elsesystems/else_finance/blob/main/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Tenant access](https://github.com/elsesystems/else_finance/blob/main/src/hooks/useTenantAccess.tsx): `src/hooks/useTenantAccess.tsx`
- [App layout](https://github.com/elsesystems/else_finance/blob/main/src/components/layout/Layout.tsx): `src/components/layout/Layout.tsx`

### Financial operations

- [Transactions](https://github.com/elsesystems/else_finance/blob/main/src/pages/Transactions.tsx): `src/pages/Transactions.tsx`
- [Cost centers](https://github.com/elsesystems/else_finance/blob/main/src/pages/CostCenters.tsx): `src/pages/CostCenters.tsx`
- [Chart of accounts](https://github.com/elsesystems/else_finance/blob/main/src/pages/ChartAccounts.tsx): `src/pages/ChartAccounts.tsx`
- [Settings](https://github.com/elsesystems/else_finance/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`

### Insights and voice

- [Dashboard](https://github.com/elsesystems/else_finance/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Dashboard views](https://github.com/elsesystems/else_finance/tree/main/src/components/dashboard): `src/components/dashboard`
- [Voice commands](https://github.com/elsesystems/else_finance/blob/main/src/pages/VoiceCommands.tsx): `src/pages/VoiceCommands.tsx`
- [Voice control](https://github.com/elsesystems/else_finance/blob/main/src/components/voice/VoiceButton.tsx): `src/components/voice/VoiceButton.tsx`
- [Voice command hook](https://github.com/elsesystems/else_finance/blob/main/src/hooks/useVoiceCommands.tsx): `src/hooks/useVoiceCommands.tsx`

### Administration and platform

- [Admin panel](https://github.com/elsesystems/else_finance/blob/main/src/pages/Admin.tsx): `src/pages/Admin.tsx`
- [Subscription manager](https://github.com/elsesystems/else_finance/blob/main/src/components/admin/SubscriptionsManager.tsx): `src/components/admin/SubscriptionsManager.tsx`
- [Supabase client](https://github.com/elsesystems/else_finance/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase Auth**
- **PostgreSQL**

### Other components

- **User**

## Connections

- User → App routes: uses (evidence: `README.md`)
- App routes → Sign in: routes to (evidence: `src/App.tsx`)
- App routes → Dashboard: routes to (evidence: `src/App.tsx`)
- App routes → Transactions: routes to (evidence: `src/App.tsx`)
- App routes → Cost centers: routes to (evidence: `src/App.tsx`)
- App routes → Chart of accounts: routes to (evidence: `src/App.tsx`)
- App routes → Voice commands: routes to (evidence: `src/App.tsx`)
- App routes → Settings: routes to (evidence: `src/App.tsx`)
- App routes → Admin panel: routes to (evidence: `src/App.tsx`)
- App routes → Authentication: provides context (evidence: `src/App.tsx`)
- App routes → Tenant access: checks access (evidence: `src/App.tsx`)
- Sign in → Authentication: signs in or up (evidence: `src/pages/Auth.tsx`)
- Authentication → Supabase client: uses client (evidence: `src/hooks/useAuth.tsx`)
- Authentication → Supabase Auth: authenticates (evidence: `README.md`)
- Authentication → PostgreSQL: loads profile (evidence: `src/hooks/useAuth.tsx`)
- Tenant access → Supabase client: queries access (evidence: `src/hooks/useTenantAccess.tsx`)
- Dashboard → App layout: renders within (evidence: `src/pages/Dashboard.tsx`)
- Dashboard → Dashboard views: uses views (evidence: `src/pages/Dashboard.tsx`)
- Dashboard → Supabase client: loads summaries (evidence: `src/pages/Dashboard.tsx`)
- Transactions → App layout: renders within (evidence: `src/pages/Transactions.tsx`)
- Transactions → Supabase client: reads and writes (evidence: `src/pages/Transactions.tsx`)
- Cost centers → Supabase client: manages centers (evidence: `src/pages/CostCenters.tsx`)
- Chart of accounts → Supabase client: manages accounts (evidence: `src/pages/ChartAccounts.tsx`)
- Settings → Supabase client: loads and updates (evidence: `src/pages/Settings.tsx`)
- App layout → Voice control: renders (evidence: `src/components/layout/Layout.tsx`)
- Voice control → Voice command hook: uses commands (evidence: `src/components/voice/VoiceButton.tsx`)
- Voice control → Supabase client: records transactions (evidence: `src/components/voice/VoiceButton.tsx`)
- Admin panel → Subscription manager: manages subscriptions
- Subscription manager → Supabase client: updates subscriptions (evidence: `src/components/admin/SubscriptionsManager.tsx`)
- Supabase client → Supabase Auth: connects to (evidence: `README.md`)
- Supabase client → PostgreSQL: queries data (evidence: `README.md`)
