# dobladamark/event-rsvp-tutorial architecture

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

- Interactive diagram: https://gitdiagram.com/dobladamark/event-rsvp-tutorial
- Repository: https://github.com/dobladamark/event-rsvp-tutorial

## Overview

This is a small RSVP backend exposed through an AWS Lambda handler for API Gateway requests. The handler dispatches event-catalog reads to MySQL, and RSVP submissions, counts, and attendee queries to DynamoDB. RSVP submission validates required fields and uses a transactional write to prevent duplicate emails while incrementing response counts. The single source file implements all routes; route nodes below represent distinct branches within it, not separate modules.

Main entry points: [`index.js`](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js) (Lambda handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_handler["Lambda handler<br/>[index.js]"]
  node_response["HTTP response<br/>[index.js]"]
end

subgraph group_events["Event catalog"]
  node_event_detail["Event details<br/>[index.js]"]
  node_event_list["Event listing<br/>[index.js]"]
  node_mysql[("MySQL")]
end

subgraph group_rsvp["RSVP data"]
  node_rsvp_submit["Submit RSVP<br/>[index.js]"]
  node_rsvp_stats["RSVP counts<br/>[index.js]"]
  node_attendees["Attendee list<br/>[index.js]"]
  node_dynamo[("DynamoDB")]
end

node_gateway(("API Gateway"))

node_gateway -->|"invokes"| node_handler
node_handler -->|"dispatches"| node_event_detail
node_handler -->|"dispatches"| node_event_list
node_handler -->|"dispatches"| node_rsvp_submit
node_handler -->|"dispatches"| node_rsvp_stats
node_handler -->|"dispatches"| node_attendees
node_event_detail -->|"queries"| node_mysql
node_event_list -->|"queries"| node_mysql
node_rsvp_submit -->|"transactionally writes"| node_dynamo
node_rsvp_stats -->|"reads counts"| node_dynamo
node_attendees -->|"queries respondents"| node_dynamo
node_handler -->|"returns"| node_response
node_response -->|"sends response"| node_gateway

click node_handler "https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js"
click node_event_detail "https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js"
click node_event_list "https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js"
click node_rsvp_submit "https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js"
click node_rsvp_stats "https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js"
click node_attendees "https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js"
click node_response "https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js"

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_handler,node_response toneBlue
class node_event_detail,node_event_list,node_mysql toneAmber
class node_rsvp_submit,node_rsvp_stats,node_attendees,node_dynamo,node_gateway toneMint
```

## Components

### API runtime

- [Lambda handler](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js): `index.js`
- [HTTP response](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js): `index.js`

### Event catalog

- [Event details](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js): `index.js`
- [Event listing](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js): `index.js`
- **MySQL**

### RSVP data

- [Submit RSVP](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js): `index.js`
- [RSVP counts](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js): `index.js`
- [Attendee list](https://github.com/dobladamark/event-rsvp-tutorial/blob/main/index.js): `index.js`
- **DynamoDB**

### Other components

- **API Gateway**

## Connections

- API Gateway → Lambda handler: invokes
- Lambda handler → Event details: dispatches
- Lambda handler → Event listing: dispatches
- Lambda handler → Submit RSVP: dispatches
- Lambda handler → RSVP counts: dispatches
- Lambda handler → Attendee list: dispatches
- Event details → MySQL: queries
- Event listing → MySQL: queries
- Submit RSVP → DynamoDB: transactionally writes
- RSVP counts → DynamoDB: reads counts
- Attendee list → DynamoDB: queries respondents
- Lambda handler → HTTP response: returns
- HTTP response → API Gateway: sends response
