# anujagaikwad/aws-ai-detective architecture

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

- Interactive diagram: https://gitdiagram.com/anujagaikwad/aws-ai-detective
- Repository: https://github.com/anujagaikwad/aws-ai-detective

## Overview

AI Detective is a browser-based evidence investigation demo. Users upload images and ask questions; the documented workflow uses API Gateway and Lambda to coordinate visual and multimodal analysis, save findings, generate audio, and optionally notify users of major clues. The README describes these connections, but no source excerpts were available, so implementation details and the roles of the two HTML files cannot be verified. The web-interface path is therefore left unspecified.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_web["Web application"]
  node_results_view["Investigation results"]
end

subgraph group_orchestration["Serverless orchestration"]
  node_gateway{{"API Gateway"}}
  node_lambda["Investigation workflow"]
end

subgraph group_analysis["Evidence analysis"]
  node_rekognition["Rekognition analysis"]
  node_gemini["Gemini investigation"]
end

subgraph group_results["Results and delivery"]
  node_s3[("S3 evidence and audio")]
  node_dynamodb[("Investigation history")]
  node_polly["Report speech"]
  node_sns["Clue notifications"]
end

node_user(("Investigator"))

node_user -->|"uploads and asks"| node_web
node_web -->|"requests upload URLs"| node_gateway
node_web -->|"uploads evidence"| node_s3
node_web -->|"starts investigation"| node_gateway
node_gateway -->|"routes requests"| node_lambda
node_lambda -->|"retrieves evidence"| node_s3
node_lambda -->|"analyzes images"| node_rekognition
node_lambda -->|"investigates evidence"| node_gemini
node_lambda -->|"stores report"| node_dynamodb
node_lambda -->|"converts report"| node_polly
node_polly -->|"stores audio"| node_s3
node_lambda -->|"sends clue alert"| node_sns
node_web -->|"reviews history"| node_dynamodb
node_web -->|"displays findings"| node_results_view
node_lambda -.->|"returns results"| node_web

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_web,node_results_view toneBlue
class node_gateway,node_lambda toneAmber
class node_rekognition,node_gemini toneMint
class node_s3,node_dynamodb,node_polly,node_sns toneRose
class node_user toneIndigo
```

## Components

### User interface

- **Web application**
- **Investigation results**

### Serverless orchestration

- **API Gateway**
- **Investigation workflow**

### Evidence analysis

- **Rekognition analysis**
- **Gemini investigation**

### Results and delivery

- **S3 evidence and audio**
- **Investigation history**
- **Report speech**
- **Clue notifications**

### Other components

- **Investigator**

## Connections

- Investigator → Web application: uploads and asks (evidence: `README.md`)
- Web application → API Gateway: requests upload URLs (evidence: `README.md`)
- Web application → S3 evidence and audio: uploads evidence (evidence: `README.md`)
- Web application → API Gateway: starts investigation (evidence: `README.md`)
- API Gateway → Investigation workflow: routes requests (evidence: `README.md`)
- Investigation workflow → S3 evidence and audio: retrieves evidence (evidence: `README.md`)
- Investigation workflow → Rekognition analysis: analyzes images (evidence: `README.md`)
- Investigation workflow → Gemini investigation: investigates evidence (evidence: `README.md`)
- Investigation workflow → Investigation history: stores report (evidence: `README.md`)
- Investigation workflow → Report speech: converts report (evidence: `README.md`)
- Report speech → S3 evidence and audio: stores audio (evidence: `README.md`)
- Investigation workflow → Clue notifications: sends clue alert (evidence: `README.md`)
- Web application → Investigation history: reviews history (evidence: `README.md`)
- Web application → Investigation results: displays findings (evidence: `README.md`)
- Investigation workflow → Web application: returns results
