# gowthamd/travel-planner-vercel architecture

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

- Interactive diagram: https://gitdiagram.com/gowthamd/travel-planner-vercel
- Repository: https://github.com/gowthamd/travel-planner-vercel

## Overview

This repository appears to be a YouTube-video-to-itinerary application: its FastAPI endpoint extracts a video ID, obtains transcript text, asks Gemini for structured itinerary data, and returns the parsed result. The tree also contains a Next.js page and layout, but the page source was not sampled, so its behavior and connection to the API cannot be verified. The API excerpt shows transcript-fetching fallbacks and the Gemini call; details of the yt-dlp helper’s invocation are not visible.

Main entry points: [`api/index.py`](https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py) (Itinerary endpoint), [`src/app/page.tsx`](https://github.com/gowthamd/travel-planner-vercel/blob/master/src/app/page.tsx) (Web page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_web_page["Web page<br/>[page.tsx]"]
  node_web_layout["Root layout<br/>[layout.tsx]"]
end

subgraph group_api["Itinerary API"]
  node_api_endpoint["Itinerary endpoint<br/>[index.py]"]
  node_transcript_logic["Transcript retrieval<br/>[index.py]"]
  node_ytdlp_helper["yt-dlp captions<br/>[index.py]"]
  node_gemini_logic["Itinerary generation<br/>[index.py]"]
end

subgraph group_integrations["External services"]
  node_youtube_transcripts["YouTube transcripts"]
  node_invidious["Invidious instances"]
  node_youtube["YouTube"]
  node_gemini["Google Gemini"]
end

node_user(("User"))

node_user -.->|"visits"| node_web_page
node_user -->|"requests"| node_api_endpoint
node_api_endpoint -->|"fetches transcript"| node_transcript_logic
node_transcript_logic -->|"fetches captions"| node_youtube_transcripts
node_transcript_logic -->|"fallback fetch"| node_invidious
node_ytdlp_helper -->|"downloads captions"| node_youtube
node_api_endpoint -->|"generates itinerary"| node_gemini_logic
node_gemini_logic -->|"requests JSON"| node_gemini

click node_web_page "https://github.com/gowthamd/travel-planner-vercel/blob/master/src/app/page.tsx"
click node_web_layout "https://github.com/gowthamd/travel-planner-vercel/blob/master/src/app/layout.tsx"
click node_api_endpoint "https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py"
click node_transcript_logic "https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py"
click node_ytdlp_helper "https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py"
click node_gemini_logic "https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py"

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_web_page,node_web_layout,node_user toneBlue
class node_api_endpoint,node_transcript_logic,node_ytdlp_helper,node_gemini_logic toneAmber
class node_youtube_transcripts,node_invidious,node_youtube,node_gemini toneMint
```

## Components

### Web application

- [Web page](https://github.com/gowthamd/travel-planner-vercel/blob/master/src/app/page.tsx): `src/app/page.tsx`
- [Root layout](https://github.com/gowthamd/travel-planner-vercel/blob/master/src/app/layout.tsx): `src/app/layout.tsx`

### Itinerary API

- [Itinerary endpoint](https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py): `api/index.py`
- [Transcript retrieval](https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py): `api/index.py`
- [yt-dlp captions](https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py): `api/index.py`
- [Itinerary generation](https://github.com/gowthamd/travel-planner-vercel/blob/master/api/index.py): `api/index.py`

### External services

- **YouTube transcripts**
- **Invidious instances**
- **YouTube**
- **Google Gemini**

### Other components

- **User**

## Connections

- User → Web page: visits
- User → Itinerary endpoint: requests (evidence: `api/index.py`)
- Itinerary endpoint → Transcript retrieval: fetches transcript (evidence: `api/index.py`)
- Transcript retrieval → YouTube transcripts: fetches captions (evidence: `api/index.py`)
- Transcript retrieval → Invidious instances: fallback fetch (evidence: `api/index.py`)
- yt-dlp captions → YouTube: downloads captions (evidence: `api/index.py`)
- Itinerary endpoint → Itinerary generation: generates itinerary (evidence: `api/index.py`)
- Itinerary generation → Google Gemini: requests JSON (evidence: `api/index.py`)
