# dhanvin7777/aryan architecture

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

- Interactive diagram: https://gitdiagram.com/dhanvin7777/aryan
- Repository: https://github.com/dhanvin7777/aryan

## Overview

ARYAN is a subscription-management dashboard with live service diagnostics. A user interacts with the React app to check backend/database health or view and add subscriptions; the frontend API client sends those requests to the Express API, which reads and writes subscriptions through Supabase, with in-memory fallback behavior. The README also documents a PostgreSQL connection-pool option. Source excerpts show the frontend and API implementation; the SQL schema’s role is documented in the README, but its contents were not sampled.

Main entry points: [`backend/src/server.js`](https://github.com/dhanvin7777/aryan/blob/main/backend/src/server.js) (API routes), [`frontend/src/App.jsx`](https://github.com/dhanvin7777/aryan/blob/main/frontend/src/App.jsx) (Dashboard UI), [`frontend/src/api.js`](https://github.com/dhanvin7777/aryan/blob/main/frontend/src/api.js) (API client), [`frontend/src/main.jsx`](https://github.com/dhanvin7777/aryan/blob/main/frontend/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_app["Dashboard UI<br/>[App.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_entry["React entry<br/>[main.jsx]"]
end

subgraph group_backend["Backend API"]
  node_api_routes["API routes<br/>[server.js]"]
  node_health["Health checks<br/>[server.js]"]
  node_fallback[("Memory fallback<br/>[server.js]")]
end

subgraph group_data["Persistence"]
  node_supabase[("Supabase database")]
  node_schema["Database schema"]
  node_pg_pool[("Postgres pooler")]
end

node_user(("Dashboard user"))

node_user -->|"uses"| node_app
node_entry -->|"renders"| node_app
node_app -->|"calls"| node_api_client
node_api_client -->|"requests"| node_api_routes
node_api_routes -->|"runs checks"| node_health
node_api_routes -->|"reads and writes"| node_supabase
node_api_routes -->|"falls back"| node_fallback
node_health -->|"tests connection"| node_supabase
node_health -->|"tests connection"| node_pg_pool
node_schema -->|"initializes"| node_supabase

click node_app "https://github.com/dhanvin7777/aryan/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/dhanvin7777/aryan/blob/main/frontend/src/api.js"
click node_entry "https://github.com/dhanvin7777/aryan/blob/main/frontend/src/main.jsx"
click node_api_routes "https://github.com/dhanvin7777/aryan/blob/main/backend/src/server.js"
click node_health "https://github.com/dhanvin7777/aryan/blob/main/backend/src/server.js"
click node_fallback "https://github.com/dhanvin7777/aryan/blob/main/backend/src/server.js"
click node_schema "https://github.com/dhanvin7777/aryan/blob/main/backend/supabase_schema.sql"

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_api_client,node_entry,node_user toneBlue
class node_api_routes,node_health,node_fallback toneAmber
class node_supabase,node_schema,node_pg_pool toneMint
```

## Components

### Frontend

- [Dashboard UI](https://github.com/dhanvin7777/aryan/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/dhanvin7777/aryan/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [React entry](https://github.com/dhanvin7777/aryan/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`

### Backend API

- [API routes](https://github.com/dhanvin7777/aryan/blob/main/backend/src/server.js): `backend/src/server.js`
- [Health checks](https://github.com/dhanvin7777/aryan/blob/main/backend/src/server.js): `backend/src/server.js`
- [Memory fallback](https://github.com/dhanvin7777/aryan/blob/main/backend/src/server.js): `backend/src/server.js`

### Persistence

- **Supabase database**
- [Database schema](https://github.com/dhanvin7777/aryan/blob/main/backend/supabase_schema.sql): `backend/supabase_schema.sql`
- **Postgres pooler**

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Dashboard UI: uses (evidence: `README.md`)
- React entry → Dashboard UI: renders (evidence: `frontend/src/main.jsx`)
- Dashboard UI → API client: calls (evidence: `frontend/src/App.jsx`)
- API client → API routes: requests (evidence: `frontend/src/api.js`)
- API routes → Health checks: runs checks (evidence: `backend/src/server.js`)
- API routes → Supabase database: reads and writes (evidence: `backend/src/server.js`)
- API routes → Memory fallback: falls back (evidence: `backend/src/server.js`)
- Health checks → Supabase database: tests connection (evidence: `backend/src/server.js`)
- Health checks → Postgres pooler: tests connection (evidence: `backend/src/server.js`)
- Database schema → Supabase database: initializes (evidence: `README.md`)
