# abhinavsinghal-18/cosedion-10 architecture

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

- Interactive diagram: https://gitdiagram.com/abhinavsinghal-18/cosedion-10
- Repository: https://github.com/abhinavsinghal-18/cosedion-10

## Overview

Senttinelx is a digital-risk-protection web app for monitoring brand impersonation and suspicious apps. The principal workflow is: a user signs in and configures a brand, enters the authenticated workspace, reviews detected threats and risk scores, investigates a threat, then prepares or tracks a takedown report. The graph also preserves the app-store, threat-graph, and settings branches indicated by the route tree. Several route and subsystem implementations were not excerpted, so uncertain connections are omitted rather than inferred.

Main entry points: [`src/lib/data.ts`](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/data.ts) (Query and state layer), [`src/routes/_authenticated/threats.$id.tsx`](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/threats.%24id.tsx) (Threat investigation), [`src/integrations/supabase/client.ts`](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/routes/_authenticated/route.tsx`](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/route.tsx) (Access gate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and workspace"]
  node_auth["Sign in<br/>[auth.tsx]"]
  node_onboarding["Brand setup<br/>[onboarding.tsx]"]
  node_gate["Access gate<br/>[route.tsx]"]
  node_shell["Workspace shell<br/>[AppShell.tsx]"]
  node_settings["Workspace settings<br/>[settings.tsx]"]
end

subgraph group_monitor["Threat monitoring"]
  node_dashboard["Risk dashboard<br/>[dashboard.tsx]"]
  node_scan["Scan interface<br/>[ScanOverlay.tsx]"]
  node_threats["Threat list<br/>[threats.index.tsx]"]
  node_apps["Suspicious apps<br/>[apps.tsx]"]
  node_graph["Threat graph<br/>[ThreatGraph.tsx]"]
end

subgraph group_investigate["Investigation and response"]
  node_detail["Threat investigation<br/>[threats.$id.tsx]"]
  node_scoring["Risk scoring<br/>[scoring.ts]"]
  node_ai["AI functions<br/>[ai.functions.ts]"]
  node_reports["Takedown reports<br/>[reports.ts]"]
  node_reportviews["Report pages<br/>[reports.index.tsx]"]
end

subgraph group_platform["Data and backend"]
  node_data["Query and state layer<br/>[data.ts]"]
  node_supabase["Supabase client<br/>[client.ts]"]
  node_store[("Supabase data store")]
end

node_user(("Brand operator"))

node_user -->|"signs in"| node_auth
node_user -->|"sets up brand"| node_onboarding
node_auth -->|"authenticates via"| node_supabase
node_onboarding -->|"loads brand data"| node_data
node_gate -->|"checks session"| node_data
node_gate -->|"renders workspace"| node_shell
node_shell -->|"opens scan"| node_scan
node_dashboard -->|"loads risk data"| node_data
node_dashboard -->|"renders graph"| node_graph
node_threats -->|"loads threats"| node_data
node_apps -->|"loads app findings"| node_data
node_detail -->|"loads threat"| node_data
node_detail -->|"uses scoring"| node_scoring
node_detail -->|"uses AI functions"| node_ai
node_detail -->|"creates reports"| node_reports
node_reportviews -->|"uses report logic"| node_reports
node_scan -->|"uses data layer"| node_data
node_data -->|"queries through"| node_supabase
node_supabase -.->|"reads and writes"| node_store
node_settings -.->|"uses data layer"| node_data

click node_auth "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/auth.tsx"
click node_onboarding "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/onboarding.tsx"
click node_gate "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/route.tsx"
click node_shell "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/components/sx/AppShell.tsx"
click node_dashboard "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/dashboard.tsx"
click node_scan "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/components/sx/ScanOverlay.tsx"
click node_threats "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/threats.index.tsx"
click node_apps "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/apps.tsx"
click node_graph "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/components/sx/ThreatGraph.tsx"
click node_detail "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/threats.%24id.tsx"
click node_scoring "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/scoring.ts"
click node_ai "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/ai.functions.ts"
click node_reports "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/reports.ts"
click node_reportviews "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/reports.index.tsx"
click node_settings "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/settings.tsx"
click node_data "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/data.ts"
click node_supabase "https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/integrations/supabase/client.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_auth,node_onboarding,node_gate,node_shell,node_settings toneBlue
class node_dashboard,node_scan,node_threats,node_apps,node_graph toneAmber
class node_detail,node_scoring,node_ai,node_reports,node_reportviews toneMint
class node_data,node_supabase,node_store toneRose
class node_user toneIndigo
```

## Components

### Entry and workspace

- [Sign in](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Brand setup](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/onboarding.tsx): `src/routes/onboarding.tsx`
- [Access gate](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`
- [Workspace shell](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/components/sx/AppShell.tsx): `src/components/sx/AppShell.tsx`
- [Workspace settings](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/settings.tsx): `src/routes/_authenticated/settings.tsx`

### Threat monitoring

- [Risk dashboard](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/dashboard.tsx): `src/routes/_authenticated/dashboard.tsx`
- [Scan interface](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/components/sx/ScanOverlay.tsx): `src/components/sx/ScanOverlay.tsx`
- [Threat list](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/threats.index.tsx): `src/routes/_authenticated/threats.index.tsx`
- [Suspicious apps](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/apps.tsx): `src/routes/_authenticated/apps.tsx`
- [Threat graph](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/components/sx/ThreatGraph.tsx): `src/components/sx/ThreatGraph.tsx`

### Investigation and response

- [Threat investigation](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/threats.%24id.tsx): `src/routes/_authenticated/threats.$id.tsx`
- [Risk scoring](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/scoring.ts): `src/lib/scoring.ts`
- [AI functions](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/ai.functions.ts): `src/lib/ai.functions.ts`
- [Takedown reports](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/reports.ts): `src/lib/reports.ts`
- [Report pages](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/routes/_authenticated/reports.index.tsx): `src/routes/_authenticated/reports.index.tsx`

### Data and backend

- [Query and state layer](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/lib/data.ts): `src/lib/data.ts`
- [Supabase client](https://github.com/abhinavsinghal-18/cosedion-10/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase data store**

### Other components

- **Brand operator**

## Connections

- Brand operator → Sign in: signs in (evidence: `src/routes/auth.tsx`)
- Brand operator → Brand setup: sets up brand (evidence: `src/routes/onboarding.tsx`)
- Sign in → Supabase client: authenticates via (evidence: `src/routes/auth.tsx`)
- Brand setup → Query and state layer: loads brand data (evidence: `src/routes/onboarding.tsx`)
- Access gate → Query and state layer: checks session (evidence: `src/routes/_authenticated/route.tsx`)
- Access gate → Workspace shell: renders workspace (evidence: `src/routes/_authenticated/route.tsx`)
- Workspace shell → Scan interface: opens scan (evidence: `src/components/sx/AppShell.tsx`)
- Risk dashboard → Query and state layer: loads risk data (evidence: `src/routes/_authenticated/dashboard.tsx`)
- Risk dashboard → Threat graph: renders graph (evidence: `src/routes/_authenticated/dashboard.tsx`)
- Threat list → Query and state layer: loads threats (evidence: `src/routes/_authenticated/threats.index.tsx`)
- Suspicious apps → Query and state layer: loads app findings (evidence: `src/routes/_authenticated/apps.tsx`)
- Threat investigation → Query and state layer: loads threat (evidence: `src/routes/_authenticated/threats.$id.tsx`)
- Threat investigation → Risk scoring: uses scoring (evidence: `src/routes/_authenticated/threats.$id.tsx`)
- Threat investigation → AI functions: uses AI functions (evidence: `src/routes/_authenticated/threats.$id.tsx`)
- Threat investigation → Takedown reports: creates reports (evidence: `src/routes/_authenticated/threats.$id.tsx`)
- Report pages → Takedown reports: uses report logic (evidence: `src/lib/reports.ts`)
- Scan interface → Query and state layer: uses data layer (evidence: `src/components/sx/ScanOverlay.tsx`)
- Query and state layer → Supabase client: queries through (evidence: `src/lib/data.ts`)
- Supabase client → Supabase data store: reads and writes
- Workspace settings → Query and state layer: uses data layer
