# kunalborse243-glitch/sentinel-aws architecture

> Architecture diagram of the GitHub repository kunalborse243-glitch/sentinel-aws, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kunalborse243-glitch/sentinel-aws
- Repository: https://github.com/kunalborse243-glitch/sentinel-aws

## Overview

Sentinel AWS lets users register, connect AWS accounts, launch scans, and review findings, history, metrics, and reports. The React app provides authenticated workflows; its API serves account, scan, and reporting operations, while the scan engine runs service-specific checks and persists results. The README documents capabilities whose route and page implementations are not sampled, so those are represented by their tree paths; only the scan engine’s scanner and database wiring is confirmed in source.

Main entry points: [`artifacts/sentinel/src/App.tsx`](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/App.tsx) (React app), [`artifacts/api-server/src/app.ts`](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/app.ts) (HTTP application), [`lib/db/src/index.ts`](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/lib/db/src/index.ts) (PostgreSQL), [`artifacts/api-server/src/lib/scan-engine.ts`](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/lib/scan-engine.ts) (Scan engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_webapp["React app<br/>[App.tsx]"]
  node_authstate["Auth state<br/>[auth.tsx]"]
  node_accountsui["AWS accounts<br/>[accounts.tsx]"]
  node_scanui["Scan controls<br/>[scan.tsx]"]
  node_findingsui["Findings review<br/>[findings.tsx]"]
  node_dashboardui["Dashboard<br/>[dashboard.tsx]"]
  node_historyui["Scan history<br/>[history.tsx]"]
  node_reportsui["Reports<br/>[reports.tsx]"]
  node_profileui["Profile<br/>[profile.tsx]"]
end

subgraph group_api["API service"]
  node_apiapp["HTTP application<br/>[app.ts]"]
  node_authroutes["Authentication<br/>[auth.ts]"]
  node_accountroutes["Account routes<br/>[accounts.ts]"]
  node_scanroutes["Scan routes<br/>[scans.ts]"]
  node_findingroutes["Finding routes<br/>[findings.ts]"]
  node_dashboardroutes["Dashboard routes<br/>[dashboard.ts]"]
  node_reportroutes["Report routes<br/>[reports.ts]"]
end

subgraph group_scanning["Security scanning"]
  node_scanengine["Scan engine<br/>[scan-engine.ts]"]
  node_scanners["AWS checks<br/>[index.ts]"]
end

subgraph group_persistence["Data layer"]
  node_db[("PostgreSQL<br/>[index.ts]")]
  node_schemas["Domain tables<br/>[index.ts]"]
end

node_user(("Security user"))
node_aws{{"AWS account"}}

node_user -->|"uses"| node_webapp
node_webapp -->|"provides auth"| node_authstate
node_webapp -->|"routes to"| node_accountsui
node_webapp -->|"routes to"| node_scanui
node_webapp -->|"routes to"| node_findingsui
node_webapp -->|"routes to"| node_dashboardui
node_webapp -->|"routes to"| node_historyui
node_webapp -->|"routes to"| node_reportsui
node_webapp -->|"routes to"| node_profileui
node_apiapp -->|"dispatches"| node_authroutes
node_apiapp -->|"dispatches"| node_accountroutes
node_apiapp -->|"dispatches"| node_scanroutes
node_apiapp -->|"dispatches"| node_findingroutes
node_apiapp -->|"dispatches"| node_dashboardroutes
node_apiapp -->|"dispatches"| node_reportroutes
node_authroutes -->|"reads/writes"| node_db
node_scanengine -->|"reads/writes"| node_db
node_scanengine -->|"invokes checks"| node_scanners
node_scanners -->|"inspects resources"| node_aws
node_db -->|"uses tables"| node_schemas

click node_webapp "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/App.tsx"
click node_authstate "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/lib/auth.tsx"
click node_accountsui "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/accounts.tsx"
click node_scanui "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/scan.tsx"
click node_findingsui "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/findings.tsx"
click node_dashboardui "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/dashboard.tsx"
click node_historyui "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/history.tsx"
click node_reportsui "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/reports.tsx"
click node_profileui "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/profile.tsx"
click node_apiapp "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/app.ts"
click node_authroutes "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/auth.ts"
click node_accountroutes "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/accounts.ts"
click node_scanroutes "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/scans.ts"
click node_findingroutes "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/findings.ts"
click node_dashboardroutes "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/dashboard.ts"
click node_reportroutes "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/reports.ts"
click node_scanengine "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/lib/scan-engine.ts"
click node_scanners "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/scanners/index.ts"
click node_db "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/lib/db/src/index.ts"
click node_schemas "https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/lib/db/src/schema/index.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_webapp,node_authstate,node_accountsui,node_scanui,node_findingsui,node_dashboardui,node_historyui,node_reportsui,node_profileui,node_user toneBlue
class node_apiapp,node_authroutes,node_accountroutes,node_scanroutes,node_findingroutes,node_dashboardroutes,node_reportroutes toneAmber
class node_scanengine,node_scanners toneMint
class node_db,node_schemas toneRose
class node_aws toneIndigo
```

## Components

### Web application

- [React app](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/App.tsx): `artifacts/sentinel/src/App.tsx`
- [Auth state](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/lib/auth.tsx): `artifacts/sentinel/src/lib/auth.tsx`
- [AWS accounts](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/accounts.tsx): `artifacts/sentinel/src/pages/accounts.tsx`
- [Scan controls](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/scan.tsx): `artifacts/sentinel/src/pages/scan.tsx`
- [Findings review](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/findings.tsx): `artifacts/sentinel/src/pages/findings.tsx`
- [Dashboard](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/dashboard.tsx): `artifacts/sentinel/src/pages/dashboard.tsx`
- [Scan history](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/history.tsx): `artifacts/sentinel/src/pages/history.tsx`
- [Reports](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/reports.tsx): `artifacts/sentinel/src/pages/reports.tsx`
- [Profile](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/sentinel/src/pages/profile.tsx): `artifacts/sentinel/src/pages/profile.tsx`

### API service

- [HTTP application](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/app.ts): `artifacts/api-server/src/app.ts`
- [Authentication](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/auth.ts): `artifacts/api-server/src/routes/auth.ts`
- [Account routes](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/accounts.ts): `artifacts/api-server/src/routes/accounts.ts`
- [Scan routes](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/scans.ts): `artifacts/api-server/src/routes/scans.ts`
- [Finding routes](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/findings.ts): `artifacts/api-server/src/routes/findings.ts`
- [Dashboard routes](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/dashboard.ts): `artifacts/api-server/src/routes/dashboard.ts`
- [Report routes](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/routes/reports.ts): `artifacts/api-server/src/routes/reports.ts`

### Security scanning

- [Scan engine](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/lib/scan-engine.ts): `artifacts/api-server/src/lib/scan-engine.ts`
- [AWS checks](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/artifacts/api-server/src/scanners/index.ts): `artifacts/api-server/src/scanners/index.ts`

### Data layer

- [PostgreSQL](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/lib/db/src/index.ts): `lib/db/src/index.ts`
- [Domain tables](https://github.com/kunalborse243-glitch/sentinel-aws/blob/main/lib/db/src/schema/index.ts): `lib/db/src/schema/index.ts`

### Other components

- **Security user**
- **AWS account**

## Connections

- Security user → React app: uses
- React app → Auth state: provides auth
- React app → AWS accounts: routes to
- React app → Scan controls: routes to
- React app → Findings review: routes to
- React app → Dashboard: routes to
- React app → Scan history: routes to
- React app → Reports: routes to
- React app → Profile: routes to
- HTTP application → Authentication: dispatches
- HTTP application → Account routes: dispatches
- HTTP application → Scan routes: dispatches
- HTTP application → Finding routes: dispatches
- HTTP application → Dashboard routes: dispatches
- HTTP application → Report routes: dispatches
- Authentication → PostgreSQL: reads/writes
- Scan engine → PostgreSQL: reads/writes
- Scan engine → AWS checks: invokes checks
- AWS checks → AWS account: inspects resources
- PostgreSQL → Domain tables: uses tables
