# h-sihan/qho640-newsem architecture

> Architecture diagram of the GitHub repository h-sihan/qho640-newsem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/h-sihan/qho640-newsem
- Repository: https://github.com/h-sihan/qho640-newsem

## Overview

This repository contains three separate React examples: a basic counter-and-heading demo, a searchable SkyBook flight listing, and a Next.js SkyBook listing. In the Vite flight app, users submit or clear search criteria; the app filters its in-memory flight data, displays matching flights, and handles flight selection. The Next.js example displays its own flight data and booking buttons but has no search form in the sampled code. The README only describes package setup, so capabilities and connections are based on source excerpts and the SOURCE INDEX; unsampled route wiring is left unconnected.

Main entry points: [`skyBookFlights/src/App.jsx`](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/App.jsx) (Search and selection), [`src/main.jsx`](https://github.com/h-sihan/qho640-newsem/blob/main/src/main.jsx) (Demo entry), [`skyBookFlights-NextJS/my-app/src/components/SkyBookApp.js`](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/components/SkyBookApp.js) (Flight display and selection), [`skyBookFlights/src/Main.jsx`](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/Main.jsx) (Flight entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["React demo"]
  node_demo_entry["Demo entry<br/>[main.jsx]"]
  node_demo_app["Heading app<br/>[app.jsx]"]
  node_counter["Counter<br/>[counter.jsx]"]
end

subgraph group_vite["Vite flight app"]
  node_flight_entry["Flight entry<br/>[Main.jsx]"]
  node_flight_app["Search and selection<br/>[App.jsx]"]
  node_search_form["Search form<br/>[SearchForm.jsx]"]
  node_flight_list["Flight results<br/>[FlightList.jsx]"]
  node_flight_data["Flight data<br/>[flights.js]"]
end

subgraph group_next["Next.js flight app"]
  node_next_page["Next.js page<br/>[page.js]"]
  node_next_layout["Root layout<br/>[layout.js]"]
  node_next_app["Flight display and selection<br/>[SkyBookApp.js]"]
  node_next_list["Flight results<br/>[FlightList.js]"]
  node_next_data["Flight data<br/>[flights.js]"]
end

node_user(("User"))

node_user -->|"opens"| node_demo_entry
node_demo_entry -->|"renders"| node_demo_app
node_demo_entry -->|"renders"| node_counter
node_user -->|"opens"| node_flight_entry
node_flight_entry -->|"renders"| node_flight_app
node_flight_app -->|"filters"| node_flight_data
node_flight_app -->|"renders"| node_search_form
node_search_form -->|"submits criteria"| node_flight_app
node_flight_app -->|"renders results"| node_flight_list
node_flight_list -->|"dispatches selection"| node_flight_app
node_user -->|"opens"| node_next_page
node_next_app -->|"reads"| node_next_data
node_next_app -->|"renders"| node_next_list
node_next_list -->|"dispatches selection"| node_next_app

click node_demo_entry "https://github.com/h-sihan/qho640-newsem/blob/main/src/main.jsx"
click node_demo_app "https://github.com/h-sihan/qho640-newsem/blob/main/src/app.jsx"
click node_counter "https://github.com/h-sihan/qho640-newsem/blob/main/src/counter.jsx"
click node_flight_entry "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/Main.jsx"
click node_flight_app "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/App.jsx"
click node_search_form "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/components/SearchForm.jsx"
click node_flight_list "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/components/FlightList.jsx"
click node_flight_data "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/data/flights.js"
click node_next_page "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/app/page.js"
click node_next_layout "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/app/layout.js"
click node_next_app "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/components/SkyBookApp.js"
click node_next_list "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/components/FlightList.js"
click node_next_data "https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/data/flights.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_demo_entry,node_demo_app,node_counter,node_user toneBlue
class node_flight_entry,node_flight_app,node_search_form,node_flight_list,node_flight_data toneAmber
class node_next_page,node_next_layout,node_next_app,node_next_list,node_next_data toneMint
```

## Components

### React demo

- [Demo entry](https://github.com/h-sihan/qho640-newsem/blob/main/src/main.jsx): `src/main.jsx`
- [Heading app](https://github.com/h-sihan/qho640-newsem/blob/main/src/app.jsx): `src/app.jsx`
- [Counter](https://github.com/h-sihan/qho640-newsem/blob/main/src/counter.jsx): `src/counter.jsx`

### Vite flight app

- [Flight entry](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/Main.jsx): `skyBookFlights/src/Main.jsx`
- [Search and selection](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/App.jsx): `skyBookFlights/src/App.jsx`
- [Search form](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/components/SearchForm.jsx): `skyBookFlights/src/components/SearchForm.jsx`
- [Flight results](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/components/FlightList.jsx): `skyBookFlights/src/components/FlightList.jsx`
- [Flight data](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights/src/data/flights.js): `skyBookFlights/src/data/flights.js`

### Next.js flight app

- [Next.js page](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/app/page.js): `skyBookFlights-NextJS/my-app/src/app/page.js`
- [Root layout](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/app/layout.js): `skyBookFlights-NextJS/my-app/src/app/layout.js`
- [Flight display and selection](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/components/SkyBookApp.js): `skyBookFlights-NextJS/my-app/src/components/SkyBookApp.js`
- [Flight results](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/components/FlightList.js): `skyBookFlights-NextJS/my-app/src/components/FlightList.js`
- [Flight data](https://github.com/h-sihan/qho640-newsem/blob/main/skyBookFlights-NextJS/my-app/src/data/flights.js): `skyBookFlights-NextJS/my-app/src/data/flights.js`

### Other components

- **User**

## Connections

- User → Demo entry: opens (evidence: `src/main.jsx`)
- Demo entry → Heading app: renders (evidence: `src/main.jsx`)
- Demo entry → Counter: renders (evidence: `src/main.jsx`)
- User → Flight entry: opens (evidence: `skyBookFlights/src/Main.jsx`)
- Flight entry → Search and selection: renders (evidence: `skyBookFlights/src/Main.jsx`)
- Search and selection → Flight data: filters (evidence: `skyBookFlights/src/App.jsx`)
- Search and selection → Search form: renders (evidence: `skyBookFlights/src/App.jsx`)
- Search form → Search and selection: submits criteria (evidence: `skyBookFlights/src/components/SearchForm.jsx`)
- Search and selection → Flight results: renders results (evidence: `skyBookFlights/src/App.jsx`)
- Flight results → Search and selection: dispatches selection (evidence: `skyBookFlights/src/components/FlightList.jsx`)
- User → Next.js page: opens (evidence: `skyBookFlights-NextJS/my-app/src/app/page.js`)
- Flight display and selection → Flight data: reads (evidence: `skyBookFlights-NextJS/my-app/src/components/SkyBookApp.js`)
- Flight display and selection → Flight results: renders (evidence: `skyBookFlights-NextJS/my-app/src/components/SkyBookApp.js`)
- Flight results → Flight display and selection: dispatches selection (evidence: `skyBookFlights-NextJS/my-app/src/components/FlightList.js`)
