# sarath501/sarathsaviyntguide architecture

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

- Interactive diagram: https://gitdiagram.com/sarath501/sarathsaviyntguide
- Repository: https://github.com/sarath501/sarathsaviyntguide

## Overview

Sarath IGA Learning Portal is an authenticated learning and practice application for Identity Governance and Saviynt skills. Learners enter through sign-in, then use a shared portal shell to reach lessons, quizzes, labs, connector guides, and IAM-focused exercises; administrators have a separate management area. Supabase supplies authentication and application data, while server functions support administration and AI features. The route tree and sampled files establish the main structure, but several feature routes were not inspected, so their internal interactions are not expanded here.

Main entry points: [`src/components/AppShell.tsx`](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/components/AppShell.tsx) (Portal shell), [`src/integrations/supabase/client.ts`](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/routes/_authenticated/admin.tsx`](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/admin.tsx) (Administration), [`src/routes/_authenticated/route.tsx`](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/route.tsx) (Authenticated route guard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and navigation"]
  node_landing["Portal landing<br/>[index.tsx]"]
  node_signin["Sign-in and signup<br/>[auth.tsx]"]
  node_guard["Authenticated route guard<br/>[route.tsx]"]
  node_shell["Portal shell<br/>[AppShell.tsx]"]
end

subgraph group_learn["Learning and practice"]
  node_lessons["Lessons and quizzes"]
  node_labs["Labs and SQL practice<br/>[labs.tsx]"]
  node_api["API practice<br/>[api-practice.tsx]"]
  node_curriculum["Curriculum data<br/>[curriculum.ts]"]
end

subgraph group_domain["IGA resources"]
  node_connectors["Connector guides and studio"]
  node_iga["IGA workflows and rules"]
  node_career["Certification and interview prep"]
  node_connectorlib["Connector data<br/>[connectors.ts]"]
end

subgraph group_services["Data and services"]
  node_admin["Administration<br/>[admin.tsx]"]
  node_adminops["Admin operations<br/>[admin.functions.ts]"]
  node_analytics["Analytics functions"]
  node_ai["AI assistance functions<br/>[ai.functions.ts]"]
  node_authhook["User and role state<br/>[use-auth.ts]"]
  node_supabaseclient["Supabase client<br/>[client.ts]"]
  node_previewstorage["Preview auth storage"]
end

node_visitor(("Learner or admin"))
node_supabase[("Supabase backend")]

node_visitor -->|"opens"| node_landing
node_visitor -->|"signs in"| node_signin
node_signin -->|"authenticates through"| node_supabaseclient
node_guard -->|"checks user"| node_supabaseclient
node_guard -->|"renders"| node_shell
node_shell -->|"loads profile and role"| node_authhook
node_shell -->|"loads learning data"| node_curriculum
node_shell -->|"loads connector data"| node_connectorlib
node_shell -->|"navigates to"| node_lessons
node_shell -->|"navigates to"| node_labs
node_shell -->|"navigates to"| node_api
node_shell -->|"navigates to"| node_connectors
node_shell -->|"navigates to"| node_iga
node_shell -->|"navigates to"| node_career
node_shell -->|"navigates to"| node_admin
node_admin -->|"invokes"| node_adminops
node_admin -->|"renders analytics"| node_analytics
node_admin -->|"invokes"| node_ai
node_authhook -->|"reads auth and profile"| node_supabaseclient
node_supabaseclient -->|"configures"| node_previewstorage
node_supabaseclient -->|"connects to"| node_supabase
node_adminops -->|"uses backend"| node_supabase
node_ai -->|"uses backend"| node_supabase

click node_landing "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/index.tsx"
click node_signin "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/auth.tsx"
click node_guard "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/route.tsx"
click node_shell "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/components/AppShell.tsx"
click node_lessons "https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated"
click node_labs "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/labs.tsx"
click node_api "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/api-practice.tsx"
click node_connectors "https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated"
click node_iga "https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated"
click node_career "https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated"
click node_admin "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/admin.tsx"
click node_adminops "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/admin.functions.ts"
click node_analytics "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/analytics.functions.ts"
click node_ai "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/ai.functions.ts"
click node_curriculum "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/curriculum.ts"
click node_connectorlib "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/connectors.ts"
click node_authhook "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/hooks/use-auth.ts"
click node_supabaseclient "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/integrations/supabase/client.ts"
click node_previewstorage "https://github.com/sarath501/sarathsaviyntguide/blob/main/src/integrations/supabase/previewAuthStorage.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_landing,node_signin,node_guard,node_shell toneBlue
class node_lessons,node_labs,node_api,node_curriculum,node_supabase toneAmber
class node_connectors,node_iga,node_career,node_connectorlib toneMint
class node_admin,node_adminops,node_analytics,node_ai,node_authhook,node_supabaseclient,node_previewstorage toneRose
class node_visitor toneIndigo
```

## Components

### Access and navigation

- [Portal landing](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Sign-in and signup](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Authenticated route guard](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`
- [Portal shell](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/components/AppShell.tsx): `src/components/AppShell.tsx`

### Learning and practice

- [Lessons and quizzes](https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated): `src/routes/_authenticated`
- [Labs and SQL practice](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/labs.tsx): `src/routes/_authenticated/labs.tsx`
- [API practice](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/api-practice.tsx): `src/routes/_authenticated/api-practice.tsx`
- [Curriculum data](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/curriculum.ts): `src/lib/curriculum.ts`

### IGA resources

- [Connector guides and studio](https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated): `src/routes/_authenticated`
- [IGA workflows and rules](https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated): `src/routes/_authenticated`
- [Certification and interview prep](https://github.com/sarath501/sarathsaviyntguide/tree/main/src/routes/_authenticated): `src/routes/_authenticated`
- [Connector data](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/connectors.ts): `src/lib/connectors.ts`

### Data and services

- [Administration](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/routes/_authenticated/admin.tsx): `src/routes/_authenticated/admin.tsx`
- [Admin operations](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/admin.functions.ts): `src/lib/admin.functions.ts`
- [Analytics functions](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/analytics.functions.ts): `src/lib/analytics.functions.ts`
- [AI assistance functions](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/lib/ai.functions.ts): `src/lib/ai.functions.ts`
- [User and role state](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/hooks/use-auth.ts): `src/hooks/use-auth.ts`
- [Supabase client](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Preview auth storage](https://github.com/sarath501/sarathsaviyntguide/blob/main/src/integrations/supabase/previewAuthStorage.ts): `src/integrations/supabase/previewAuthStorage.ts`

### Other components

- **Learner or admin**
- **Supabase backend**

## Connections

- Learner or admin → Portal landing: opens (evidence: `src/routes/index.tsx`)
- Learner or admin → Sign-in and signup: signs in
- Sign-in and signup → Supabase client: authenticates through (evidence: `src/routes/auth.tsx`)
- Authenticated route guard → Supabase client: checks user (evidence: `src/routes/_authenticated/route.tsx`)
- Authenticated route guard → Portal shell: renders (evidence: `src/routes/_authenticated/route.tsx`)
- Portal shell → User and role state: loads profile and role (evidence: `src/components/AppShell.tsx`)
- Portal shell → Curriculum data: loads learning data (evidence: `src/components/AppShell.tsx`)
- Portal shell → Connector data: loads connector data (evidence: `src/components/AppShell.tsx`)
- Portal shell → Lessons and quizzes: navigates to (evidence: `src/components/AppShell.tsx`)
- Portal shell → Labs and SQL practice: navigates to (evidence: `src/components/AppShell.tsx`)
- Portal shell → API practice: navigates to (evidence: `src/components/AppShell.tsx`)
- Portal shell → Connector guides and studio: navigates to (evidence: `src/components/AppShell.tsx`)
- Portal shell → IGA workflows and rules: navigates to (evidence: `src/components/AppShell.tsx`)
- Portal shell → Certification and interview prep: navigates to (evidence: `src/components/AppShell.tsx`)
- Portal shell → Administration: navigates to (evidence: `src/components/AppShell.tsx`)
- Administration → Admin operations: invokes (evidence: `src/routes/_authenticated/admin.tsx`)
- Administration → Analytics functions: renders analytics (evidence: `src/routes/_authenticated/admin.tsx`)
- Administration → AI assistance functions: invokes (evidence: `src/routes/_authenticated/admin.tsx`)
- User and role state → Supabase client: reads auth and profile (evidence: `src/hooks/use-auth.ts`)
- Supabase client → Preview auth storage: configures (evidence: `src/integrations/supabase/client.ts`)
- Supabase client → Supabase backend: connects to (evidence: `src/integrations/supabase/client.ts`)
- Admin operations → Supabase backend: uses backend (evidence: `src/lib/admin.functions.ts`)
- AI assistance functions → Supabase backend: uses backend (evidence: `src/lib/ai.functions.ts`)
