# sofiaumrish/packsmart architecture

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

- Interactive diagram: https://gitdiagram.com/sofiaumrish/packsmart
- Repository: https://github.com/sofiaumrish/packsmart

## Overview

PackSmart guides a traveler from trip planning and weather lookup to a tailored packing list, list customization, readiness scoring, outfit suggestions, inspiration, and locally saved trip management. The main request path is visible in the sampled planner, results, and weather code. README documents additional saved-trip, outfit, and theme capabilities; their precise internal wiring is represented only where supported by the tree and excerpts.

Main entry points: [`components/trip-details/TripDetailsClient.tsx`](https://github.com/sofiaumrish/packsmart/blob/main/components/trip-details/TripDetailsClient.tsx) (Trip details), [`utils/storage.ts`](https://github.com/sofiaumrish/packsmart/blob/main/utils/storage.ts) (Trip storage), [`components/trip-planner/TripForm.tsx`](https://github.com/sofiaumrish/packsmart/blob/main/components/trip-planner/TripForm.tsx) (Trip form), [`components/packing-list/PackingList.tsx`](https://github.com/sofiaumrish/packsmart/blob/main/components/packing-list/PackingList.tsx) (Interactive packing list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_trip_planning["Trip planning"]
  node_trip_form["Trip form<br/>[TripForm.tsx]"]
  node_weather_client["Weather client<br/>[weatherApi.ts]"]
  node_trip_details["Trip details"]
end

subgraph group_packing["Packing and outfits"]
  node_packing_calculator["Packing generator"]
  node_packing_list["Interactive packing list<br/>[PackingList.tsx]"]
  node_packing_score["Readiness score"]
  node_outfit_generator["Outfit generator"]
  node_outfit_logic["Outfit logic<br/>[outfitGenerator.ts]"]
  node_inspiration_gallery["Inspiration gallery"]
end

subgraph group_trip_management["Trip management"]
  node_save_button["Save trip control<br/>[SaveTripButton.tsx]"]
  node_saved_trips["Saved trips view<br/>[SavedTrips.tsx]"]
  node_trip_storage["Trip storage<br/>[storage.ts]"]
end

subgraph group_integrations["External integrations"]
  node_weather_route["Weather handler<br/>[route.ts]"]
  node_unsplash_route["Unsplash handler<br/>[route.ts]"]
end

subgraph group_presentation["Application UI"]
  node_home["Home page<br/>[page.tsx]"]
  node_planner_page["Planner page<br/>[page.tsx]"]
  node_results_page["Results page<br/>[page.tsx]"]
  node_trips_page["Trips page<br/>[page.tsx]"]
  node_header["Header and theme<br/>[Header.tsx]"]
end

node_traveler(("Traveler"))
node_openweather["OpenWeather"]
node_unsplash["Unsplash"]
node_browser_storage[("Browser localStorage")]

node_traveler -->|"opens"| node_home
node_home -->|"links to"| node_planner_page
node_planner_page -->|"presents"| node_trip_form
node_trip_form -->|"requests weather"| node_weather_client
node_weather_client -->|"fetches"| node_weather_route
node_weather_route -->|"requests forecast"| node_openweather
node_trip_form -->|"navigates with trip"| node_results_page
node_results_page -->|"renders"| node_trip_details
node_trip_details -->|"loads saved trips"| node_trip_storage
node_trip_details -->|"generates list"| node_packing_calculator
node_trip_details -->|"provides categories"| node_packing_list
node_trip_details -->|"provides trip context"| node_inspiration_gallery
node_trip_details -->|"provides trip data"| node_save_button
node_packing_list -->|"provides lists"| node_packing_score
node_packing_list -->|"provides categories"| node_outfit_generator
node_outfit_generator -->|"generates combinations"| node_outfit_logic
node_inspiration_gallery -->|"fetches images"| node_unsplash_route
node_unsplash_route -->|"searches photos"| node_unsplash
node_trips_page -->|"presents"| node_saved_trips
node_saved_trips -->|"loads and deletes"| node_trip_storage
node_save_button -->|"saves trip"| node_trip_storage
node_trip_storage -->|"reads and writes"| node_browser_storage
node_header -->|"stores theme"| node_browser_storage
node_traveler -->|"switches theme"| node_header

click node_home "https://github.com/sofiaumrish/packsmart/blob/main/app/page.tsx"
click node_planner_page "https://github.com/sofiaumrish/packsmart/blob/main/app/planner/page.tsx"
click node_trip_form "https://github.com/sofiaumrish/packsmart/blob/main/components/trip-planner/TripForm.tsx"
click node_weather_client "https://github.com/sofiaumrish/packsmart/blob/main/utils/weatherApi.ts"
click node_weather_route "https://github.com/sofiaumrish/packsmart/blob/main/app/api/weather/route.ts"
click node_results_page "https://github.com/sofiaumrish/packsmart/blob/main/app/result/page.tsx"
click node_trip_details "https://github.com/sofiaumrish/packsmart/blob/main/components/trip-details/TripDetailsClient.tsx"
click node_packing_calculator "https://github.com/sofiaumrish/packsmart/blob/main/utils/packingCalculator.ts"
click node_packing_list "https://github.com/sofiaumrish/packsmart/blob/main/components/packing-list/PackingList.tsx"
click node_packing_score "https://github.com/sofiaumrish/packsmart/blob/main/components/packing-list/PackingScoreElem.tsx"
click node_outfit_generator "https://github.com/sofiaumrish/packsmart/blob/main/components/outfits/OutfitGenerator.tsx"
click node_outfit_logic "https://github.com/sofiaumrish/packsmart/blob/main/utils/outfitGenerator.ts"
click node_inspiration_gallery "https://github.com/sofiaumrish/packsmart/blob/main/components/outfits/InspirationGallery.tsx"
click node_unsplash_route "https://github.com/sofiaumrish/packsmart/blob/main/app/api/unsplash/route.ts"
click node_save_button "https://github.com/sofiaumrish/packsmart/blob/main/components/trip-details/SaveTripButton.tsx"
click node_saved_trips "https://github.com/sofiaumrish/packsmart/blob/main/components/trip-details/SavedTrips.tsx"
click node_trips_page "https://github.com/sofiaumrish/packsmart/blob/main/app/trips/page.tsx"
click node_trip_storage "https://github.com/sofiaumrish/packsmart/blob/main/utils/storage.ts"
click node_header "https://github.com/sofiaumrish/packsmart/blob/main/components/layout/Header.tsx"

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_trip_form,node_weather_client,node_trip_details toneBlue
class node_packing_calculator,node_packing_list,node_packing_score,node_outfit_generator,node_outfit_logic,node_inspiration_gallery,node_browser_storage toneAmber
class node_save_button,node_saved_trips,node_trip_storage toneMint
class node_weather_route,node_unsplash_route toneRose
class node_home,node_planner_page,node_results_page,node_trips_page,node_header,node_traveler,node_openweather,node_unsplash toneIndigo
```

## Components

### Trip planning

- [Trip form](https://github.com/sofiaumrish/packsmart/blob/main/components/trip-planner/TripForm.tsx): `components/trip-planner/TripForm.tsx`
- [Weather client](https://github.com/sofiaumrish/packsmart/blob/main/utils/weatherApi.ts): `utils/weatherApi.ts`
- [Trip details](https://github.com/sofiaumrish/packsmart/blob/main/components/trip-details/TripDetailsClient.tsx): `components/trip-details/TripDetailsClient.tsx`

### Packing and outfits

- [Packing generator](https://github.com/sofiaumrish/packsmart/blob/main/utils/packingCalculator.ts): `utils/packingCalculator.ts`
- [Interactive packing list](https://github.com/sofiaumrish/packsmart/blob/main/components/packing-list/PackingList.tsx): `components/packing-list/PackingList.tsx`
- [Readiness score](https://github.com/sofiaumrish/packsmart/blob/main/components/packing-list/PackingScoreElem.tsx): `components/packing-list/PackingScoreElem.tsx`
- [Outfit generator](https://github.com/sofiaumrish/packsmart/blob/main/components/outfits/OutfitGenerator.tsx): `components/outfits/OutfitGenerator.tsx`
- [Outfit logic](https://github.com/sofiaumrish/packsmart/blob/main/utils/outfitGenerator.ts): `utils/outfitGenerator.ts`
- [Inspiration gallery](https://github.com/sofiaumrish/packsmart/blob/main/components/outfits/InspirationGallery.tsx): `components/outfits/InspirationGallery.tsx`

### Trip management

- [Save trip control](https://github.com/sofiaumrish/packsmart/blob/main/components/trip-details/SaveTripButton.tsx): `components/trip-details/SaveTripButton.tsx`
- [Saved trips view](https://github.com/sofiaumrish/packsmart/blob/main/components/trip-details/SavedTrips.tsx): `components/trip-details/SavedTrips.tsx`
- [Trip storage](https://github.com/sofiaumrish/packsmart/blob/main/utils/storage.ts): `utils/storage.ts`

### External integrations

- [Weather handler](https://github.com/sofiaumrish/packsmart/blob/main/app/api/weather/route.ts): `app/api/weather/route.ts`
- [Unsplash handler](https://github.com/sofiaumrish/packsmart/blob/main/app/api/unsplash/route.ts): `app/api/unsplash/route.ts`

### Application UI

- [Home page](https://github.com/sofiaumrish/packsmart/blob/main/app/page.tsx): `app/page.tsx`
- [Planner page](https://github.com/sofiaumrish/packsmart/blob/main/app/planner/page.tsx): `app/planner/page.tsx`
- [Results page](https://github.com/sofiaumrish/packsmart/blob/main/app/result/page.tsx): `app/result/page.tsx`
- [Trips page](https://github.com/sofiaumrish/packsmart/blob/main/app/trips/page.tsx): `app/trips/page.tsx`
- [Header and theme](https://github.com/sofiaumrish/packsmart/blob/main/components/layout/Header.tsx): `components/layout/Header.tsx`

### Other components

- **Traveler**
- **OpenWeather**
- **Unsplash**
- **Browser localStorage**

## Connections

- Traveler → Home page: opens
- Home page → Planner page: links to
- Planner page → Trip form: presents
- Trip form → Weather client: requests weather
- Weather client → Weather handler: fetches
- Weather handler → OpenWeather: requests forecast
- Trip form → Results page: navigates with trip
- Results page → Trip details: renders
- Trip details → Trip storage: loads saved trips
- Trip details → Packing generator: generates list
- Trip details → Interactive packing list: provides categories
- Trip details → Inspiration gallery: provides trip context
- Trip details → Save trip control: provides trip data
- Interactive packing list → Readiness score: provides lists
- Interactive packing list → Outfit generator: provides categories
- Outfit generator → Outfit logic: generates combinations
- Inspiration gallery → Unsplash handler: fetches images
- Unsplash handler → Unsplash: searches photos
- Trips page → Saved trips view: presents
- Saved trips view → Trip storage: loads and deletes
- Save trip control → Trip storage: saves trip
- Trip storage → Browser localStorage: reads and writes
- Header and theme → Browser localStorage: stores theme
- Traveler → Header and theme: switches theme
