# samikannup53/flytix-frontend architecture

> Architecture diagram of the GitHub repository samikannup53/flytix-frontend, 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/samikannup53/flytix-frontend
- Repository: https://github.com/samikannup53/flytix-frontend

## Overview

FlyTix is a React flight-booking frontend for searching and comparing flights, then reserving and paying for a selected itinerary. The main journey runs from shared search controls through flight results and validation to booking, payment, and confirmation; authenticated users can also manage bookings, profiles, and saved travellers. Authentication and airport lookup call the backend directly, while the README documents Razorpay payments and booking alerts. Some page implementations were not sampled, so links for those capabilities are documented rather than inferred from unseen calls.

Main entry points: [`src/routes/UserRoutes.jsx`](https://github.com/samikannup53/flytix-frontend/blob/main/src/routes/UserRoutes.jsx) (User routes), [`src/modules/user/pages/flightPage/Flights.jsx`](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/flightPage/Flights.jsx) (Flight search results), [`src/modules/user/pages/authPages/Login.jsx`](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/authPages/Login.jsx) (Login and register), [`src/modules/user/pages/paymentPage/Payment.jsx`](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/paymentPage/Payment.jsx) (Payment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and access"]
  node_app["React app<br/>[App.jsx]"]
  node_routes["User routes<br/>[UserRoutes.jsx]"]
  node_private["Private access<br/>[PrivateRoutes.jsx]"]
end

subgraph group_search["Flight discovery"]
  node_landing["Landing page<br/>[Landing.jsx]"]
  node_searchbar["Shared search bar"]
  node_searchlogic["Search logic"]
  node_airports["Airport lookup<br/>[airportService.js]"]
  node_flights["Flight search results<br/>[Flights.jsx]"]
  node_results["Results and comparison<br/>[FlightResults.jsx]"]
end

subgraph group_reservation["Reservation journey"]
  node_booking["Booking details<br/>[Booking.jsx]"]
  node_payment["Payment<br/>[Payment.jsx]"]
  node_confirmation["Booking confirmation<br/>[BookingConfirm.jsx]"]
end

subgraph group_account["Identity and account"]
  node_auth["Auth context<br/>[AuthContext.jsx]"]
  node_login["Login and register<br/>[Login.jsx]"]
  node_profile["Profile and travellers<br/>[Profile.jsx]"]
  node_bookings["Booking history<br/>[MyBookings.jsx]"]
end

node_traveller(("Traveller"))
node_backend{{"FlyTix API"}}
node_razorpay{{"Razorpay"}}

node_traveller -->|"uses"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_landing
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_flights
node_routes -->|"guards"| node_private
node_private -->|"checks"| node_auth
node_routes -->|"routes to"| node_booking
node_routes -->|"routes to"| node_payment
node_routes -->|"routes to"| node_confirmation
node_routes -->|"routes to"| node_bookings
node_routes -->|"routes to"| node_profile
node_landing -.->|"uses"| node_searchbar
node_flights -->|"renders"| node_searchbar
node_searchbar -->|"uses"| node_searchlogic
node_searchlogic -->|"fetches airports"| node_airports
node_flights -->|"searches and validates"| node_backend
node_flights -->|"renders"| node_results
node_results -.->|"starts booking"| node_booking
node_booking -->|"loads flight and initiates"| node_backend
node_login -->|"refreshes user"| node_auth
node_login -->|"registers"| node_backend
node_auth -->|"authenticates"| node_backend
node_payment -.->|"processes payment"| node_razorpay
node_payment -.->|"confirms booking"| node_confirmation
node_traveller -->|"searches and compares"| node_flights
node_traveller -->|"registers or logs in"| node_login
node_traveller -->|"reviews bookings"| node_bookings
node_traveller -.->|"manages account"| node_profile

click node_app "https://github.com/samikannup53/flytix-frontend/blob/main/src/App.jsx"
click node_routes "https://github.com/samikannup53/flytix-frontend/blob/main/src/routes/UserRoutes.jsx"
click node_private "https://github.com/samikannup53/flytix-frontend/blob/main/src/routes/PrivateRoutes.jsx"
click node_auth "https://github.com/samikannup53/flytix-frontend/blob/main/src/shared/contexts/AuthContext.jsx"
click node_login "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/authPages/Login.jsx"
click node_profile "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/profilePage/Profile.jsx"
click node_bookings "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/bookingsDashboard/MyBookings.jsx"
click node_landing "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/landingPage/Landing.jsx"
click node_searchbar "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/components/FlightSearchBarShared.jsx"
click node_searchlogic "https://github.com/samikannup53/flytix-frontend/blob/main/src/shared/hooks/useFlightSearchLogic.js"
click node_airports "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/services/airportService.js"
click node_flights "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/flightPage/Flights.jsx"
click node_results "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/flightPage/sections/FlightResults.jsx"
click node_booking "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/bookingPage/Booking.jsx"
click node_payment "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/paymentPage/Payment.jsx"
click node_confirmation "https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/confirmPage/BookingConfirm.jsx"

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_app,node_routes,node_private toneBlue
class node_landing,node_searchbar,node_searchlogic,node_airports,node_flights,node_results toneAmber
class node_booking,node_payment,node_confirmation,node_backend toneMint
class node_auth,node_login,node_profile,node_bookings toneRose
class node_traveller,node_razorpay toneIndigo
```

## Components

### App and access

- [React app](https://github.com/samikannup53/flytix-frontend/blob/main/src/App.jsx): `src/App.jsx`
- [User routes](https://github.com/samikannup53/flytix-frontend/blob/main/src/routes/UserRoutes.jsx): `src/routes/UserRoutes.jsx`
- [Private access](https://github.com/samikannup53/flytix-frontend/blob/main/src/routes/PrivateRoutes.jsx): `src/routes/PrivateRoutes.jsx`

### Flight discovery

- [Landing page](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/landingPage/Landing.jsx): `src/modules/user/pages/landingPage/Landing.jsx`
- [Shared search bar](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/components/FlightSearchBarShared.jsx): `src/modules/user/components/FlightSearchBarShared.jsx`
- [Search logic](https://github.com/samikannup53/flytix-frontend/blob/main/src/shared/hooks/useFlightSearchLogic.js): `src/shared/hooks/useFlightSearchLogic.js`
- [Airport lookup](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/services/airportService.js): `src/modules/user/services/airportService.js`
- [Flight search results](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/flightPage/Flights.jsx): `src/modules/user/pages/flightPage/Flights.jsx`
- [Results and comparison](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/flightPage/sections/FlightResults.jsx): `src/modules/user/pages/flightPage/sections/FlightResults.jsx`

### Reservation journey

- [Booking details](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/bookingPage/Booking.jsx): `src/modules/user/pages/bookingPage/Booking.jsx`
- [Payment](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/paymentPage/Payment.jsx): `src/modules/user/pages/paymentPage/Payment.jsx`
- [Booking confirmation](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/confirmPage/BookingConfirm.jsx): `src/modules/user/pages/confirmPage/BookingConfirm.jsx`

### Identity and account

- [Auth context](https://github.com/samikannup53/flytix-frontend/blob/main/src/shared/contexts/AuthContext.jsx): `src/shared/contexts/AuthContext.jsx`
- [Login and register](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/authPages/Login.jsx): `src/modules/user/pages/authPages/Login.jsx`
- [Profile and travellers](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/profilePage/Profile.jsx): `src/modules/user/pages/profilePage/Profile.jsx`
- [Booking history](https://github.com/samikannup53/flytix-frontend/blob/main/src/modules/user/pages/bookingsDashboard/MyBookings.jsx): `src/modules/user/pages/bookingsDashboard/MyBookings.jsx`

### Other components

- **Traveller**
- **FlyTix API**
- **Razorpay**

## Connections

- Traveller → React app: uses
- React app → User routes: renders (evidence: `src/App.jsx`)
- User routes → Landing page: routes to (evidence: `src/routes/UserRoutes.jsx`)
- User routes → Login and register: routes to (evidence: `src/routes/UserRoutes.jsx`)
- User routes → Flight search results: routes to (evidence: `src/routes/UserRoutes.jsx`)
- User routes → Private access: guards (evidence: `src/routes/UserRoutes.jsx`)
- Private access → Auth context: checks (evidence: `src/routes/PrivateRoutes.jsx`)
- User routes → Booking details: routes to (evidence: `src/routes/UserRoutes.jsx`)
- User routes → Payment: routes to (evidence: `src/routes/UserRoutes.jsx`)
- User routes → Booking confirmation: routes to (evidence: `src/routes/UserRoutes.jsx`)
- User routes → Booking history: routes to (evidence: `src/routes/UserRoutes.jsx`)
- User routes → Profile and travellers: routes to (evidence: `src/routes/UserRoutes.jsx`)
- Landing page → Shared search bar: uses
- Flight search results → Shared search bar: renders (evidence: `src/modules/user/pages/flightPage/Flights.jsx`)
- Shared search bar → Search logic: uses (evidence: `src/modules/user/components/FlightSearchBarShared.jsx`)
- Search logic → Airport lookup: fetches airports (evidence: `src/shared/hooks/useFlightSearchLogic.js`)
- Flight search results → FlyTix API: searches and validates (evidence: `src/modules/user/pages/flightPage/Flights.jsx`)
- Flight search results → Results and comparison: renders (evidence: `src/modules/user/pages/flightPage/Flights.jsx`)
- Results and comparison → Booking details: starts booking
- Booking details → FlyTix API: loads flight and initiates (evidence: `src/modules/user/pages/bookingPage/Booking.jsx`)
- Login and register → Auth context: refreshes user
- Login and register → FlyTix API: registers
- Auth context → FlyTix API: authenticates (evidence: `src/shared/contexts/AuthContext.jsx`)
- Payment → Razorpay: processes payment (evidence: `README.md`)
- Payment → Booking confirmation: confirms booking (evidence: `README.md`)
- Traveller → Flight search results: searches and compares (evidence: `README.md`)
- Traveller → Login and register: registers or logs in (evidence: `README.md`)
- Traveller → Booking history: reviews bookings (evidence: `README.md`)
- Traveller → Profile and travellers: manages account
