# poojayadav297/daa architecture

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

- Interactive diagram: https://gitdiagram.com/poojayadav297/daa
- Repository: https://github.com/poojayadav297/daa

## Overview

Smart Travel Planner accepts trip details, then presents a plan or algorithm output. The repository has two distinct runtime paths: a browser form calling a backend that currently returns a temporary acknowledgment, and a standalone C++ branch-and-bound program that prompts for trip and matrix data. The README also describes backtracking, dynamic programming, and algorithm comparison, but their implementations are not present in the supplied tree. The available excerpts do not show browser-to-C++ integration or live routing services.

Main entry points: [`cpp/main.cpp`](https://github.com/poojayadav297/daa/blob/main/cpp/main.cpp) (Trip and matrix input), [`cpp/branchAndBound.cpp`](https://github.com/poojayadav297/daa/blob/main/cpp/branchAndBound.cpp) (Travel planner), [`README.md`](https://github.com/poojayadav297/daa/blob/main/README.md) (Algorithm comparison), [`js/app.js`](https://github.com/poojayadav297/daa/blob/main/js/app.js) (Trip form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_trip_form["Trip form<br/>[app.js]"]
  node_trip_request["Trip request<br/>[app.js]"]
  node_result_view["Plan results<br/>[app.js]"]
  node_search_visual["Search visualization<br/>[visualization.js]"]
end

subgraph group_api["Backend API"]
  node_api_route["Plan-trip API<br/>[server.js]"]
  node_trip_ack["Temporary acknowledgment<br/>[server.js]"]
end

subgraph group_planner["C++ planner"]
  node_cli_input["Trip and matrix input<br/>[main.cpp]"]
  node_place_model["Place model<br/>[common.h]"]
  node_planner_engine["Travel planner<br/>[branchAndBound.cpp]"]
  node_bound_pruning["Bound and pruning<br/>[branchAndBound.cpp]"]
  node_plan_report["Route and metrics<br/>[branchAndBound.cpp]"]
  node_backtracking["Backtracking<br/>[README.md]"]
  node_dynamic_programming["Dynamic programming<br/>[README.md]"]
  node_algorithm_comparison["Algorithm comparison<br/>[README.md]"]
end

node_traveler(("Traveler"))

node_traveler -->|"enters trip"| node_trip_form
node_trip_form -->|"collects details"| node_trip_request
node_trip_request -->|"POSTs trip"| node_api_route
node_api_route -->|"returns acknowledgment"| node_trip_ack
node_trip_ack -->|"renders response"| node_result_view
node_result_view -->|"passes search tree"| node_search_visual
node_traveler -->|"enters trip data"| node_cli_input
node_cli_input -->|"creates places"| node_place_model
node_cli_input -->|"constructs and solves"| node_planner_engine
node_planner_engine -->|"uses bounds"| node_bound_pruning
node_cli_input -->|"displays results"| node_plan_report
node_planner_engine -->|"provides route metrics"| node_plan_report
node_algorithm_comparison -.->|"documents approach"| node_backtracking
node_algorithm_comparison -.->|"documents approach"| node_dynamic_programming

click node_trip_form "https://github.com/poojayadav297/daa/blob/main/js/app.js"
click node_trip_request "https://github.com/poojayadav297/daa/blob/main/js/app.js"
click node_result_view "https://github.com/poojayadav297/daa/blob/main/js/app.js"
click node_search_visual "https://github.com/poojayadav297/daa/blob/main/js/visualization.js"
click node_api_route "https://github.com/poojayadav297/daa/blob/main/backend/server.js"
click node_trip_ack "https://github.com/poojayadav297/daa/blob/main/backend/server.js"
click node_cli_input "https://github.com/poojayadav297/daa/blob/main/cpp/main.cpp"
click node_place_model "https://github.com/poojayadav297/daa/blob/main/cpp/common.h"
click node_planner_engine "https://github.com/poojayadav297/daa/blob/main/cpp/branchAndBound.cpp"
click node_bound_pruning "https://github.com/poojayadav297/daa/blob/main/cpp/branchAndBound.cpp"
click node_plan_report "https://github.com/poojayadav297/daa/blob/main/cpp/branchAndBound.cpp"
click node_backtracking "https://github.com/poojayadav297/daa/blob/main/README.md"
click node_dynamic_programming "https://github.com/poojayadav297/daa/blob/main/README.md"
click node_algorithm_comparison "https://github.com/poojayadav297/daa/blob/main/README.md"

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_trip_request,node_result_view,node_search_visual toneBlue
class node_api_route,node_trip_ack toneAmber
class node_cli_input,node_place_model,node_planner_engine,node_bound_pruning,node_plan_report,node_backtracking,node_dynamic_programming,node_algorithm_comparison toneMint
class node_traveler toneIndigo
```

## Components

### Web experience

- [Trip form](https://github.com/poojayadav297/daa/blob/main/js/app.js): `js/app.js`
- [Trip request](https://github.com/poojayadav297/daa/blob/main/js/app.js): `js/app.js`
- [Plan results](https://github.com/poojayadav297/daa/blob/main/js/app.js): `js/app.js`
- [Search visualization](https://github.com/poojayadav297/daa/blob/main/js/visualization.js): `js/visualization.js`

### Backend API

- [Plan-trip API](https://github.com/poojayadav297/daa/blob/main/backend/server.js): `backend/server.js`
- [Temporary acknowledgment](https://github.com/poojayadav297/daa/blob/main/backend/server.js): `backend/server.js`

### C++ planner

- [Trip and matrix input](https://github.com/poojayadav297/daa/blob/main/cpp/main.cpp): `cpp/main.cpp`
- [Place model](https://github.com/poojayadav297/daa/blob/main/cpp/common.h): `cpp/common.h`
- [Travel planner](https://github.com/poojayadav297/daa/blob/main/cpp/branchAndBound.cpp): `cpp/branchAndBound.cpp`
- [Bound and pruning](https://github.com/poojayadav297/daa/blob/main/cpp/branchAndBound.cpp): `cpp/branchAndBound.cpp`
- [Route and metrics](https://github.com/poojayadav297/daa/blob/main/cpp/branchAndBound.cpp): `cpp/branchAndBound.cpp`
- [Backtracking](https://github.com/poojayadav297/daa/blob/main/README.md): `README.md`
- [Dynamic programming](https://github.com/poojayadav297/daa/blob/main/README.md): `README.md`
- [Algorithm comparison](https://github.com/poojayadav297/daa/blob/main/README.md): `README.md`

### Other components

- **Traveler**

## Connections

- Traveler → Trip form: enters trip (evidence: `js/app.js`)
- Trip form → Trip request: collects details (evidence: `js/app.js`)
- Trip request → Plan-trip API: POSTs trip (evidence: `js/app.js`)
- Plan-trip API → Temporary acknowledgment: returns acknowledgment (evidence: `backend/server.js`)
- Temporary acknowledgment → Plan results: renders response (evidence: `js/app.js`)
- Plan results → Search visualization: passes search tree (evidence: `js/app.js`)
- Traveler → Trip and matrix input: enters trip data (evidence: `cpp/main.cpp`)
- Trip and matrix input → Place model: creates places (evidence: `cpp/main.cpp`)
- Trip and matrix input → Travel planner: constructs and solves (evidence: `cpp/main.cpp`)
- Travel planner → Bound and pruning: uses bounds (evidence: `cpp/branchAndBound.cpp`)
- Trip and matrix input → Route and metrics: displays results (evidence: `cpp/main.cpp`)
- Travel planner → Route and metrics: provides route metrics (evidence: `cpp/branchAndBound.cpp`)
- Algorithm comparison → Backtracking: documents approach (evidence: `README.md`)
- Algorithm comparison → Dynamic programming: documents approach (evidence: `README.md`)
