# sugan-developerinnooryze-stack/leadryze_frontend architecture

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

- Interactive diagram: https://gitdiagram.com/sugan-developerinnooryze-stack/leadryze_frontend
- Repository: https://github.com/sugan-developerinnooryze-stack/leadryze_frontend

## Overview

Leadryze is a multi-tenant CRM frontend with authentication, role-aware navigation, dashboards, operational CRM workspaces, and tenant administration. Users enter through routed pages; authentication state and shared API access support the workspace, while domain pages use query modules to retrieve or update CRM data. The native CRM spans sales and service operations as well as configurable pipelines, templates, and automation. The repository evidence includes no README; links for unsampled page families are limited to routes visible in App.tsx, and the backend is treated as an external API.

Main entry points: [`src/services/api.ts`](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/services/api.ts) (HTTP API client), [`src/App.tsx`](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/App.tsx) (Route application), [`src/pages/native-crm`](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/native-crm) (Native CRM domains), [`src/pages/dashboard/DashboardPage.tsx`](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/dashboard/DashboardPage.tsx) (CRM dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application shell"]
  node_app["Route application<br/>[App.tsx]"]
  node_layout["Workspace layout<br/>[Layout.tsx]"]
  node_sidebar["Navigation sidebar<br/>[Sidebar.tsx]"]
  node_api["HTTP API client<br/>[api.ts]"]
end

subgraph group_identity["Access and administration"]
  node_authpages["Sign-in and registration"]
  node_authstore["Session and permissions<br/>[auth.store.ts]"]
  node_authservice["Authentication service<br/>[auth.service.ts]"]
  node_admin["Tenant administration"]
end

subgraph group_workspace["CRM workspaces"]
  node_crmworkspace["Core CRM workspace<br/>[CrmLayout.tsx]"]
  node_crmpages["Core CRM records"]
  node_customers["Customer management<br/>[CustomersPage.tsx]"]
end

subgraph group_operations["Native CRM operations"]
  node_nativepages["Native CRM domains"]
  node_nativelists["Native CRM tables<br/>[FSTable.tsx]"]
  node_nativedrawers["Record forms and drawers<br/>[FSDrawer.tsx]"]
  node_nativequeries["Native CRM queries"]
  node_pipelineconfig["Pipeline configuration"]
  node_settings["Tenant settings<br/>[SettingsPage.tsx]"]
  node_calendar["Operations calendar<br/>[useCalendarData.ts]"]
end

subgraph group_insights["Insights and integrations"]
  node_dashboard["CRM dashboard<br/>[DashboardPage.tsx]"]
  node_dashboardqueries["Dashboard data queries"]
  node_chat["AI chat<br/>[chat.service.ts]"]
  node_connectors["Connector management"]
end

node_user(("Workspace user"))
node_backend["Leadryze API"]

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_authpages
node_app -->|"renders"| node_layout
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_nativepages
node_layout -->|"renders"| node_sidebar
node_authpages -.->|"authenticates via"| node_authstore
node_authstore -->|"calls"| node_authservice
node_authservice -->|"sends requests"| node_api
node_admin -.->|"uses admin endpoints"| node_authservice
node_dashboard -->|"loads dashboard data"| node_dashboardqueries
node_dashboard -->|"loads CRM data"| node_nativequeries
node_dashboard -->|"requests data"| node_api
node_crmpages -->|"renders"| node_crmworkspace
node_crmworkspace -->|"requests records"| node_api
node_customers -->|"requests customer data"| node_api
node_nativepages -->|"uses domain queries"| node_nativequeries
node_nativepages -->|"renders tables"| node_nativelists
node_nativepages -->|"opens record drawers"| node_nativedrawers
node_nativepages -->|"configures stages"| node_pipelineconfig
node_nativepages -->|"builds calendar data"| node_calendar
node_calendar -->|"loads domain records"| node_nativequeries
node_settings -->|"requests settings"| node_api
node_chat -->|"sends AI requests"| node_api
node_connectors -.->|"manages integrations"| node_backend
node_api -->|"sends HTTP requests"| node_backend

click node_app "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/App.tsx"
click node_layout "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/components/layout/Layout.tsx"
click node_sidebar "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/components/layout/Sidebar.tsx"
click node_authpages "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/auth"
click node_authstore "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/stores/auth.store.ts"
click node_authservice "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/services/auth.service.ts"
click node_admin "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/admin"
click node_dashboard "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/dashboard/DashboardPage.tsx"
click node_dashboardqueries "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/dashboard/queries/dashboard.queries.ts"
click node_crmworkspace "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/crm/shared/CrmLayout.tsx"
click node_crmpages "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/modules/crm"
click node_customers "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/customers/CustomersPage.tsx"
click node_nativepages "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/native-crm"
click node_nativelists "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/native-crm/shared/FSTable.tsx"
click node_nativedrawers "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/native-crm/shared/FSDrawer.tsx"
click node_nativequeries "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/modules/native-crm/queries"
click node_pipelineconfig "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/native-crm/queries/pipeline-config.queries.ts"
click node_settings "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/settings/SettingsPage.tsx"
click node_calendar "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/native-crm/calendar/useCalendarData.ts"
click node_chat "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/services/chat.service.ts"
click node_connectors "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/connectors"
click node_api "https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/services/api.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_layout,node_sidebar,node_api,node_user toneBlue
class node_authpages,node_authstore,node_authservice,node_admin toneAmber
class node_crmworkspace,node_crmpages,node_customers,node_backend toneMint
class node_nativepages,node_nativelists,node_nativedrawers,node_nativequeries,node_pipelineconfig,node_settings,node_calendar toneRose
class node_dashboard,node_dashboardqueries,node_chat,node_connectors toneIndigo
```

## Components

### Application shell

- [Route application](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/App.tsx): `src/App.tsx`
- [Workspace layout](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/components/layout/Layout.tsx): `src/components/layout/Layout.tsx`
- [Navigation sidebar](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`
- [HTTP API client](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/services/api.ts): `src/services/api.ts`

### Access and administration

- [Sign-in and registration](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/auth): `src/pages/auth`
- [Session and permissions](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/stores/auth.store.ts): `src/stores/auth.store.ts`
- [Authentication service](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/services/auth.service.ts): `src/services/auth.service.ts`
- [Tenant administration](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/admin): `src/pages/admin`

### CRM workspaces

- [Core CRM workspace](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/crm/shared/CrmLayout.tsx): `src/modules/crm/shared/CrmLayout.tsx`
- [Core CRM records](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/modules/crm): `src/modules/crm`
- [Customer management](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/customers/CustomersPage.tsx): `src/pages/customers/CustomersPage.tsx`

### Native CRM operations

- [Native CRM domains](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/native-crm): `src/pages/native-crm`
- [Native CRM tables](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/native-crm/shared/FSTable.tsx): `src/modules/native-crm/shared/FSTable.tsx`
- [Record forms and drawers](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/native-crm/shared/FSDrawer.tsx): `src/modules/native-crm/shared/FSDrawer.tsx`
- [Native CRM queries](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/modules/native-crm/queries): `src/modules/native-crm/queries`
- [Pipeline configuration](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/native-crm/queries/pipeline-config.queries.ts): `src/modules/native-crm/queries/pipeline-config.queries.ts`
- [Tenant settings](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/settings/SettingsPage.tsx): `src/pages/settings/SettingsPage.tsx`
- [Operations calendar](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/native-crm/calendar/useCalendarData.ts): `src/pages/native-crm/calendar/useCalendarData.ts`

### Insights and integrations

- [CRM dashboard](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/pages/dashboard/DashboardPage.tsx): `src/pages/dashboard/DashboardPage.tsx`
- [Dashboard data queries](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/modules/dashboard/queries/dashboard.queries.ts): `src/modules/dashboard/queries/dashboard.queries.ts`
- [AI chat](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/blob/main/src/services/chat.service.ts): `src/services/chat.service.ts`
- [Connector management](https://github.com/sugan-developerinnooryze-stack/leadryze_frontend/tree/main/src/pages/connectors): `src/pages/connectors`

### Other components

- **Workspace user**
- **Leadryze API**

## Connections

- Workspace user → Route application: opens
- Route application → Sign-in and registration: routes to (evidence: `src/App.tsx`)
- Route application → Workspace layout: renders (evidence: `src/App.tsx`)
- Route application → Tenant administration: routes to (evidence: `src/App.tsx`)
- Route application → CRM dashboard: routes to (evidence: `src/App.tsx`)
- Route application → Native CRM domains: routes to (evidence: `src/App.tsx`)
- Workspace layout → Navigation sidebar: renders (evidence: `src/components/layout/Layout.tsx`)
- Sign-in and registration → Session and permissions: authenticates via
- Session and permissions → Authentication service: calls (evidence: `src/stores/auth.store.ts`)
- Authentication service → HTTP API client: sends requests (evidence: `src/services/auth.service.ts`)
- Tenant administration → Authentication service: uses admin endpoints
- CRM dashboard → Dashboard data queries: loads dashboard data (evidence: `src/pages/dashboard/DashboardPage.tsx`)
- CRM dashboard → Native CRM queries: loads CRM data (evidence: `src/pages/dashboard/DashboardPage.tsx`)
- CRM dashboard → HTTP API client: requests data (evidence: `src/pages/dashboard/DashboardPage.tsx`)
- Core CRM records → Core CRM workspace: renders (evidence: `src/modules/crm/tasks/pages/TasksPage.tsx`)
- Core CRM workspace → HTTP API client: requests records (evidence: `src/modules/crm/shared/CrmLayout.tsx`)
- Customer management → HTTP API client: requests customer data (evidence: `src/pages/customers/CustomersPage.tsx`)
- Native CRM domains → Native CRM queries: uses domain queries (evidence: `src/pages/native-crm/services/ServicesPage.tsx`)
- Native CRM domains → Native CRM tables: renders tables (evidence: `src/pages/native-crm/services/ServicesPage.tsx`)
- Native CRM domains → Record forms and drawers: opens record drawers (evidence: `src/pages/native-crm/services/ServicesPage.tsx`)
- Native CRM domains → Pipeline configuration: configures stages (evidence: `src/pages/native-crm/settings/PipelineSettingsPage.tsx`)
- Native CRM domains → Operations calendar: builds calendar data (evidence: `src/pages/native-crm/calendar/useCalendarData.ts`)
- Operations calendar → Native CRM queries: loads domain records (evidence: `src/pages/native-crm/calendar/useCalendarData.ts`)
- Tenant settings → HTTP API client: requests settings (evidence: `src/pages/settings/SettingsPage.tsx`)
- AI chat → HTTP API client: sends AI requests (evidence: `src/services/chat.service.ts`)
- Connector management → Leadryze API: manages integrations
- HTTP API client → Leadryze API: sends HTTP requests (evidence: `src/services/api.ts`)
