# lucky007456/voyra-super-ui architecture

> Architecture diagram of the GitHub repository lucky007456/voyra-super-ui, 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/lucky007456/voyra-super-ui
- Repository: https://github.com/lucky007456/voyra-super-ui

## Overview

Voyra is a travel-planning web app. A traveler enters trip preferences, receives an AI-generated itinerary, and can explore its budget, map, hidden gems, and PDF export; saved trips and payment-related routes provide supporting capabilities. The graph also includes destination tips and photos, the dashboard, and the landing experience. Edges reflect indexed imports or shown calls; the planning page’s request to generation is dashed because its network call is not visible in the excerpt.

Main entry points: [`app/plan/page.tsx`](https://github.com/lucky007456/voyra-super-ui/blob/main/app/plan/page.tsx) (Trip planner), [`app/trip/[id]/ItineraryView.tsx`](https://github.com/lucky007456/voyra-super-ui/blob/main/app/trip/%5Bid%5D/ItineraryView.tsx) (Trip itinerary), [`lib/supabaseServer.ts`](https://github.com/lucky007456/voyra-super-ui/blob/main/lib/supabaseServer.ts) (Supabase server client), [`app/api/generate/route.ts`](https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/generate/route.ts) (Itinerary generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_landing["Landing experience"]
  node_dashboard["Trip dashboard<br/>[page.tsx]"]
  node_trip_page["Saved trip page<br/>[page.tsx]"]
end

subgraph group_planning["Trip planning"]
  node_planner["Trip planner<br/>[page.tsx]"]
  node_itinerary["Trip itinerary<br/>[ItineraryView.tsx]"]
  node_budget["Budget view<br/>[BudgetView.tsx]"]
  node_gems["Hidden gems<br/>[HiddenGemsView.tsx]"]
  node_map["Map view<br/>[MapView.tsx]"]
  node_pdf["PDF export<br/>[PDFExport.tsx]"]
  node_tripdata["Trip types and parsing<br/>[types.ts]"]
  node_ui["Planning UI primitives"]
end

subgraph group_services["API and integrations"]
  node_generate["Itinerary generation<br/>[route.ts]"]
  node_tips["Insider tips<br/>[route.ts]"]
  node_photos["Destination photos<br/>[route.ts]"]
  node_trips["Trip API<br/>[route.ts]"]
  node_checkout["Checkout API<br/>[route.ts]"]
  node_webhook["Payment webhook<br/>[route.ts]"]
  node_groq["Groq client<br/>[groq.ts]"]
  node_unsplash["Unsplash client<br/>[unsplash.ts]"]
  node_razorpay["Razorpay client<br/>[razorpay.ts]"]
end

subgraph group_identity["Identity and data"]
  node_supabase["Supabase server client<br/>[supabaseServer.ts]"]
  node_supabase_server["Supabase SSR client<br/>[server.ts]"]
  node_clerk["Clerk identity"]
end

node_traveler(("Traveler"))

node_traveler -->|"visits"| node_landing
node_traveler -.->|"plans trip"| node_planner
node_planner -.->|"requests itinerary"| node_generate
node_generate -->|"generates with"| node_groq
node_planner -->|"parses response"| node_tripdata
node_planner -->|"uses controls"| node_ui
node_planner -->|"renders"| node_budget
node_planner -->|"renders"| node_gems
node_planner -->|"renders"| node_map
node_planner -->|"renders"| node_pdf
node_itinerary -->|"renders"| node_budget
node_itinerary -->|"renders"| node_gems
node_itinerary -->|"renders"| node_map
node_itinerary -->|"renders"| node_pdf
node_tips -->|"generates tips"| node_groq
node_photos -->|"fetches photos"| node_unsplash
node_checkout -->|"creates checkout"| node_razorpay
node_webhook -->|"updates data"| node_supabase
node_trips -->|"accesses trips"| node_supabase
node_trip_page -->|"loads trip"| node_supabase
node_supabase -->|"creates client"| node_supabase_server
node_generate -->|"checks identity"| node_clerk
node_dashboard -->|"uses trip types"| node_tripdata
node_trip_page -->|"renders"| node_itinerary

click node_landing "https://github.com/lucky007456/voyra-super-ui/tree/main/components/landing"
click node_planner "https://github.com/lucky007456/voyra-super-ui/blob/main/app/plan/page.tsx"
click node_itinerary "https://github.com/lucky007456/voyra-super-ui/blob/main/app/trip/%5Bid%5D/ItineraryView.tsx"
click node_budget "https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/BudgetView.tsx"
click node_gems "https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/HiddenGemsView.tsx"
click node_map "https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/MapView.tsx"
click node_pdf "https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/PDFExport.tsx"
click node_tripdata "https://github.com/lucky007456/voyra-super-ui/blob/main/lib/types.ts"
click node_ui "https://github.com/lucky007456/voyra-super-ui/tree/main/components/ui"
click node_dashboard "https://github.com/lucky007456/voyra-super-ui/blob/main/app/dashboard/page.tsx"
click node_generate "https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/generate/route.ts"
click node_tips "https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/tips/route.ts"
click node_photos "https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/photos/route.ts"
click node_trips "https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/trips/route.ts"
click node_checkout "https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/checkout/route.ts"
click node_webhook "https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/webhook/route.ts"
click node_groq "https://github.com/lucky007456/voyra-super-ui/blob/main/lib/groq.ts"
click node_unsplash "https://github.com/lucky007456/voyra-super-ui/blob/main/lib/unsplash.ts"
click node_razorpay "https://github.com/lucky007456/voyra-super-ui/blob/main/lib/razorpay.ts"
click node_trip_page "https://github.com/lucky007456/voyra-super-ui/blob/main/app/trip/%5Bid%5D/page.tsx"
click node_supabase "https://github.com/lucky007456/voyra-super-ui/blob/main/lib/supabaseServer.ts"
click node_supabase_server "https://github.com/lucky007456/voyra-super-ui/blob/main/utils/supabase/server.ts"

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_landing,node_dashboard,node_trip_page toneBlue
class node_planner,node_itinerary,node_budget,node_gems,node_map,node_pdf,node_tripdata,node_ui toneAmber
class node_generate,node_tips,node_photos,node_trips,node_checkout,node_webhook,node_groq,node_unsplash,node_razorpay toneMint
class node_supabase,node_supabase_server,node_clerk toneRose
class node_traveler toneIndigo
```

## Components

### Web experience

- [Landing experience](https://github.com/lucky007456/voyra-super-ui/tree/main/components/landing): `components/landing`
- [Trip dashboard](https://github.com/lucky007456/voyra-super-ui/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Saved trip page](https://github.com/lucky007456/voyra-super-ui/blob/main/app/trip/%5Bid%5D/page.tsx): `app/trip/[id]/page.tsx`

### Trip planning

- [Trip planner](https://github.com/lucky007456/voyra-super-ui/blob/main/app/plan/page.tsx): `app/plan/page.tsx`
- [Trip itinerary](https://github.com/lucky007456/voyra-super-ui/blob/main/app/trip/%5Bid%5D/ItineraryView.tsx): `app/trip/[id]/ItineraryView.tsx`
- [Budget view](https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/BudgetView.tsx): `components/trip/BudgetView.tsx`
- [Hidden gems](https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/HiddenGemsView.tsx): `components/trip/HiddenGemsView.tsx`
- [Map view](https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/MapView.tsx): `components/trip/MapView.tsx`
- [PDF export](https://github.com/lucky007456/voyra-super-ui/blob/main/components/trip/PDFExport.tsx): `components/trip/PDFExport.tsx`
- [Trip types and parsing](https://github.com/lucky007456/voyra-super-ui/blob/main/lib/types.ts): `lib/types.ts`
- [Planning UI primitives](https://github.com/lucky007456/voyra-super-ui/tree/main/components/ui): `components/ui`

### API and integrations

- [Itinerary generation](https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/generate/route.ts): `app/api/generate/route.ts`
- [Insider tips](https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/tips/route.ts): `app/api/tips/route.ts`
- [Destination photos](https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/photos/route.ts): `app/api/photos/route.ts`
- [Trip API](https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/trips/route.ts): `app/api/trips/route.ts`
- [Checkout API](https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/checkout/route.ts): `app/api/checkout/route.ts`
- [Payment webhook](https://github.com/lucky007456/voyra-super-ui/blob/main/app/api/webhook/route.ts): `app/api/webhook/route.ts`
- [Groq client](https://github.com/lucky007456/voyra-super-ui/blob/main/lib/groq.ts): `lib/groq.ts`
- [Unsplash client](https://github.com/lucky007456/voyra-super-ui/blob/main/lib/unsplash.ts): `lib/unsplash.ts`
- [Razorpay client](https://github.com/lucky007456/voyra-super-ui/blob/main/lib/razorpay.ts): `lib/razorpay.ts`

### Identity and data

- [Supabase server client](https://github.com/lucky007456/voyra-super-ui/blob/main/lib/supabaseServer.ts): `lib/supabaseServer.ts`
- [Supabase SSR client](https://github.com/lucky007456/voyra-super-ui/blob/main/utils/supabase/server.ts): `utils/supabase/server.ts`
- **Clerk identity**

### Other components

- **Traveler**

## Connections

- Traveler → Landing experience: visits
- Traveler → Trip planner: plans trip
- Trip planner → Itinerary generation: requests itinerary
- Itinerary generation → Groq client: generates with (evidence: `app/api/generate/route.ts`)
- Trip planner → Trip types and parsing: parses response (evidence: `app/plan/page.tsx`)
- Trip planner → Planning UI primitives: uses controls (evidence: `app/plan/page.tsx`)
- Trip planner → Budget view: renders (evidence: `app/plan/page.tsx`)
- Trip planner → Hidden gems: renders (evidence: `app/plan/page.tsx`)
- Trip planner → Map view: renders (evidence: `app/plan/page.tsx`)
- Trip planner → PDF export: renders (evidence: `app/plan/page.tsx`)
- Trip itinerary → Budget view: renders (evidence: `app/trip/[id]/ItineraryView.tsx`)
- Trip itinerary → Hidden gems: renders (evidence: `app/trip/[id]/ItineraryView.tsx`)
- Trip itinerary → Map view: renders (evidence: `app/trip/[id]/ItineraryView.tsx`)
- Trip itinerary → PDF export: renders (evidence: `app/trip/[id]/ItineraryView.tsx`)
- Insider tips → Groq client: generates tips (evidence: `app/api/tips/route.ts`)
- Destination photos → Unsplash client: fetches photos (evidence: `app/api/photos/route.ts`)
- Checkout API → Razorpay client: creates checkout (evidence: `app/api/checkout/route.ts`)
- Payment webhook → Supabase server client: updates data (evidence: `app/api/webhook/route.ts`)
- Trip API → Supabase server client: accesses trips (evidence: `app/api/trips/route.ts`)
- Saved trip page → Supabase server client: loads trip (evidence: `app/trip/[id]/page.tsx`)
- Supabase server client → Supabase SSR client: creates client (evidence: `lib/supabaseServer.ts`)
- Itinerary generation → Clerk identity: checks identity (evidence: `app/api/generate/route.ts`)
- Trip dashboard → Trip types and parsing: uses trip types (evidence: `app/dashboard/page.tsx`)
- Saved trip page → Trip itinerary: renders (evidence: `app/trip/[id]/page.tsx`)
