# vaishnavicm-16/sentinel-ast architecture

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

- Interactive diagram: https://gitdiagram.com/vaishnavicm-16/sentinel-ast
- Repository: https://github.com/vaishnavicm-16/sentinel-ast

## Overview

SENTINEL AST is a developer-facing SAST tool with both a browser playground/dashboard and a terminal CLI. The main workflow accepts source code or files, parses them into ASTs, applies security rules, aggregates findings, and presents or exports results. The graph covers the documented rule catalog and SARIF/CI gate capabilities. Some UI-to-engine calls are supported by the SOURCE INDEX rather than complete excerpts; unsampled implementation details are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/App.tsx) (Web application), [`cli/index.ts`](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/cli/index.ts) (Terminal CLI), [`src/engine/scanner.ts`](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/scanner.ts) (Scan orchestrator), [`src/components/ScannerPlayground.tsx`](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/ScannerPlayground.tsx) (Scanner playground)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web experience"]
  node_app["Web application<br/>[App.tsx]"]
  node_playground["Scanner playground"]
  node_dashboard["Findings dashboard<br/>[DashboardView.tsx]"]
  node_features["Security features"]
  node_docs["Rules and docs"]
  node_checklist["Checklist modal<br/>[ChecklistModal.tsx]"]
  node_hero["Product landing<br/>[Hero.tsx]"]
  node_terminaldemo["Terminal demo<br/>[TerminalDemo.tsx]"]
  node_nav["Navigation<br/>[Navbar.tsx]"]
  node_how["Workflow overview<br/>[HowItWorks.tsx]"]
  node_clisection["CLI overview<br/>[CliSection.tsx]"]
  node_cicd["CI/CD overview<br/>[CicdSection.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

subgraph group_entry["Scan entrypoints"]
  node_cli["Terminal CLI<br/>[index.ts]"]
end

subgraph group_analysis["Analysis engine"]
  node_scanner["Scan orchestrator<br/>[scanner.ts]"]
  node_parser["AST parser and walker<br/>[parser.ts]"]
  node_rules["Security rules<br/>[index.ts]"]
  node_types["Scan data types<br/>[types.ts]"]
  node_samples["Vulnerable and safe samples<br/>[sampleCodes.ts]"]
end

subgraph group_results["Findings and output"]
  node_sarif["SARIF exporter<br/>[sarif.ts]"]
  node_terminal["Terminal and file output<br/>[index.ts]"]
end

node_developer(("Developer"))
node_securitytab["Code-scanning platform"]

node_developer -->|"uses"| node_app
node_developer -->|"runs scans"| node_cli
node_app -->|"renders"| node_nav
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_playground
node_app -->|"renders"| node_features
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_how
node_app -->|"renders"| node_clisection
node_app -->|"renders"| node_cicd
node_app -->|"renders"| node_docs
node_app -->|"renders"| node_checklist
node_app -->|"renders"| node_footer
node_hero -->|"renders"| node_terminaldemo
node_playground -->|"scans code"| node_scanner
node_playground -->|"loads examples"| node_samples
node_playground -->|"exports findings"| node_sarif
node_dashboard -->|"scans repository"| node_scanner
node_dashboard -->|"uses examples"| node_samples
node_dashboard -->|"exports findings"| node_sarif
node_cli -->|"scans files"| node_scanner
node_cli -->|"lists rules"| node_rules
node_cli -->|"exports SARIF"| node_sarif
node_cli -->|"prints and saves"| node_terminal
node_scanner -->|"parses source"| node_parser
node_scanner -->|"runs checks"| node_rules
node_rules -->|"walks AST"| node_parser
node_sarif -->|"feeds code scanning"| node_securitytab
node_cli -.->|"supports CI gate upload"| node_securitytab

click node_app "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/App.tsx"
click node_playground "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/ScannerPlayground.tsx"
click node_dashboard "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/DashboardView.tsx"
click node_features "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/FeaturesSection.tsx"
click node_docs "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/DocumentationSection.tsx"
click node_checklist "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/ChecklistModal.tsx"
click node_hero "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/Hero.tsx"
click node_terminaldemo "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/TerminalDemo.tsx"
click node_nav "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/Navbar.tsx"
click node_how "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/HowItWorks.tsx"
click node_clisection "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/CliSection.tsx"
click node_cicd "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/CicdSection.tsx"
click node_footer "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/Footer.tsx"
click node_cli "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/cli/index.ts"
click node_scanner "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/scanner.ts"
click node_parser "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/parser.ts"
click node_rules "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/rules/index.ts"
click node_types "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/types.ts"
click node_samples "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/sampleCodes.ts"
click node_sarif "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/sarif.ts"
click node_terminal "https://github.com/vaishnavicm-16/sentinel-ast/blob/main/cli/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_app,node_playground,node_dashboard,node_features,node_docs,node_checklist,node_hero,node_terminaldemo,node_nav,node_how,node_clisection,node_cicd,node_footer toneBlue
class node_cli toneAmber
class node_scanner,node_parser,node_rules,node_types,node_samples toneMint
class node_sarif,node_terminal toneRose
class node_developer,node_securitytab toneIndigo
```

## Components

### Web experience

- [Web application](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/App.tsx): `src/App.tsx`
- [Scanner playground](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/ScannerPlayground.tsx): `src/components/ScannerPlayground.tsx`
- [Findings dashboard](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/DashboardView.tsx): `src/components/DashboardView.tsx`
- [Security features](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/FeaturesSection.tsx): `src/components/FeaturesSection.tsx`
- [Rules and docs](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/DocumentationSection.tsx): `src/components/DocumentationSection.tsx`
- [Checklist modal](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/ChecklistModal.tsx): `src/components/ChecklistModal.tsx`
- [Product landing](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/Hero.tsx): `src/components/Hero.tsx`
- [Terminal demo](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/TerminalDemo.tsx): `src/components/TerminalDemo.tsx`
- [Navigation](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Workflow overview](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/HowItWorks.tsx): `src/components/HowItWorks.tsx`
- [CLI overview](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/CliSection.tsx): `src/components/CliSection.tsx`
- [CI/CD overview](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/CicdSection.tsx): `src/components/CicdSection.tsx`
- [Footer](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Scan entrypoints

- [Terminal CLI](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/cli/index.ts): `cli/index.ts`

### Analysis engine

- [Scan orchestrator](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/scanner.ts): `src/engine/scanner.ts`
- [AST parser and walker](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/parser.ts): `src/engine/parser.ts`
- [Security rules](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/rules/index.ts): `src/engine/rules/index.ts`
- [Scan data types](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/types.ts): `src/engine/types.ts`
- [Vulnerable and safe samples](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/sampleCodes.ts): `src/engine/sampleCodes.ts`

### Findings and output

- [SARIF exporter](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/src/engine/sarif.ts): `src/engine/sarif.ts`
- [Terminal and file output](https://github.com/vaishnavicm-16/sentinel-ast/blob/main/cli/index.ts): `cli/index.ts`

### Other components

- **Developer**
- **Code-scanning platform**

## Connections

- Developer → Web application: uses
- Developer → Terminal CLI: runs scans (evidence: `README.md`)
- Web application → Navigation: renders (evidence: `src/App.tsx`)
- Web application → Product landing: renders (evidence: `src/App.tsx`)
- Web application → Scanner playground: renders (evidence: `src/App.tsx`)
- Web application → Security features: renders (evidence: `src/App.tsx`)
- Web application → Findings dashboard: renders (evidence: `src/App.tsx`)
- Web application → Workflow overview: renders (evidence: `src/App.tsx`)
- Web application → CLI overview: renders (evidence: `src/App.tsx`)
- Web application → CI/CD overview: renders (evidence: `src/App.tsx`)
- Web application → Rules and docs: renders (evidence: `src/App.tsx`)
- Web application → Checklist modal: renders (evidence: `src/App.tsx`)
- Web application → Footer: renders (evidence: `src/App.tsx`)
- Product landing → Terminal demo: renders (evidence: `src/components/Hero.tsx`)
- Scanner playground → Scan orchestrator: scans code (evidence: `src/components/ScannerPlayground.tsx`)
- Scanner playground → Vulnerable and safe samples: loads examples (evidence: `src/components/ScannerPlayground.tsx`)
- Scanner playground → SARIF exporter: exports findings (evidence: `src/components/ScannerPlayground.tsx`)
- Findings dashboard → Scan orchestrator: scans repository (evidence: `src/components/DashboardView.tsx`)
- Findings dashboard → Vulnerable and safe samples: uses examples (evidence: `src/components/DashboardView.tsx`)
- Findings dashboard → SARIF exporter: exports findings (evidence: `src/components/DashboardView.tsx`)
- Terminal CLI → Scan orchestrator: scans files (evidence: `cli/index.ts`)
- Terminal CLI → Security rules: lists rules (evidence: `cli/index.ts`)
- Terminal CLI → SARIF exporter: exports SARIF (evidence: `cli/index.ts`)
- Terminal CLI → Terminal and file output: prints and saves (evidence: `cli/index.ts`)
- Scan orchestrator → AST parser and walker: parses source (evidence: `src/engine/scanner.ts`)
- Scan orchestrator → Security rules: runs checks (evidence: `src/engine/scanner.ts`)
- Security rules → AST parser and walker: walks AST (evidence: `src/engine/rules/index.ts`)
- SARIF exporter → Code-scanning platform: feeds code scanning (evidence: `README.md`)
- Terminal CLI → Code-scanning platform: supports CI gate upload (evidence: `README.md`)
