# baddamakshaya01-star/studio architecture

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

- Interactive diagram: https://gitdiagram.com/baddamakshaya01-star/studio
- Repository: https://github.com/baddamakshaya01-star/studio

## Overview

BharatVista is a Next.js tourism discovery starter: visitors browse destinations by category, open detailed spot pages, or submit interests, trip length, and budget to receive an AI-generated itinerary. The map separates destination content and presentation from itinerary input, server-side orchestration, and AI generation, with shared UI support. Connections follow shown imports, calls, and navigation; several planner and layout relationships are supported by the source index, while no persistent store or named external AI service is evidenced.

Main entry points: [`src/app/itinerary-planner/itinerary-form.tsx`](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/itinerary-planner/itinerary-form.tsx) (Itinerary form), [`src/app/page.tsx`](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/page.tsx) (Destination home), [`src/app/layout.tsx`](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/layout.tsx) (App layout), [`src/components/ui/toaster.tsx`](https://github.com/baddamakshaya01-star/studio/blob/main/src/components/ui/toaster.tsx) (Toast renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Destination discovery"]
  node_home["Destination home<br/>[page.tsx]"]
  node_spot_data["Spot catalog<br/>[tourist-spots.ts]"]
  node_spot_card["Destination card"]
  node_spot_detail["Spot details<br/>[page.tsx]"]
  node_spot_types["Spot types<br/>[types.ts]"]
end

subgraph group_planning["Itinerary planning"]
  node_planner_page["Planner page<br/>[page.tsx]"]
  node_itinerary_form["Itinerary form<br/>[itinerary-form.tsx]"]
  node_planner_actions["Planner actions<br/>[actions.ts]"]
end

subgraph group_ai["AI generation"]
  node_suggestion_flow["Suggestion flow"]
  node_genkit["Genkit runtime<br/>[genkit.ts]"]
end

subgraph group_shared["Shared presentation"]
  node_site_header["Site header<br/>[header.tsx]"]
  node_site_layout["App layout<br/>[layout.tsx]"]
  node_ui_primitives["UI primitives"]
  node_toast_hook["Toast state hook<br/>[use-toast.ts]"]
  node_toaster["Toast renderer<br/>[toaster.tsx]"]
  node_toast_ui["Toast component<br/>[toast.tsx]"]
  node_footer["Site footer<br/>[footer.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"submits preferences"| node_itinerary_form
node_home -->|"filters catalog"| node_spot_data
node_home -->|"renders cards"| node_spot_card
node_spot_card -->|"links to slug"| node_spot_detail
node_spot_detail -->|"looks up spot"| node_spot_data
node_spot_data -->|"uses types"| node_spot_types
node_planner_page -->|"renders form"| node_itinerary_form
node_itinerary_form -->|"submits form action"| node_planner_actions
node_planner_actions -->|"requests suggestion"| node_suggestion_flow
node_suggestion_flow -->|"defines AI flow"| node_genkit
node_itinerary_form -->|"renders controls"| node_ui_primitives
node_itinerary_form -->|"reports errors"| node_toast_hook
node_site_header -->|"links home"| node_home
node_site_header -->|"links planner"| node_planner_page
node_site_layout -->|"renders header"| node_site_header
node_site_layout -->|"renders footer"| node_footer
node_site_layout -->|"renders toaster"| node_toaster
node_toaster -->|"subscribes to state"| node_toast_hook
node_toaster -->|"renders toasts"| node_toast_ui

click node_home "https://github.com/baddamakshaya01-star/studio/blob/main/src/app/page.tsx"
click node_spot_data "https://github.com/baddamakshaya01-star/studio/blob/main/src/lib/tourist-spots.ts"
click node_spot_card "https://github.com/baddamakshaya01-star/studio/blob/main/src/components/tourist-spot-card.tsx"
click node_spot_detail "https://github.com/baddamakshaya01-star/studio/blob/main/src/app/spots/%5Bslug%5D/page.tsx"
click node_spot_types "https://github.com/baddamakshaya01-star/studio/blob/main/src/lib/types.ts"
click node_planner_page "https://github.com/baddamakshaya01-star/studio/blob/main/src/app/itinerary-planner/page.tsx"
click node_itinerary_form "https://github.com/baddamakshaya01-star/studio/blob/main/src/app/itinerary-planner/itinerary-form.tsx"
click node_planner_actions "https://github.com/baddamakshaya01-star/studio/blob/main/src/app/itinerary-planner/actions.ts"
click node_suggestion_flow "https://github.com/baddamakshaya01-star/studio/blob/main/src/ai/flows/personalized-itinerary-suggestion.ts"
click node_genkit "https://github.com/baddamakshaya01-star/studio/blob/main/src/ai/genkit.ts"
click node_site_header "https://github.com/baddamakshaya01-star/studio/blob/main/src/components/layout/header.tsx"
click node_site_layout "https://github.com/baddamakshaya01-star/studio/blob/main/src/app/layout.tsx"
click node_ui_primitives "https://github.com/baddamakshaya01-star/studio/tree/main/src/components/ui"
click node_toast_hook "https://github.com/baddamakshaya01-star/studio/blob/main/src/hooks/use-toast.ts"
click node_toaster "https://github.com/baddamakshaya01-star/studio/blob/main/src/components/ui/toaster.tsx"
click node_toast_ui "https://github.com/baddamakshaya01-star/studio/blob/main/src/components/ui/toast.tsx"
click node_footer "https://github.com/baddamakshaya01-star/studio/blob/main/src/components/layout/footer.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_home,node_spot_data,node_spot_card,node_spot_detail,node_spot_types toneBlue
class node_planner_page,node_itinerary_form,node_planner_actions toneAmber
class node_suggestion_flow,node_genkit toneMint
class node_site_header,node_site_layout,node_ui_primitives,node_toast_hook,node_toaster,node_toast_ui,node_footer toneRose
class node_visitor toneIndigo
```

## Components

### Destination discovery

- [Destination home](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Spot catalog](https://github.com/baddamakshaya01-star/studio/blob/main/src/lib/tourist-spots.ts): `src/lib/tourist-spots.ts`
- [Destination card](https://github.com/baddamakshaya01-star/studio/blob/main/src/components/tourist-spot-card.tsx): `src/components/tourist-spot-card.tsx`
- [Spot details](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/spots/%5Bslug%5D/page.tsx): `src/app/spots/[slug]/page.tsx`
- [Spot types](https://github.com/baddamakshaya01-star/studio/blob/main/src/lib/types.ts): `src/lib/types.ts`

### Itinerary planning

- [Planner page](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/itinerary-planner/page.tsx): `src/app/itinerary-planner/page.tsx`
- [Itinerary form](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/itinerary-planner/itinerary-form.tsx): `src/app/itinerary-planner/itinerary-form.tsx`
- [Planner actions](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/itinerary-planner/actions.ts): `src/app/itinerary-planner/actions.ts`

### AI generation

- [Suggestion flow](https://github.com/baddamakshaya01-star/studio/blob/main/src/ai/flows/personalized-itinerary-suggestion.ts): `src/ai/flows/personalized-itinerary-suggestion.ts`
- [Genkit runtime](https://github.com/baddamakshaya01-star/studio/blob/main/src/ai/genkit.ts): `src/ai/genkit.ts`

### Shared presentation

- [Site header](https://github.com/baddamakshaya01-star/studio/blob/main/src/components/layout/header.tsx): `src/components/layout/header.tsx`
- [App layout](https://github.com/baddamakshaya01-star/studio/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [UI primitives](https://github.com/baddamakshaya01-star/studio/tree/main/src/components/ui): `src/components/ui`
- [Toast state hook](https://github.com/baddamakshaya01-star/studio/blob/main/src/hooks/use-toast.ts): `src/hooks/use-toast.ts`
- [Toast renderer](https://github.com/baddamakshaya01-star/studio/blob/main/src/components/ui/toaster.tsx): `src/components/ui/toaster.tsx`
- [Toast component](https://github.com/baddamakshaya01-star/studio/blob/main/src/components/ui/toast.tsx): `src/components/ui/toast.tsx`
- [Site footer](https://github.com/baddamakshaya01-star/studio/blob/main/src/components/layout/footer.tsx): `src/components/layout/footer.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Destination home: opens (evidence: `src/app/page.tsx`)
- Visitor → Itinerary form: submits preferences (evidence: `src/app/itinerary-planner/itinerary-form.tsx`)
- Destination home → Spot catalog: filters catalog (evidence: `src/app/page.tsx`)
- Destination home → Destination card: renders cards (evidence: `src/app/page.tsx`)
- Destination card → Spot details: links to slug (evidence: `src/components/tourist-spot-card.tsx`)
- Spot details → Spot catalog: looks up spot (evidence: `src/app/spots/[slug]/page.tsx`)
- Spot catalog → Spot types: uses types (evidence: `src/lib/tourist-spots.ts`)
- Planner page → Itinerary form: renders form (evidence: `src/app/itinerary-planner/page.tsx`)
- Itinerary form → Planner actions: submits form action (evidence: `src/app/itinerary-planner/itinerary-form.tsx`)
- Planner actions → Suggestion flow: requests suggestion (evidence: `src/app/itinerary-planner/actions.ts`)
- Suggestion flow → Genkit runtime: defines AI flow (evidence: `src/ai/flows/personalized-itinerary-suggestion.ts`)
- Itinerary form → UI primitives: renders controls (evidence: `src/app/itinerary-planner/itinerary-form.tsx`)
- Itinerary form → Toast state hook: reports errors (evidence: `src/app/itinerary-planner/itinerary-form.tsx`)
- Site header → Destination home: links home (evidence: `src/components/layout/header.tsx`)
- Site header → Planner page: links planner (evidence: `src/components/layout/header.tsx`)
- App layout → Site header: renders header (evidence: `src/app/layout.tsx`)
- App layout → Site footer: renders footer (evidence: `src/app/layout.tsx`)
- App layout → Toast renderer: renders toaster (evidence: `src/app/layout.tsx`)
- Toast renderer → Toast state hook: subscribes to state (evidence: `src/components/ui/toaster.tsx`)
- Toast renderer → Toast component: renders toasts (evidence: `src/components/ui/toaster.tsx`)
