# saurabhverma731044-stack/odoo-x-flux architecture

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

- Interactive diagram: https://gitdiagram.com/saurabhverma731044-stack/odoo-x-flux
- Repository: https://github.com/saurabhverma731044-stack/odoo-x-flux

## Overview

SubSync has two distinct runtime surfaces in this tree: a standalone browser prototype backed by in-memory sample data, and a Next.js dashboard using Supabase. Users view subscription and payment information through dashboard pages; the prototype additionally exposes role-aware navigation and broader billing, plan, discount, and staff views. The excerpts support the shown page-to-client interactions, but do not establish every query or the full prototype routing. Future enhancements and integrations described in the README are not treated as implemented.

Main entry points: [`subsync/lib/supabase.ts`](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/lib/supabase.ts) (Supabase Client), [`js/app.js`](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/js/app.js) (Role-aware App), [`subsync/app/page.tsx`](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/page.tsx) (Activity Overview), [`subsync/app/customers/page.tsx`](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/customers/page.tsx) (Customer Activity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prototype["Browser Prototype"]
  node_browserapp["Role-aware App<br/>[app.js]"]
  node_mockdata[("Sample Records<br/>[data.js]")]
end

subgraph group_webapp["Next.js Dashboard"]
  node_overview["Activity Overview<br/>[page.tsx]"]
  node_customerpage["Customer Activity<br/>[page.tsx]"]
  node_subscriptionpage["Subscriptions<br/>[page.tsx]"]
  node_paymentpage["Payments<br/>[page.tsx]"]
end

subgraph group_dataaccess["Data Access"]
  node_supabaseclient["Supabase Client<br/>[supabase.ts]"]
end

subgraph group_external["External Services"]
  node_supabase[("Supabase Database")]
end

node_operator(("Business User"))
node_webuser(("Dashboard User"))

node_operator -->|"uses"| node_browserapp
node_browserapp -->|"reads records"| node_mockdata
node_webuser -->|"views dashboard"| node_overview
node_webuser -->|"views customers"| node_customerpage
node_webuser -->|"manages subscriptions"| node_subscriptionpage
node_webuser -->|"manages payments"| node_paymentpage
node_overview -->|"queries data"| node_supabaseclient
node_customerpage -->|"queries activity"| node_supabaseclient
node_subscriptionpage -->|"reads and saves"| node_supabaseclient
node_paymentpage -->|"loads and inserts"| node_supabaseclient
node_supabaseclient -->|"connects to"| node_supabase

click node_browserapp "https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/js/app.js"
click node_mockdata "https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/js/data.js"
click node_overview "https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/page.tsx"
click node_customerpage "https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/customers/page.tsx"
click node_subscriptionpage "https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/subscriptions/page.tsx"
click node_paymentpage "https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/payments/page.tsx"
click node_supabaseclient "https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/lib/supabase.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_browserapp,node_mockdata,node_operator,node_webuser toneBlue
class node_overview,node_customerpage,node_subscriptionpage,node_paymentpage toneAmber
class node_supabaseclient toneMint
class node_supabase toneRose
```

## Components

### Browser Prototype

- [Role-aware App](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/js/app.js): `js/app.js`
- [Sample Records](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/js/data.js): `js/data.js`

### Next.js Dashboard

- [Activity Overview](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/page.tsx): `subsync/app/page.tsx`
- [Customer Activity](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/customers/page.tsx): `subsync/app/customers/page.tsx`
- [Subscriptions](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/subscriptions/page.tsx): `subsync/app/subscriptions/page.tsx`
- [Payments](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/app/payments/page.tsx): `subsync/app/payments/page.tsx`

### Data Access

- [Supabase Client](https://github.com/saurabhverma731044-stack/odoo-x-flux/blob/main/subsync/lib/supabase.ts): `subsync/lib/supabase.ts`

### External Services

- **Supabase Database**

### Other components

- **Business User**
- **Dashboard User**

## Connections

- Business User → Role-aware App: uses (evidence: `js/app.js`)
- Role-aware App → Sample Records: reads records (evidence: `js/app.js`)
- Dashboard User → Activity Overview: views dashboard (evidence: `subsync/app/page.tsx`)
- Dashboard User → Customer Activity: views customers (evidence: `README.md`)
- Dashboard User → Subscriptions: manages subscriptions (evidence: `README.md`)
- Dashboard User → Payments: manages payments (evidence: `README.md`)
- Activity Overview → Supabase Client: queries data (evidence: `subsync/app/page.tsx`)
- Customer Activity → Supabase Client: queries activity (evidence: `subsync/app/customers/page.tsx`)
- Subscriptions → Supabase Client: reads and saves (evidence: `subsync/app/subscriptions/page.tsx`)
- Payments → Supabase Client: loads and inserts (evidence: `subsync/app/payments/page.tsx`)
- Supabase Client → Supabase Database: connects to (evidence: `README.md`)
