# pragati0609/travelgo-app architecture

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

- Interactive diagram: https://gitdiagram.com/pragati0609/travelgo-app
- Repository: https://github.com/pragati0609/travelgo-app

## Overview

TravelGo is a Flask travel-booking web app with a catalog of sample bus, train, flight, and hotel listings. Users register or log in, search and select travel, submit booking details through checkout, then view or cancel bookings on a personal dashboard. Flask route handlers coordinate these steps; a shared AWS service handles user and booking operations, DynamoDB persistence, and SNS notifications. The README documents EC2 hosting and CloudWatch monitoring, but the sampled runtime source does not show their wiring.

Main entry points: [`routes/booking.py`](https://github.com/pragati0609/travelgo-app/blob/main/routes/booking.py) (Booking Routes), [`app.py`](https://github.com/pragati0609/travelgo-app/blob/main/app.py) (Flask App), [`services/aws_service.py`](https://github.com/pragati0609/travelgo-app/blob/main/services/aws_service.py) (AWS Service Layer), [`routes/dashboard.py`](https://github.com/pragati0609/travelgo-app/blob/main/routes/dashboard.py) (Dashboard Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Application"]
  node_flask["Flask App<br/>[app.py]"]
  node_config["App Configuration<br/>[config.py]"]
end

subgraph group_identity["Account Management"]
  node_auth_routes["Authentication Routes<br/>[auth.py]"]
  node_auth_views["Login &amp; Register"]
end

subgraph group_booking["Travel Booking"]
  node_booking_routes["Booking Routes<br/>[booking.py]"]
  node_catalog["Travel Catalog<br/>[data.py]"]
  node_search_view["Search Results<br/>[search.html]"]
  node_seats_view["Seat Selection<br/>[bus_seats.html]"]
  node_payment_view["Payment Checkout<br/>[payment.html]"]
  node_confirmation_view["Booking Confirmation<br/>[confirmation.html]"]
  node_dashboard_routes["Dashboard Routes<br/>[dashboard.py]"]
  node_dashboard_view["Travel Dashboard<br/>[index.html]"]
end

subgraph group_cloud["AWS Services"]
  node_aws_service["AWS Service Layer<br/>[aws_service.py]"]
  node_dynamodb[("DynamoDB")]
  node_sns["Amazon SNS"]
  node_ec2["Amazon EC2"]
  node_cloudwatch["Amazon CloudWatch"]
end

node_traveler(("Traveler"))

node_traveler -->|"uses"| node_flask
node_flask -->|"loads"| node_config
node_flask -->|"registers"| node_auth_routes
node_flask -->|"registers"| node_booking_routes
node_flask -->|"registers"| node_dashboard_routes
node_auth_routes -->|"renders"| node_auth_views
node_auth_routes -->|"authenticates"| node_aws_service
node_booking_routes -->|"filters"| node_catalog
node_booking_routes -->|"renders"| node_search_view
node_booking_routes -->|"renders"| node_seats_view
node_booking_routes -->|"renders"| node_payment_view
node_booking_routes -->|"creates bookings"| node_aws_service
node_booking_routes -->|"loads confirmation"| node_aws_service
node_booking_routes -->|"renders"| node_confirmation_view
node_dashboard_routes -->|"queries bookings"| node_aws_service
node_dashboard_routes -->|"cancels bookings"| node_aws_service
node_dashboard_routes -->|"renders"| node_dashboard_view
node_aws_service -->|"reads and writes"| node_dynamodb
node_aws_service -->|"publishes alerts"| node_sns
node_ec2 -->|"hosts"| node_flask
node_flask -.->|"logs and metrics"| node_cloudwatch

click node_flask "https://github.com/pragati0609/travelgo-app/blob/main/app.py"
click node_config "https://github.com/pragati0609/travelgo-app/blob/main/config.py"
click node_auth_routes "https://github.com/pragati0609/travelgo-app/blob/main/routes/auth.py"
click node_auth_views "https://github.com/pragati0609/travelgo-app/tree/main/templates/auth"
click node_booking_routes "https://github.com/pragati0609/travelgo-app/blob/main/routes/booking.py"
click node_catalog "https://github.com/pragati0609/travelgo-app/blob/main/utils/data.py"
click node_search_view "https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/search.html"
click node_seats_view "https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/bus_seats.html"
click node_payment_view "https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/payment.html"
click node_confirmation_view "https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/confirmation.html"
click node_dashboard_routes "https://github.com/pragati0609/travelgo-app/blob/main/routes/dashboard.py"
click node_dashboard_view "https://github.com/pragati0609/travelgo-app/blob/main/templates/dashboard/index.html"
click node_aws_service "https://github.com/pragati0609/travelgo-app/blob/main/services/aws_service.py"

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_flask,node_config toneBlue
class node_auth_routes,node_auth_views toneAmber
class node_booking_routes,node_catalog,node_search_view,node_seats_view,node_payment_view,node_confirmation_view,node_dashboard_routes,node_dashboard_view toneMint
class node_aws_service,node_dynamodb,node_sns,node_ec2,node_cloudwatch toneRose
class node_traveler toneIndigo
```

## Components

### Web Application

- [Flask App](https://github.com/pragati0609/travelgo-app/blob/main/app.py): `app.py`
- [App Configuration](https://github.com/pragati0609/travelgo-app/blob/main/config.py): `config.py`

### Account Management

- [Authentication Routes](https://github.com/pragati0609/travelgo-app/blob/main/routes/auth.py): `routes/auth.py`
- [Login & Register](https://github.com/pragati0609/travelgo-app/tree/main/templates/auth): `templates/auth`

### Travel Booking

- [Booking Routes](https://github.com/pragati0609/travelgo-app/blob/main/routes/booking.py): `routes/booking.py`
- [Travel Catalog](https://github.com/pragati0609/travelgo-app/blob/main/utils/data.py): `utils/data.py`
- [Search Results](https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/search.html): `templates/booking/search.html`
- [Seat Selection](https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/bus_seats.html): `templates/booking/bus_seats.html`
- [Payment Checkout](https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/payment.html): `templates/booking/payment.html`
- [Booking Confirmation](https://github.com/pragati0609/travelgo-app/blob/main/templates/booking/confirmation.html): `templates/booking/confirmation.html`
- [Dashboard Routes](https://github.com/pragati0609/travelgo-app/blob/main/routes/dashboard.py): `routes/dashboard.py`
- [Travel Dashboard](https://github.com/pragati0609/travelgo-app/blob/main/templates/dashboard/index.html): `templates/dashboard/index.html`

### AWS Services

- [AWS Service Layer](https://github.com/pragati0609/travelgo-app/blob/main/services/aws_service.py): `services/aws_service.py`
- **DynamoDB**
- **Amazon SNS**
- **Amazon EC2**
- **Amazon CloudWatch**

### Other components

- **Traveler**

## Connections

- Traveler → Flask App: uses (evidence: `README.md`)
- Flask App → App Configuration: loads (evidence: `app.py`)
- Flask App → Authentication Routes: registers (evidence: `app.py`)
- Flask App → Booking Routes: registers (evidence: `app.py`)
- Flask App → Dashboard Routes: registers (evidence: `app.py`)
- Authentication Routes → Login & Register: renders (evidence: `routes/auth.py`)
- Authentication Routes → AWS Service Layer: authenticates (evidence: `routes/auth.py`)
- Booking Routes → Travel Catalog: filters (evidence: `routes/booking.py`)
- Booking Routes → Search Results: renders (evidence: `routes/booking.py`)
- Booking Routes → Seat Selection: renders (evidence: `routes/booking.py`)
- Booking Routes → Payment Checkout: renders (evidence: `routes/booking.py`)
- Booking Routes → AWS Service Layer: creates bookings (evidence: `routes/booking.py`)
- Booking Routes → AWS Service Layer: loads confirmation (evidence: `routes/booking.py`)
- Booking Routes → Booking Confirmation: renders (evidence: `routes/booking.py`)
- Dashboard Routes → AWS Service Layer: queries bookings (evidence: `routes/dashboard.py`)
- Dashboard Routes → AWS Service Layer: cancels bookings (evidence: `routes/dashboard.py`)
- Dashboard Routes → Travel Dashboard: renders (evidence: `routes/dashboard.py`)
- AWS Service Layer → DynamoDB: reads and writes (evidence: `services/aws_service.py`)
- AWS Service Layer → Amazon SNS: publishes alerts (evidence: `services/aws_service.py`)
- Amazon EC2 → Flask App: hosts (evidence: `README.md`)
- Flask App → Amazon CloudWatch: logs and metrics (evidence: `README.md`)
