# roop-teja/aws_project architecture

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

- Interactive diagram: https://gitdiagram.com/roop-teja/aws_project
- Repository: https://github.com/roop-teja/aws_project

## Overview

This is a serverless backend for publishing and listing college notifications. The main workflow accepts a publish request, validates it, calculates the matching subscriber queues, publishes through SNS, stores a notification record in DynamoDB, and returns a response; listing reads notification history from the store. The README also documents SNS subscription queues and an API Gateway/Lambda deployment, while the source shows an Express local adapter. AWS-side delivery beyond SNS publication is documented, not implemented in the sampled backend code.

Main entry points: [`src/handlers/notificationHandler.ts`](https://github.com/roop-teja/aws_project/blob/main/src/handlers/notificationHandler.ts) (Notification handlers), [`src/app.ts`](https://github.com/roop-teja/aws_project/blob/main/src/app.ts) (Express adapter), [`src/services/snsPublisherService.ts`](https://github.com/roop-teja/aws_project/blob/main/src/services/snsPublisherService.ts) (SNS publisher service), [`src/services/dynamoService.ts`](https://github.com/roop-teja/aws_project/blob/main/src/services/dynamoService.ts) (DynamoDB service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request entry"]
  node_localserver["Local server<br/>[localServer.ts]"]
  node_expressapp["Express adapter<br/>[app.ts]"]
end

subgraph group_workflow["Notification workflow"]
  node_handler["Notification handlers"]
  node_schema["Request validation"]
  node_routing["Queue calculation<br/>[queueCalculator.ts]"]
  node_recordtypes["Notification data types<br/>[notification.ts]"]
end

subgraph group_aws["AWS integrations"]
  node_snsservice["SNS publisher service"]
  node_topic["SNS topic"]
  node_studentqueue["Student queue"]
  node_facultyqueue["Faculty queue"]
  node_placementqueue["Placement queue"]
  node_dynamo["DynamoDB service<br/>[dynamoService.ts]"]
  node_table[("Notifications table")]
end

subgraph group_support["Shared support"]
  node_config["Environment config<br/>[env.ts]"]
  node_response["API responses<br/>[response.ts]"]
end

node_publisher(("Notification publisher"))
node_gateway{{"API Gateway"}}

node_publisher -->|"submits requests"| node_gateway
node_gateway -->|"routes requests"| node_handler
node_localserver -->|"starts"| node_expressapp
node_expressapp -->|"adapts and invokes"| node_handler
node_handler -->|"validates with"| node_schema
node_handler -->|"calculates targets"| node_routing
node_handler -->|"publishes through"| node_snsservice
node_snsservice -->|"publishes message"| node_topic
node_topic -->|"filters to"| node_studentqueue
node_topic -->|"filters to"| node_facultyqueue
node_topic -->|"filters to"| node_placementqueue
node_handler -->|"saves and lists"| node_dynamo
node_dynamo -->|"reads and writes"| node_table
node_handler -->|"loads settings"| node_config
node_handler -->|"formats results"| node_response

click node_localserver "https://github.com/roop-teja/aws_project/blob/main/src/localServer.ts"
click node_expressapp "https://github.com/roop-teja/aws_project/blob/main/src/app.ts"
click node_handler "https://github.com/roop-teja/aws_project/blob/main/src/handlers/notificationHandler.ts"
click node_schema "https://github.com/roop-teja/aws_project/blob/main/src/validation/notificationSchema.ts"
click node_routing "https://github.com/roop-teja/aws_project/blob/main/src/utils/queueCalculator.ts"
click node_recordtypes "https://github.com/roop-teja/aws_project/blob/main/src/types/notification.ts"
click node_snsservice "https://github.com/roop-teja/aws_project/blob/main/src/services/snsPublisherService.ts"
click node_dynamo "https://github.com/roop-teja/aws_project/blob/main/src/services/dynamoService.ts"
click node_config "https://github.com/roop-teja/aws_project/blob/main/src/config/env.ts"
click node_response "https://github.com/roop-teja/aws_project/blob/main/src/utils/response.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_localserver,node_expressapp toneBlue
class node_handler,node_schema,node_routing,node_recordtypes toneAmber
class node_snsservice,node_topic,node_studentqueue,node_facultyqueue,node_placementqueue,node_dynamo,node_table,node_gateway toneMint
class node_config,node_response toneRose
class node_publisher toneIndigo
```

## Components

### Request entry

- [Local server](https://github.com/roop-teja/aws_project/blob/main/src/localServer.ts): `src/localServer.ts`
- [Express adapter](https://github.com/roop-teja/aws_project/blob/main/src/app.ts): `src/app.ts`

### Notification workflow

- [Notification handlers](https://github.com/roop-teja/aws_project/blob/main/src/handlers/notificationHandler.ts): `src/handlers/notificationHandler.ts`
- [Request validation](https://github.com/roop-teja/aws_project/blob/main/src/validation/notificationSchema.ts): `src/validation/notificationSchema.ts`
- [Queue calculation](https://github.com/roop-teja/aws_project/blob/main/src/utils/queueCalculator.ts): `src/utils/queueCalculator.ts`
- [Notification data types](https://github.com/roop-teja/aws_project/blob/main/src/types/notification.ts): `src/types/notification.ts`

### AWS integrations

- [SNS publisher service](https://github.com/roop-teja/aws_project/blob/main/src/services/snsPublisherService.ts): `src/services/snsPublisherService.ts`
- **SNS topic**
- **Student queue**
- **Faculty queue**
- **Placement queue**
- [DynamoDB service](https://github.com/roop-teja/aws_project/blob/main/src/services/dynamoService.ts): `src/services/dynamoService.ts`
- **Notifications table**

### Shared support

- [Environment config](https://github.com/roop-teja/aws_project/blob/main/src/config/env.ts): `src/config/env.ts`
- [API responses](https://github.com/roop-teja/aws_project/blob/main/src/utils/response.ts): `src/utils/response.ts`

### Other components

- **Notification publisher**
- **API Gateway**

## Connections

- Notification publisher → API Gateway: submits requests (evidence: `README.md`)
- API Gateway → Notification handlers: routes requests (evidence: `README.md`)
- Local server → Express adapter: starts (evidence: `src/localServer.ts`)
- Express adapter → Notification handlers: adapts and invokes (evidence: `src/app.ts`)
- Notification handlers → Request validation: validates with (evidence: `src/handlers/notificationHandler.ts`)
- Notification handlers → Queue calculation: calculates targets (evidence: `src/handlers/notificationHandler.ts`)
- Notification handlers → SNS publisher service: publishes through (evidence: `src/handlers/notificationHandler.ts`)
- SNS publisher service → SNS topic: publishes message (evidence: `src/services/snsPublisherService.ts`)
- SNS topic → Student queue: filters to (evidence: `README.md`)
- SNS topic → Faculty queue: filters to (evidence: `README.md`)
- SNS topic → Placement queue: filters to (evidence: `README.md`)
- Notification handlers → DynamoDB service: saves and lists (evidence: `src/handlers/notificationHandler.ts`)
- DynamoDB service → Notifications table: reads and writes (evidence: `src/services/dynamoService.ts`)
- Notification handlers → Environment config: loads settings (evidence: `src/handlers/notificationHandler.ts`)
- Notification handlers → API responses: formats results (evidence: `src/handlers/notificationHandler.ts`)
