# naimurk/airlines-ticket-selling-buying-new architecture

> Architecture diagram of the GitHub repository naimurk/airlines-ticket-selling-buying-new, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/naimurk/airlines-ticket-selling-buying-new
- Repository: https://github.com/naimurk/airlines-ticket-selling-buying-new

## Overview

This is an airline-management frontend for signing in, managing ticket sales, and managing airline portals; buying information is shown as coming soon. The main workflow is login, then the selling view, where users can inspect/filter records and open create or edit flows backed by ticket APIs. Portal management supports listing and portal CRUD. The graph reflects sampled calls and SOURCE INDEX references; several selling subviews and the statistics API are unsampled, so their internal connections are not asserted.

Main entry points: [`src/components/selling/selling-information.tsx`](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/selling-information.tsx) (Sales overview), [`src/redux/api/baseApi.ts`](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/api/baseApi.ts) (API base), [`src/components/auth/login.tsx`](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/auth/login.tsx) (Login), [`src/redux/features/portal/portal.api.ts`](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/portal/portal.api.ts) (Portal API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application and access"]
  node_entrypoint["React entry<br/>[main.tsx]"]
  node_login["Login<br/>[login.tsx]"]
  node_guard["Protected route<br/>[ProtectRoute.tsx]"]
  node_workspace["Airline workspace<br/>[App.tsx]"]
end

subgraph group_sales["Ticket sales"]
  node_salesview["Sales overview"]
  node_salesform["Add/edit sale<br/>[add-selling.tsx]"]
  node_filters["Sales filters<br/>[filterbar.tsx]"]
  node_records["Sales table<br/>[data-table.tsx]"]
  node_saleedit["Edit sale<br/>[edit.tsx]"]
  node_saledelete["Delete sale<br/>[deleteSelling.tsx]"]
  node_saleview["Sale details<br/>[view-modal.tsx]"]
  node_slip["Payment slip<br/>[payment-slip.tsx]"]
  node_report["Sales report<br/>[selling-report.tsx]"]
  node_stats["Sales statistics<br/>[statiscard.tsx]"]
end

subgraph group_portals["Portal management"]
  node_portalview["Portal list<br/>[portal.tsx]"]
  node_portalform["Portal editor"]
end

subgraph group_state["State and API"]
  node_authapi["Authentication API<br/>[authApi.ts]"]
  node_authstate["Auth state<br/>[authSlice.ts]"]
  node_store[("Redux store<br/>[store.ts]")]
  node_baseapi["API base<br/>[baseApi.ts]"]
  node_ticketapi["Ticket API<br/>[ticketp.api.ts]"]
  node_statapi["Statistics API"]
  node_portalapi["Portal API<br/>[portal.api.ts]"]
end

node_user(("Staff user"))
node_backend{{"Backend service"}}

node_user -->|"submits credentials"| node_login
node_entrypoint -->|"renders"| node_workspace
node_entrypoint -->|"loads"| node_login
node_login -->|"requests login"| node_authapi
node_login -->|"sets session"| node_authstate
node_guard -->|"checks session"| node_authstate
node_workspace -->|"renders sales tab"| node_salesview
node_workspace -->|"renders portal tab"| node_portalview
node_salesview -->|"opens form"| node_salesform
node_salesview -->|"renders filters"| node_filters
node_salesview -->|"renders table"| node_records
node_salesview -->|"renders statistics"| node_stats
node_salesview -->|"loads sales"| node_ticketapi
node_salesform -->|"creates or updates"| node_ticketapi
node_salesform -->|"loads portal options"| node_portalapi
node_portalview -->|"loads and deletes"| node_portalapi
node_portalview -->|"opens editor"| node_portalform
node_portalform -->|"creates or updates"| node_portalapi
node_authapi -->|"uses API base"| node_baseapi
node_ticketapi -->|"uses API base"| node_baseapi
node_portalapi -->|"uses API base"| node_baseapi
node_store -->|"persists reducer"| node_authstate
node_store -->|"registers reducer"| node_baseapi
node_baseapi -->|"sends HTTP requests"| node_backend
node_statapi -.->|"uses API base"| node_baseapi

click node_entrypoint "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/main.tsx"
click node_login "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/auth/login.tsx"
click node_guard "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/routes/ProtectRoute.tsx"
click node_workspace "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/App.tsx"
click node_salesview "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/selling-information.tsx"
click node_salesform "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/add-selling.tsx"
click node_filters "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/filterbar.tsx"
click node_records "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/data-table.tsx"
click node_saleedit "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/edit.tsx"
click node_saledelete "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/deleteSelling.tsx"
click node_saleview "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/view-modal.tsx"
click node_slip "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/payment-slip.tsx"
click node_report "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/selling-report.tsx"
click node_stats "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/statiscard.tsx"
click node_portalview "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/portal/portal.tsx"
click node_portalform "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/portal/add-edit-portal-modal.tsx"
click node_authapi "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/auth/authApi.ts"
click node_authstate "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/auth/authSlice.ts"
click node_store "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/store.ts"
click node_baseapi "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/api/baseApi.ts"
click node_ticketapi "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/ticket/ticketp.api.ts"
click node_statapi "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/ticket/sell-statistic.api.ts"
click node_portalapi "https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/portal/portal.api.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_entrypoint,node_login,node_guard,node_workspace,node_user toneBlue
class node_salesview,node_salesform,node_filters,node_records,node_saleedit,node_saledelete,node_saleview,node_slip,node_report,node_stats toneAmber
class node_portalview,node_portalform toneMint
class node_authapi,node_authstate,node_store,node_baseapi,node_ticketapi,node_statapi,node_portalapi toneRose
class node_backend toneIndigo
```

## Components

### Application and access

- [React entry](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/main.tsx): `src/main.tsx`
- [Login](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/auth/login.tsx): `src/components/auth/login.tsx`
- [Protected route](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/routes/ProtectRoute.tsx): `src/routes/ProtectRoute.tsx`
- [Airline workspace](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/App.tsx): `src/App.tsx`

### Ticket sales

- [Sales overview](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/selling-information.tsx): `src/components/selling/selling-information.tsx`
- [Add/edit sale](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/add-selling.tsx): `src/components/selling/add-selling.tsx`
- [Sales filters](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/filterbar.tsx): `src/components/selling/filterbar.tsx`
- [Sales table](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/data-table.tsx): `src/components/selling/data-table.tsx`
- [Edit sale](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/edit.tsx): `src/components/selling/edit.tsx`
- [Delete sale](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/deleteSelling.tsx): `src/components/selling/deleteSelling.tsx`
- [Sale details](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/view-modal.tsx): `src/components/selling/view-modal.tsx`
- [Payment slip](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/payment-slip.tsx): `src/components/selling/payment-slip.tsx`
- [Sales report](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/selling-report.tsx): `src/components/selling/selling-report.tsx`
- [Sales statistics](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/selling/statiscard.tsx): `src/components/selling/statiscard.tsx`

### Portal management

- [Portal list](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/portal/portal.tsx): `src/components/portal/portal.tsx`
- [Portal editor](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/components/portal/add-edit-portal-modal.tsx): `src/components/portal/add-edit-portal-modal.tsx`

### State and API

- [Authentication API](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/auth/authApi.ts): `src/redux/features/auth/authApi.ts`
- [Auth state](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/auth/authSlice.ts): `src/redux/features/auth/authSlice.ts`
- [Redux store](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/store.ts): `src/redux/store.ts`
- [API base](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/api/baseApi.ts): `src/redux/api/baseApi.ts`
- [Ticket API](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/ticket/ticketp.api.ts): `src/redux/features/ticket/ticketp.api.ts`
- [Statistics API](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/ticket/sell-statistic.api.ts): `src/redux/features/ticket/sell-statistic.api.ts`
- [Portal API](https://github.com/naimurk/airlines-ticket-selling-buying-new/blob/main/src/redux/features/portal/portal.api.ts): `src/redux/features/portal/portal.api.ts`

### Other components

- **Staff user**
- **Backend service**

## Connections

- Staff user → Login: submits credentials (evidence: `src/components/auth/login.tsx`)
- React entry → Airline workspace: renders (evidence: `src/main.tsx`)
- React entry → Login: loads (evidence: `src/main.tsx`)
- Login → Authentication API: requests login (evidence: `src/components/auth/login.tsx`)
- Login → Auth state: sets session (evidence: `src/components/auth/login.tsx`)
- Protected route → Auth state: checks session (evidence: `src/routes/ProtectRoute.tsx`)
- Airline workspace → Sales overview: renders sales tab (evidence: `src/App.tsx`)
- Airline workspace → Portal list: renders portal tab (evidence: `src/App.tsx`)
- Sales overview → Add/edit sale: opens form (evidence: `src/components/selling/selling-information.tsx`)
- Sales overview → Sales filters: renders filters (evidence: `src/components/selling/selling-information.tsx`)
- Sales overview → Sales table: renders table (evidence: `src/components/selling/selling-information.tsx`)
- Sales overview → Sales statistics: renders statistics (evidence: `src/components/selling/selling-information.tsx`)
- Sales overview → Ticket API: loads sales (evidence: `src/components/selling/selling-information.tsx`)
- Add/edit sale → Ticket API: creates or updates (evidence: `src/components/selling/add-selling.tsx`)
- Add/edit sale → Portal API: loads portal options (evidence: `src/components/selling/add-selling.tsx`)
- Portal list → Portal API: loads and deletes (evidence: `src/components/portal/portal.tsx`)
- Portal list → Portal editor: opens editor (evidence: `src/components/portal/portal.tsx`)
- Portal editor → Portal API: creates or updates (evidence: `src/components/portal/add-edit-portal-modal.tsx`)
- Authentication API → API base: uses API base (evidence: `src/redux/features/auth/authApi.ts`)
- Ticket API → API base: uses API base (evidence: `src/redux/features/ticket/ticketp.api.ts`)
- Portal API → API base: uses API base (evidence: `src/redux/features/portal/portal.api.ts`)
- Redux store → Auth state: persists reducer (evidence: `src/redux/store.ts`)
- Redux store → API base: registers reducer (evidence: `src/redux/store.ts`)
- API base → Backend service: sends HTTP requests (evidence: `src/redux/api/baseApi.ts`)
- Statistics API → API base: uses API base
