# krishna-prasad-ceo/travellimitexceeded architecture

> Architecture diagram of the GitHub repository krishna-prasad-ceo/travellimitexceeded, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krishna-prasad-ceo/travellimitexceeded
- Repository: https://github.com/krishna-prasad-ceo/travellimitexceeded

## Overview

#### Purpose and Scope
Travel Limit Exceeded (TLE) is a React single-page travel-planning frontend. It supports AI-assisted itinerary creation from free-form prompts or photos, trip discovery, trip detail/planning views, and collaborative participation workflows. This branch contains the Vite frontend; the Spring Boot backend described in the README is not present in this tree.

#### Application Bootstrap and Navigation
The browser app mounts through `index.tsx` and is orchestrated by `App.tsx`. `App.tsx` is the primary client-side control boundary: it selects pages/views based on application state and coordinates shared navigation. The global navigation surface is implemented in `components/Navbar.tsx`; initial presentation and visual entry behavior are handled by `components/IntroAnimation.tsx` and `components/Hero.tsx`.

#### Authentication and Backend Boundary
Authentication and hosted data access are centered on Supabase via `supabaseClient.ts`. Login and registration are isolated UI entry points in `components/LoginPage.tsx` and `components/RegisterPage.tsx`. Supabase provides the frontend-facing boundary for Authentication, PostgreSQL-backed data, and realtime collaboration events; the separate Java/Spring backend is referenced by the README but absent from this checkout.

#### Trip Creation Paths
Trip creation has two AI-assisted inputs:
- Text-led planning: `components/CreateTripPage.tsx` gathers trip intent and routes into planning behavior exposed by `components/TripPlanner.tsx`.
- Image-led planning: `components/PhotoToTrip.tsx` accepts travel imagery and turns it into a draft trip concept.

Both rely on `geminiService.ts`, the integration boundary for Google Gemini. Generated results become editable structured itinerary data rather than final booking actions.

#### Itinerary and Trip Lifecycle
`components/TripPlanner.tsx` is the likely central editing workspace for refining AI-generated or manually created plans. `components/ItineraryView.tsx` renders the day-by-day itinerary representation, while `components/TripDetailsPage.tsx` provides the broader persisted-trip view. Shared domain shapes are defined in `types.ts`, which should remain the contract between UI state, Gemini output normalization, and Supabase/backend payloads.

#### Discovery, Ownership, and Collaboration
Trip discovery and personal trip management are separated into `components/ExploreTripsPage.tsx` and `components/MyTripsPage.tsx`. Collaboration is represented explicitly by `components/TripParticipantsPage.tsx`, where creator-controlled membership/join-request behavior belongs. Realtime updates from Supabase are architecturally important for reflecting participant and trip availability changes without polling.

#### Runtime and External Services
The frontend runs on React, TypeScript, and Vite, configured by `package.json` and `vite.config.ts`; production hosting is stated as Netlify. Visual interactions use Tailwind CSS plus GSAP, Framer Motion, and React Three Fiber/Drei per the README. External dependencies with material product impact are Supabase (auth, PostgreSQL, realtime), Google Gemini (text/image itinerary generation), and the separately maintained Java 17/Spring Boot service.

Main entry points: [`App.tsx`](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/App.tsx) (App Controller), [`components/TripPlanner.tsx`](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripPlanner.tsx) (Trip Planner), [`supabaseClient.ts`](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/supabaseClient.ts) (Supabase Client), [`components/TripDetailsPage.tsx`](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripDetailsPage.tsx) (Trip Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Client App"]
  node_bootstrap(("Browser Bootstrap<br/>React entry<br/>[index.tsx]"))
  node_app_shell["App Controller<br/>client navigation<br/>[App.tsx]"]
  node_navbar["Global Navigation<br/>shared UI<br/>[Navbar.tsx]"]
  node_intro["Intro Animation<br/>landing UI<br/>[IntroAnimation.tsx]"]
  node_hero["Hero<br/>landing UI<br/>[Hero.tsx]"]
  node_login["Login<br/>auth UI<br/>[LoginPage.tsx]"]
  node_register["Registration<br/>auth UI<br/>[RegisterPage.tsx]"]
  node_vite["Vite Runtime<br/>frontend build runtime<br/>[vite.config.ts]"]
end

subgraph group_trip["Trip Experience"]
  node_create_trip["Text Trip Creation<br/>prompt intake<br/>[CreateTripPage.tsx]"]
  node_photo_trip["Photo Trip Creation<br/>image intake<br/>[PhotoToTrip.tsx]"]
  node_planner["Trip Planner<br/>editing workspace<br/>[TripPlanner.tsx]"]
  node_itinerary["Itinerary View<br/>day-by-day UI<br/>[ItineraryView.tsx]"]
  node_trip_details["Trip Details<br/>persisted trip UI"]
  node_explore["Trip Discovery<br/>explore UI"]
  node_my_trips["My Trips<br/>ownership UI<br/>[MyTripsPage.tsx]"]
  node_participants["Participants<br/>collaboration UI"]
  node_domain_types["Trip Domain Contract<br/>TypeScript types<br/>[types.ts]"]
end

subgraph group_services["Service Boundaries"]
  node_gemini{{"Google Gemini<br/>AI integration<br/>[geminiService.ts]"}}
  node_supabase_client["Supabase Client<br/>data gateway<br/>[supabaseClient.ts]"]
  node_supabase[("Supabase Platform<br/>auth, PostgreSQL, realtime")]
  node_spring_backend{{"External Spring Backend<br/>separate service"}}
end

node_bootstrap -->|"mounts"| node_app_shell
node_vite -->|"serves"| node_bootstrap
node_app_shell -->|"renders"| node_navbar
node_app_shell -->|"renders"| node_intro
node_app_shell -->|"renders"| node_hero
node_app_shell -->|"navigates to"| node_login
node_app_shell -->|"navigates to"| node_register
node_app_shell -->|"navigates to"| node_create_trip
node_app_shell -->|"navigates to"| node_photo_trip
node_app_shell -->|"navigates to"| node_explore
node_app_shell -->|"navigates to"| node_my_trips
node_create_trip -->|"starts planning"| node_planner
node_photo_trip -->|"creates draft"| node_planner
node_create_trip -->|"sends prompt"| node_gemini
node_photo_trip -->|"sends image"| node_gemini
node_gemini -->|"returns itinerary draft"| node_planner
node_planner -->|"renders plan"| node_itinerary
node_planner -->|"persists trip"| node_trip_details
node_trip_details -->|"manages collaborators"| node_participants
node_explore -->|"opens trip"| node_trip_details
node_my_trips -->|"opens owned trip"| node_trip_details
node_planner -->|"uses"| node_domain_types
node_gemini -->|"normalizes to"| node_domain_types
node_trip_details -->|"uses"| node_domain_types
node_login -->|"authenticates"| node_supabase_client
node_register -->|"registers"| node_supabase_client
node_planner -->|"stores trip"| node_supabase_client
node_explore -->|"loads trips"| node_supabase_client
node_my_trips -->|"loads owned trips"| node_supabase_client
node_participants -->|"membership and realtime"| node_supabase_client
node_supabase_client -->|"accesses"| node_supabase
node_supabase -.->|"realtime updates"| node_participants

click node_bootstrap "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/index.tsx"
click node_app_shell "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/App.tsx"
click node_navbar "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/Navbar.tsx"
click node_intro "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/IntroAnimation.tsx"
click node_hero "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/Hero.tsx"
click node_login "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/LoginPage.tsx"
click node_register "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/RegisterPage.tsx"
click node_create_trip "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/CreateTripPage.tsx"
click node_photo_trip "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/PhotoToTrip.tsx"
click node_planner "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripPlanner.tsx"
click node_itinerary "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/ItineraryView.tsx"
click node_trip_details "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripDetailsPage.tsx"
click node_explore "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/ExploreTripsPage.tsx"
click node_my_trips "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/MyTripsPage.tsx"
click node_participants "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripParticipantsPage.tsx"
click node_domain_types "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/types.ts"
click node_gemini "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/geminiService.ts"
click node_supabase_client "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/supabaseClient.ts"
click node_vite "https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/vite.config.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_bootstrap,node_app_shell,node_navbar,node_intro,node_hero,node_login,node_register,node_vite toneBlue
class node_create_trip,node_photo_trip,node_planner,node_itinerary,node_trip_details,node_explore,node_my_trips,node_participants,node_domain_types toneAmber
class node_gemini,node_supabase_client,node_supabase,node_spring_backend toneMint
```

## Components

### Client App

- [Browser Bootstrap](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/index.tsx): React entry · `index.tsx`
- [App Controller](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/App.tsx): client navigation · Selects active pages and coordinates shared navigation. · `App.tsx`
- [Global Navigation](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/Navbar.tsx): shared UI · `components/Navbar.tsx`
- [Intro Animation](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/IntroAnimation.tsx): landing UI · `components/IntroAnimation.tsx`
- [Hero](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/Hero.tsx): landing UI · `components/Hero.tsx`
- [Login](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/LoginPage.tsx): auth UI · `components/LoginPage.tsx`
- [Registration](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/RegisterPage.tsx): auth UI · `components/RegisterPage.tsx`
- [Vite Runtime](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/vite.config.ts): frontend build runtime · `vite.config.ts`

### Trip Experience

- [Text Trip Creation](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/CreateTripPage.tsx): prompt intake · `components/CreateTripPage.tsx`
- [Photo Trip Creation](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/PhotoToTrip.tsx): image intake · `components/PhotoToTrip.tsx`
- [Trip Planner](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripPlanner.tsx): editing workspace · Refines generated or manually created trip plans. · `components/TripPlanner.tsx`
- [Itinerary View](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/ItineraryView.tsx): day-by-day UI · `components/ItineraryView.tsx`
- [Trip Details](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripDetailsPage.tsx): persisted trip UI · `components/TripDetailsPage.tsx`
- [Trip Discovery](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/ExploreTripsPage.tsx): explore UI · `components/ExploreTripsPage.tsx`
- [My Trips](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/MyTripsPage.tsx): ownership UI · `components/MyTripsPage.tsx`
- [Participants](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/components/TripParticipantsPage.tsx): collaboration UI · Manages membership and join requests. · `components/TripParticipantsPage.tsx`
- [Trip Domain Contract](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/types.ts): TypeScript types · Shared contract for UI state, generated plans, and persisted payloads. · `types.ts`

### Service Boundaries

- [Google Gemini](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/geminiService.ts): AI integration · Generates text- and image-led itinerary drafts. · `geminiService.ts`
- [Supabase Client](https://github.com/krishna-prasad-ceo/travellimitexceeded/blob/main/supabaseClient.ts): data gateway · Frontend boundary for authentication, data, and realtime subscriptions. · `supabaseClient.ts`
- **Supabase Platform**: auth, PostgreSQL, realtime
- **External Spring Backend**: separate service · Referenced by the README but absent from this checkout.

## Connections

- Browser Bootstrap → App Controller: mounts
- Vite Runtime → Browser Bootstrap: serves
- App Controller → Global Navigation: renders
- App Controller → Intro Animation: renders
- App Controller → Hero: renders
- App Controller → Login: navigates to
- App Controller → Registration: navigates to
- App Controller → Text Trip Creation: navigates to
- App Controller → Photo Trip Creation: navigates to
- App Controller → Trip Discovery: navigates to
- App Controller → My Trips: navigates to
- Text Trip Creation → Trip Planner: starts planning
- Photo Trip Creation → Trip Planner: creates draft
- Text Trip Creation → Google Gemini: sends prompt
- Photo Trip Creation → Google Gemini: sends image
- Google Gemini → Trip Planner: returns itinerary draft
- Trip Planner → Itinerary View: renders plan
- Trip Planner → Trip Details: persists trip
- Trip Details → Participants: manages collaborators
- Trip Discovery → Trip Details: opens trip
- My Trips → Trip Details: opens owned trip
- Trip Planner → Trip Domain Contract: uses
- Google Gemini → Trip Domain Contract: normalizes to
- Trip Details → Trip Domain Contract: uses
- Login → Supabase Client: authenticates
- Registration → Supabase Client: registers
- Trip Planner → Supabase Client: stores trip
- Trip Discovery → Supabase Client: loads trips
- My Trips → Supabase Client: loads owned trips
- Participants → Supabase Client: membership and realtime
- Supabase Client → Supabase Platform: accesses
- Supabase Platform → Participants: realtime updates
