# nishigandhachoudhury/travelplanner architecture

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

- Interactive diagram: https://gitdiagram.com/nishigandhachoudhury/travelplanner
- Repository: https://github.com/nishigandhachoudhury/travelplanner

## Overview

Travel Planner is a client-side React app for discovering destinations, creating and editing trips, saving itineraries, and estimating travel expenses. The main workflow starts with trip details, continues through a user-built itinerary, and saves trip updates in browser local storage; users can also explore and filter destinations or use the separate budget calculator. The graph reflects the shown routes and calls. Other component files are present in the tree, but their roles or connections are not established by the excerpts.

Main entry points: [`frontend/src/App.jsx`](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/App.jsx) (App Router), [`frontend/src/pages/ExploreDestinations.jsx`](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/pages/ExploreDestinations.jsx) (Explore Destinations), [`frontend/src/utils/tripUtils.js`](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/utils/tripUtils.js) (Trip Storage Helpers), [`frontend/src/components/TripForm.jsx`](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/TripForm.jsx) (Trip Details Form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App Navigation"]
  node_app["App Router<br/>[App.jsx]"]
  node_navbar["Navigation Bar<br/>[Navbar.jsx]"]
end

subgraph group_discovery["Destination Discovery"]
  node_explore["Explore Destinations"]
  node_destination_data["Destination Catalog<br/>[destinations.js]"]
  node_destination_card["Destination Card"]
end

subgraph group_planning["Trip Planning"]
  node_trip_form["Trip Details Form<br/>[TripForm.jsx]"]
  node_itinerary["Itinerary Editor<br/>[Itinerary.jsx]"]
  node_saved_trips["Saved Trips<br/>[SavedTrips.jsx]"]
  node_trip_utils["Trip Storage Helpers<br/>[tripUtils.js]"]
  node_local_storage[("Browser Local Storage")]
end

subgraph group_budget["Budgeting"]
  node_budget_calc["Budget Calculator"]
end

node_traveler(("Traveler"))

node_traveler -->|"uses app"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_explore
node_app -->|"routes to"| node_trip_form
node_app -->|"routes to"| node_itinerary
node_app -->|"routes to"| node_saved_trips
node_app -->|"routes to"| node_budget_calc
node_explore -->|"filters"| node_destination_data
node_explore -->|"renders"| node_destination_card
node_trip_form -->|"submits trip"| node_app
node_itinerary -->|"submits updates"| node_app
node_app -->|"saves trip"| node_local_storage
node_saved_trips -->|"loads and deletes"| node_trip_utils
node_trip_utils -->|"reads and writes"| node_local_storage
node_budget_calc -->|"calculates totals"| node_trip_utils

click node_app "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/App.jsx"
click node_navbar "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/Navbar.jsx"
click node_explore "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/pages/ExploreDestinations.jsx"
click node_destination_data "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/data/destinations.js"
click node_destination_card "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/DestinationCard.jsx"
click node_trip_form "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/TripForm.jsx"
click node_itinerary "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/Itinerary.jsx"
click node_saved_trips "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/pages/SavedTrips.jsx"
click node_trip_utils "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/utils/tripUtils.js"
click node_budget_calc "https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/pages/BudgetCalculator.jsx"

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_app,node_navbar toneBlue
class node_explore,node_destination_data,node_destination_card toneAmber
class node_trip_form,node_itinerary,node_saved_trips,node_trip_utils,node_local_storage toneMint
class node_budget_calc toneRose
class node_traveler toneIndigo
```

## Components

### App Navigation

- [App Router](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation Bar](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`

### Destination Discovery

- [Explore Destinations](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/pages/ExploreDestinations.jsx): `frontend/src/pages/ExploreDestinations.jsx`
- [Destination Catalog](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/data/destinations.js): `frontend/src/data/destinations.js`
- [Destination Card](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/DestinationCard.jsx): `frontend/src/components/DestinationCard.jsx`

### Trip Planning

- [Trip Details Form](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/TripForm.jsx): `frontend/src/components/TripForm.jsx`
- [Itinerary Editor](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/components/Itinerary.jsx): `frontend/src/components/Itinerary.jsx`
- [Saved Trips](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/pages/SavedTrips.jsx): `frontend/src/pages/SavedTrips.jsx`
- [Trip Storage Helpers](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/utils/tripUtils.js): `frontend/src/utils/tripUtils.js`
- **Browser Local Storage**

### Budgeting

- [Budget Calculator](https://github.com/nishigandhachoudhury/travelplanner/blob/main/frontend/src/pages/BudgetCalculator.jsx): `frontend/src/pages/BudgetCalculator.jsx`

### Other components

- **Traveler**

## Connections

- Traveler → App Router: uses app
- App Router → Navigation Bar: renders (evidence: `frontend/src/App.jsx`)
- App Router → Explore Destinations: routes to (evidence: `frontend/src/App.jsx`)
- App Router → Trip Details Form: routes to (evidence: `frontend/src/App.jsx`)
- App Router → Itinerary Editor: routes to (evidence: `frontend/src/App.jsx`)
- App Router → Saved Trips: routes to (evidence: `frontend/src/App.jsx`)
- App Router → Budget Calculator: routes to (evidence: `frontend/src/App.jsx`)
- Explore Destinations → Destination Catalog: filters (evidence: `frontend/src/pages/ExploreDestinations.jsx`)
- Explore Destinations → Destination Card: renders (evidence: `frontend/src/pages/ExploreDestinations.jsx`)
- Trip Details Form → App Router: submits trip (evidence: `frontend/src/components/TripForm.jsx`)
- Itinerary Editor → App Router: submits updates (evidence: `frontend/src/components/Itinerary.jsx`)
- App Router → Browser Local Storage: saves trip (evidence: `frontend/src/App.jsx`)
- Saved Trips → Trip Storage Helpers: loads and deletes (evidence: `frontend/src/pages/SavedTrips.jsx`)
- Trip Storage Helpers → Browser Local Storage: reads and writes (evidence: `frontend/src/utils/tripUtils.js`)
- Budget Calculator → Trip Storage Helpers: calculates totals (evidence: `frontend/src/pages/BudgetCalculator.jsx`)
