# ragav1n/novira architecture

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

- Interactive diagram: https://gitdiagram.com/ragav1n/novira
- Repository: https://github.com/ragav1n/novira

## Overview

Novira is a personal and shared-expense finance app. The main workflow is entering an expense, recording it as a transaction, and syncing it to Supabase; when offline, queued changes retry later. The product also supports shared groups and trips, budgeting and goals, recurring payments, analytics and recaps, imports/exports, and notifications. Some feature implementations were not sampled, so those branches reflect README descriptions and the file tree; edges without direct source evidence are documented or marked unverified.

Main entry points: [`lib/sync-manager.ts`](https://github.com/ragav1n/novira/blob/main/lib/sync-manager.ts) (Sync manager), [`lib/services/transaction-service.ts`](https://github.com/ragav1n/novira/blob/main/lib/services/transaction-service.ts) (Transaction service), [`lib/supabase.ts`](https://github.com/ragav1n/novira/blob/main/lib/supabase.ts) (Supabase data services), [`components/dashboard-view.tsx`](https://github.com/ragav1n/novira/blob/main/components/dashboard-view.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_finance["Expense management"]
  node_add["Add expense"]
  node_txservice["Transaction service"]
  node_dashboard["Dashboard<br/>[dashboard-view.tsx]"]
  node_groups["Groups and splits<br/>[groups-view.tsx]"]
  node_trips["Trip expenses"]
  node_subscriptions["Subscriptions"]
  node_import["Statement import<br/>[import-view.tsx]"]
end

subgraph group_sync["Persistence and sync"]
  node_receipts["Receipt storage<br/>[receipt-storage.ts]"]
  node_offline["Offline queue"]
  node_syncmgr["Sync manager<br/>[sync-manager.ts]"]
  node_preferences["User preferences"]
  node_supabase[("Supabase data services<br/>[supabase.ts]")]
end

subgraph group_insights["Planning and insights"]
  node_analytics["Analytics<br/>[analytics-view.tsx]"]
  node_goals["Goals and buckets<br/>[goals-view.tsx]"]
  node_cashflow["Cash flow"]
  node_recap["Monthly recap<br/>[recap-generator.ts]"]
  node_export["Report export<br/>[export-utils.ts]"]
end

subgraph group_platform["Identity and notifications"]
  node_auth["Authentication<br/>[server.ts]"]
  node_push["Push notifications<br/>[push.ts]"]
  node_cron["Scheduled digests"]
end

node_user(("User"))
node_actor[("Supabase service")]

node_user -->|"enters expense"| node_add
node_add -.->|"submits transaction"| node_txservice
node_txservice -->|"queues mutations"| node_offline
node_txservice -->|"reads transactions"| node_supabase
node_syncmgr -->|"processes queue"| node_offline
node_syncmgr -->|"uploads receipts"| node_receipts
node_preferences -->|"starts sync"| node_syncmgr
node_dashboard -->|"loads transactions"| node_supabase
node_dashboard -->|"reads pending changes"| node_syncmgr
node_user -->|"splits shared costs"| node_groups
node_user -->|"tracks trip spending"| node_trips
node_user -->|"tracks recurring bills"| node_subscriptions
node_user -->|"imports statements"| node_import
node_user -->|"reviews spending"| node_analytics
node_user -->|"sets savings targets"| node_goals
node_user -->|"checks projections"| node_cashflow
node_user -.->|"requests recap"| node_recap
node_user -->|"exports reports"| node_export
node_user -.->|"signs in"| node_auth
node_auth -->|"creates server client"| node_supabase
node_cron -->|"sends digests"| node_push
node_cron -->|"queries user data"| node_actor

click node_add "https://github.com/ragav1n/novira/blob/main/components/add-expense-view.tsx"
click node_txservice "https://github.com/ragav1n/novira/blob/main/lib/services/transaction-service.ts"
click node_dashboard "https://github.com/ragav1n/novira/blob/main/components/dashboard-view.tsx"
click node_groups "https://github.com/ragav1n/novira/blob/main/components/groups-view.tsx"
click node_trips "https://github.com/ragav1n/novira/tree/main/components/trips"
click node_subscriptions "https://github.com/ragav1n/novira/blob/main/components/subscriptions-view.tsx"
click node_import "https://github.com/ragav1n/novira/blob/main/components/import-view.tsx"
click node_receipts "https://github.com/ragav1n/novira/blob/main/lib/receipt-storage.ts"
click node_offline "https://github.com/ragav1n/novira/blob/main/lib/offline-sync-queue.ts"
click node_syncmgr "https://github.com/ragav1n/novira/blob/main/lib/sync-manager.ts"
click node_preferences "https://github.com/ragav1n/novira/blob/main/components/providers/user-preferences-provider.tsx"
click node_supabase "https://github.com/ragav1n/novira/blob/main/lib/supabase.ts"
click node_analytics "https://github.com/ragav1n/novira/blob/main/components/analytics-view.tsx"
click node_goals "https://github.com/ragav1n/novira/blob/main/components/goals-view.tsx"
click node_cashflow "https://github.com/ragav1n/novira/tree/main/app/cashflow"
click node_recap "https://github.com/ragav1n/novira/blob/main/lib/recap-generator.ts"
click node_export "https://github.com/ragav1n/novira/blob/main/utils/export-utils.ts"
click node_auth "https://github.com/ragav1n/novira/blob/main/utils/supabase/server.ts"
click node_push "https://github.com/ragav1n/novira/blob/main/lib/server/push.ts"
click node_cron "https://github.com/ragav1n/novira/tree/main/app/api/cron"

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_add,node_txservice,node_dashboard,node_groups,node_trips,node_subscriptions,node_import,node_user toneBlue
class node_receipts,node_offline,node_syncmgr,node_preferences,node_supabase,node_actor toneAmber
class node_analytics,node_goals,node_cashflow,node_recap,node_export toneMint
class node_auth,node_push,node_cron toneRose
```

## Components

### Expense management

- [Add expense](https://github.com/ragav1n/novira/blob/main/components/add-expense-view.tsx): `components/add-expense-view.tsx`
- [Transaction service](https://github.com/ragav1n/novira/blob/main/lib/services/transaction-service.ts): `lib/services/transaction-service.ts`
- [Dashboard](https://github.com/ragav1n/novira/blob/main/components/dashboard-view.tsx): `components/dashboard-view.tsx`
- [Groups and splits](https://github.com/ragav1n/novira/blob/main/components/groups-view.tsx): `components/groups-view.tsx`
- [Trip expenses](https://github.com/ragav1n/novira/tree/main/components/trips): `components/trips`
- [Subscriptions](https://github.com/ragav1n/novira/blob/main/components/subscriptions-view.tsx): `components/subscriptions-view.tsx`
- [Statement import](https://github.com/ragav1n/novira/blob/main/components/import-view.tsx): `components/import-view.tsx`

### Persistence and sync

- [Receipt storage](https://github.com/ragav1n/novira/blob/main/lib/receipt-storage.ts): `lib/receipt-storage.ts`
- [Offline queue](https://github.com/ragav1n/novira/blob/main/lib/offline-sync-queue.ts): `lib/offline-sync-queue.ts`
- [Sync manager](https://github.com/ragav1n/novira/blob/main/lib/sync-manager.ts): `lib/sync-manager.ts`
- [User preferences](https://github.com/ragav1n/novira/blob/main/components/providers/user-preferences-provider.tsx): `components/providers/user-preferences-provider.tsx`
- [Supabase data services](https://github.com/ragav1n/novira/blob/main/lib/supabase.ts): `lib/supabase.ts`

### Planning and insights

- [Analytics](https://github.com/ragav1n/novira/blob/main/components/analytics-view.tsx): `components/analytics-view.tsx`
- [Goals and buckets](https://github.com/ragav1n/novira/blob/main/components/goals-view.tsx): `components/goals-view.tsx`
- [Cash flow](https://github.com/ragav1n/novira/tree/main/app/cashflow): `app/cashflow`
- [Monthly recap](https://github.com/ragav1n/novira/blob/main/lib/recap-generator.ts): `lib/recap-generator.ts`
- [Report export](https://github.com/ragav1n/novira/blob/main/utils/export-utils.ts): `utils/export-utils.ts`

### Identity and notifications

- [Authentication](https://github.com/ragav1n/novira/blob/main/utils/supabase/server.ts): `utils/supabase/server.ts`
- [Push notifications](https://github.com/ragav1n/novira/blob/main/lib/server/push.ts): `lib/server/push.ts`
- [Scheduled digests](https://github.com/ragav1n/novira/tree/main/app/api/cron): `app/api/cron`

### Other components

- **User**
- **Supabase service**

## Connections

- User → Add expense: enters expense (evidence: `README.md`)
- Add expense → Transaction service: submits transaction
- Transaction service → Offline queue: queues mutations (evidence: `lib/services/transaction-service.ts`)
- Transaction service → Supabase data services: reads transactions (evidence: `lib/services/transaction-service.ts`)
- Sync manager → Offline queue: processes queue (evidence: `lib/sync-manager.ts`)
- Sync manager → Receipt storage: uploads receipts (evidence: `lib/sync-manager.ts`)
- User preferences → Sync manager: starts sync (evidence: `components/providers/user-preferences-provider.tsx`)
- Dashboard → Supabase data services: loads transactions
- Dashboard → Sync manager: reads pending changes
- User → Groups and splits: splits shared costs (evidence: `README.md`)
- User → Trip expenses: tracks trip spending (evidence: `README.md`)
- User → Subscriptions: tracks recurring bills (evidence: `README.md`)
- User → Statement import: imports statements (evidence: `README.md`)
- User → Analytics: reviews spending (evidence: `README.md`)
- User → Goals and buckets: sets savings targets (evidence: `README.md`)
- User → Cash flow: checks projections (evidence: `README.md`)
- User → Monthly recap: requests recap (evidence: `README.md`)
- User → Report export: exports reports (evidence: `README.md`)
- User → Authentication: signs in
- Authentication → Supabase data services: creates server client (evidence: `utils/supabase/server.ts`)
- Scheduled digests → Push notifications: sends digests (evidence: `app/api/cron/daily-digest/route.ts`)
- Scheduled digests → Supabase service: queries user data (evidence: `app/api/cron/daily-digest/route.ts`)
