# arpita-venkat8/wave-watch-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/arpita-venkat8/wave-watch-frontend
- Repository: https://github.com/arpita-venkat8/wave-watch-frontend

## Overview

This is a Wave Watch coastal-hazard monitoring application built on an Amplify React starter. Its user flow is role selection and sign-in, role verification, then a dashboard for coastal reports and correlation results; the dashboard excerpt also shows report submission and photo upload behavior. The README documents Cognito authentication, a GraphQL API, and DynamoDB, while the sampled data schema still defines a generic Todo model. App internals and their backend request wiring are only partially excerpted, so those connections are not inferred.

Main entry points: [`amplify/backend.ts`](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/backend.ts) (Backend composition), [`src/main.tsx`](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/main.tsx) (Role and sign-in portal), [`src/App.tsx`](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/App.tsx) (Hazard dashboard), [`amplify/data/resource.ts`](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/data/resource.ts) (Data API schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_portal["Role and sign-in portal<br/>[main.tsx]"]
  node_dashboard["Hazard dashboard<br/>[App.tsx]"]
  node_reports["Hazard reports<br/>[App.tsx]"]
  node_correlation["Incident correlation<br/>[App.tsx]"]
end

subgraph group_identity["Identity"]
  node_authconfig["Email authentication<br/>[resource.ts]"]
end

subgraph group_cloud["Amplify backend"]
  node_backend["Backend composition<br/>[backend.ts]"]
  node_dataresource["Data API schema<br/>[resource.ts]"]
end

node_visitor(("Citizen or admin"))
node_cognito["Amazon Cognito"]
node_appsync["AWS AppSync API"]
node_dynamodb[("Amazon DynamoDB")]

node_visitor -->|"chooses role"| node_portal
node_portal -->|"authenticates with"| node_cognito
node_portal -->|"renders after verification"| node_dashboard
node_dashboard -->|"checks session"| node_cognito
node_backend -->|"registers"| node_authconfig
node_backend -->|"registers"| node_dataresource
node_backend -->|"provides GraphQL API"| node_appsync
node_dataresource -->|"configures database"| node_dynamodb

click node_portal "https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/main.tsx"
click node_dashboard "https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/App.tsx"
click node_reports "https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/App.tsx"
click node_correlation "https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/App.tsx"
click node_authconfig "https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/auth/resource.ts"
click node_backend "https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/backend.ts"
click node_dataresource "https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/data/resource.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_portal,node_dashboard,node_reports,node_correlation toneBlue
class node_authconfig,node_dynamodb toneAmber
class node_backend,node_dataresource,node_appsync toneMint
class node_visitor,node_cognito toneIndigo
```

## Components

### Web application

- [Role and sign-in portal](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/main.tsx): `src/main.tsx`
- [Hazard dashboard](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/App.tsx): `src/App.tsx`
- [Hazard reports](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/App.tsx): `src/App.tsx`
- [Incident correlation](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/src/App.tsx): `src/App.tsx`

### Identity

- [Email authentication](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/auth/resource.ts): `amplify/auth/resource.ts`

### Amplify backend

- [Backend composition](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/backend.ts): `amplify/backend.ts`
- [Data API schema](https://github.com/arpita-venkat8/wave-watch-frontend/blob/main/amplify/data/resource.ts): `amplify/data/resource.ts`

### Other components

- **Citizen or admin**
- **Amazon Cognito**
- **AWS AppSync API**
- **Amazon DynamoDB**

## Connections

- Citizen or admin → Role and sign-in portal: chooses role (evidence: `src/main.tsx`)
- Role and sign-in portal → Amazon Cognito: authenticates with (evidence: `README.md`)
- Role and sign-in portal → Hazard dashboard: renders after verification (evidence: `src/main.tsx`)
- Hazard dashboard → Amazon Cognito: checks session (evidence: `src/App.tsx`)
- Backend composition → Email authentication: registers (evidence: `amplify/backend.ts`)
- Backend composition → Data API schema: registers (evidence: `amplify/backend.ts`)
- Backend composition → AWS AppSync API: provides GraphQL API (evidence: `README.md`)
- Data API schema → Amazon DynamoDB: configures database (evidence: `README.md`)
