# remnawave/frontend architecture

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

- Interactive diagram: https://gitdiagram.com/remnawave/frontend
- Repository: https://github.com/remnawave/frontend

## Overview

Remnawave Frontend is an administrative web panel. The principal workflow is a user entering through authentication, navigating the dashboard, and viewing or managing panel resources through page connectors and API query hooks. Its distinct areas include infrastructure, users, configuration, analytics, and inspection tools. The graph also shows shared application setup, API transport/query infrastructure, and the local SSH-key vault. Several dashboard capabilities are represented by their exact paths, but their internal wiring was not sampled, so those links are omitted.

Main entry points: [`src/app/router/router.tsx`](https://github.com/remnawave/frontend/blob/main/src/app/router/router.tsx) (Route table), [`src/entities/ssh-vault/use-ssh-vault-store.ts`](https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/use-ssh-vault-store.ts) (SSH vault store), [`src/app.tsx`](https://github.com/remnawave/frontend/blob/main/src/app.tsx) (Application shell), [`src/shared/api/tsq-helpers/create-get-infinite-query.hook.ts`](https://github.com/remnawave/frontend/blob/main/src/shared/api/tsq-helpers/create-get-infinite-query.hook.ts) (Query helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["App runtime"]
  node_app["Application shell<br/>[app.tsx]"]
  node_router["Route table<br/>[router.tsx]"]
  node_layout["Dashboard navigation"]
end

subgraph group_access["Authentication"]
  node_login["Login page<br/>[login.page.tsx]"]
  node_oauth["OAuth callback"]
end

subgraph group_panel["Dashboard"]
  node_users["User management<br/>[home.page.tsx]"]
  node_nodes["Node management"]
  node_config["Config profiles"]
  node_inspect["Inspection tools"]
  node_sessionwidget["Session scan widget"]
  node_scanlogic["Scan coordination"]
  node_othercap["Other panel areas"]
end

subgraph group_data["API and state"]
  node_hooks["Resource query hooks"]
  node_stats["Bandwidth queries"]
  node_queryhelpers["Query helpers"]
  node_transport["HTTP client<br/>[axios.ts]"]
  node_queryclient["Query cache<br/>[query-client.ts]"]
  node_vault["SSH vault store"]
  node_vaultdb[("Encrypted vault database<br/>[ssh-vault.db.ts]")]
  node_crypto["SSH cryptography<br/>[ssh-crypto.ts]"]
  node_backup["Vault backup files"]
end

node_operator(("Panel user"))
node_backend{{"Panel backend"}}

node_operator -.->|"uses"| node_app
node_app -->|"renders"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_oauth
node_router -->|"uses"| node_layout
node_router -->|"routes to"| node_nodes
node_router -->|"routes to"| node_inspect
node_app -->|"provides"| node_queryclient
node_hooks -->|"uses"| node_queryhelpers
node_stats -->|"uses"| node_queryhelpers
node_queryhelpers -->|"requests via"| node_transport
node_transport -.->|"sends requests"| node_backend
node_inspect -.->|"displays"| node_sessionwidget
node_sessionwidget -->|"uses"| node_scanlogic
node_vault -->|"uses"| node_vaultdb
node_vault -->|"uses"| node_crypto
node_vault -->|"uses"| node_backup
node_vaultdb -->|"uses"| node_crypto
node_backup -->|"uses"| node_crypto

click node_app "https://github.com/remnawave/frontend/blob/main/src/app.tsx"
click node_router "https://github.com/remnawave/frontend/blob/main/src/app/router/router.tsx"
click node_layout "https://github.com/remnawave/frontend/blob/main/src/app/layouts/dashboard/main-layout/menu-sections/desktop-menu-sections.ts"
click node_login "https://github.com/remnawave/frontend/blob/main/src/pages/auth/login/login.page.tsx"
click node_oauth "https://github.com/remnawave/frontend/blob/main/src/pages/auth/oauth2-callback/oauth2-callback.page.tsx"
click node_users "https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/home/components/home.page.tsx"
click node_nodes "https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/nodes/ui/components/nodes.page.component.tsx"
click node_config "https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/config-profiles/components/config-profiles.page.component.tsx"
click node_inspect "https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/sessions-explorer/ui/components/sessions-explorer.page.component.tsx"
click node_sessionwidget "https://github.com/remnawave/frontend/blob/main/src/widgets/dashboard/sessions-explorer/sessions-explorer-widget/sessions-explorer.widget.tsx"
click node_scanlogic "https://github.com/remnawave/frontend/blob/main/src/widgets/dashboard/sessions-explorer/sessions-explorer-widget/use-sessions-explorer.ts"
click node_othercap "https://github.com/remnawave/frontend/tree/main/src/pages/dashboard"
click node_hooks "https://github.com/remnawave/frontend/blob/main/src/shared/api/hooks/users/users.query.hooks.ts"
click node_stats "https://github.com/remnawave/frontend/blob/main/src/shared/api/hooks/bandwidth-stats/bandwidth-stats.query.hooks.ts"
click node_queryhelpers "https://github.com/remnawave/frontend/blob/main/src/shared/api/tsq-helpers/create-get-infinite-query.hook.ts"
click node_transport "https://github.com/remnawave/frontend/blob/main/src/shared/api/axios.ts"
click node_queryclient "https://github.com/remnawave/frontend/blob/main/src/shared/api/query-client.ts"
click node_vault "https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/use-ssh-vault-store.ts"
click node_vaultdb "https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/ssh-vault.db.ts"
click node_crypto "https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/ssh-crypto.ts"
click node_backup "https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/vault-backup-file.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_router,node_layout,node_operator toneBlue
class node_login,node_oauth toneAmber
class node_users,node_nodes,node_config,node_inspect,node_sessionwidget,node_scanlogic,node_othercap toneMint
class node_hooks,node_stats,node_queryhelpers,node_transport,node_queryclient,node_vault,node_vaultdb,node_crypto,node_backup toneRose
class node_backend toneIndigo
```

## Components

### App runtime

- [Application shell](https://github.com/remnawave/frontend/blob/main/src/app.tsx): `src/app.tsx`
- [Route table](https://github.com/remnawave/frontend/blob/main/src/app/router/router.tsx): `src/app/router/router.tsx`
- [Dashboard navigation](https://github.com/remnawave/frontend/blob/main/src/app/layouts/dashboard/main-layout/menu-sections/desktop-menu-sections.ts): `src/app/layouts/dashboard/main-layout/menu-sections/desktop-menu-sections.ts`

### Authentication

- [Login page](https://github.com/remnawave/frontend/blob/main/src/pages/auth/login/login.page.tsx): `src/pages/auth/login/login.page.tsx`
- [OAuth callback](https://github.com/remnawave/frontend/blob/main/src/pages/auth/oauth2-callback/oauth2-callback.page.tsx): `src/pages/auth/oauth2-callback/oauth2-callback.page.tsx`

### Dashboard

- [User management](https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/home/components/home.page.tsx): `src/pages/dashboard/home/components/home.page.tsx`
- [Node management](https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/nodes/ui/components/nodes.page.component.tsx): `src/pages/dashboard/nodes/ui/components/nodes.page.component.tsx`
- [Config profiles](https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/config-profiles/components/config-profiles.page.component.tsx): `src/pages/dashboard/config-profiles/components/config-profiles.page.component.tsx`
- [Inspection tools](https://github.com/remnawave/frontend/blob/main/src/pages/dashboard/sessions-explorer/ui/components/sessions-explorer.page.component.tsx): `src/pages/dashboard/sessions-explorer/ui/components/sessions-explorer.page.component.tsx`
- [Session scan widget](https://github.com/remnawave/frontend/blob/main/src/widgets/dashboard/sessions-explorer/sessions-explorer-widget/sessions-explorer.widget.tsx): `src/widgets/dashboard/sessions-explorer/sessions-explorer-widget/sessions-explorer.widget.tsx`
- [Scan coordination](https://github.com/remnawave/frontend/blob/main/src/widgets/dashboard/sessions-explorer/sessions-explorer-widget/use-sessions-explorer.ts): `src/widgets/dashboard/sessions-explorer/sessions-explorer-widget/use-sessions-explorer.ts`
- [Other panel areas](https://github.com/remnawave/frontend/tree/main/src/pages/dashboard): `src/pages/dashboard`

### API and state

- [Resource query hooks](https://github.com/remnawave/frontend/blob/main/src/shared/api/hooks/users/users.query.hooks.ts): `src/shared/api/hooks/users/users.query.hooks.ts`
- [Bandwidth queries](https://github.com/remnawave/frontend/blob/main/src/shared/api/hooks/bandwidth-stats/bandwidth-stats.query.hooks.ts): `src/shared/api/hooks/bandwidth-stats/bandwidth-stats.query.hooks.ts`
- [Query helpers](https://github.com/remnawave/frontend/blob/main/src/shared/api/tsq-helpers/create-get-infinite-query.hook.ts): `src/shared/api/tsq-helpers/create-get-infinite-query.hook.ts`
- [HTTP client](https://github.com/remnawave/frontend/blob/main/src/shared/api/axios.ts): `src/shared/api/axios.ts`
- [Query cache](https://github.com/remnawave/frontend/blob/main/src/shared/api/query-client.ts): `src/shared/api/query-client.ts`
- [SSH vault store](https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/use-ssh-vault-store.ts): `src/entities/ssh-vault/use-ssh-vault-store.ts`
- [Encrypted vault database](https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/ssh-vault.db.ts): `src/entities/ssh-vault/ssh-vault.db.ts`
- [SSH cryptography](https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/ssh-crypto.ts): `src/entities/ssh-vault/ssh-crypto.ts`
- [Vault backup files](https://github.com/remnawave/frontend/blob/main/src/entities/ssh-vault/vault-backup-file.ts): `src/entities/ssh-vault/vault-backup-file.ts`

### Other components

- **Panel user**
- **Panel backend**

## Connections

- Panel user → Application shell: uses
- Application shell → Route table: renders (evidence: `src/app.tsx`)
- Route table → Login page: routes to (evidence: `src/app/router/router.tsx`)
- Route table → OAuth callback: routes to (evidence: `src/app/router/router.tsx`)
- Route table → Dashboard navigation: uses (evidence: `src/app/router/router.tsx`)
- Route table → Node management: routes to (evidence: `src/app/router/router.tsx`)
- Route table → Inspection tools: routes to (evidence: `src/app/router/router.tsx`)
- Application shell → Query cache: provides (evidence: `src/app.tsx`)
- Resource query hooks → Query helpers: uses (evidence: `src/shared/api/hooks/users/users.query.hooks.ts`)
- Bandwidth queries → Query helpers: uses (evidence: `src/shared/api/hooks/bandwidth-stats/bandwidth-stats.query.hooks.ts`)
- Query helpers → HTTP client: requests via (evidence: `src/shared/api/tsq-helpers/create-get-infinite-query.hook.ts`)
- HTTP client → Panel backend: sends requests
- Inspection tools → Session scan widget: displays
- Session scan widget → Scan coordination: uses (evidence: `src/widgets/dashboard/sessions-explorer/sessions-explorer-widget/sessions-explorer.widget.tsx`)
- SSH vault store → Encrypted vault database: uses (evidence: `src/entities/ssh-vault/use-ssh-vault-store.ts`)
- SSH vault store → SSH cryptography: uses (evidence: `src/entities/ssh-vault/use-ssh-vault-store.ts`)
- SSH vault store → Vault backup files: uses (evidence: `src/entities/ssh-vault/use-ssh-vault-store.ts`)
- Encrypted vault database → SSH cryptography: uses (evidence: `src/entities/ssh-vault/ssh-vault.db.ts`)
- Vault backup files → SSH cryptography: uses (evidence: `src/entities/ssh-vault/vault-backup-file.ts`)
