# naznin01/tourcraft-smart-travel-planner architecture

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

- Interactive diagram: https://gitdiagram.com/naznin01/tourcraft-smart-travel-planner
- Repository: https://github.com/naznin01/tourcraft-smart-travel-planner

## Overview

TourCraft is a PHP/MySQL travel-planning and package-booking application. Customers browse destinations and discounted packages, book a ready-made package or create a budget-based trip, then manage trips and profile details; administrators review dashboard summaries and manage travel data, users, and bookings. The graph separates customer workflows, shared web helpers, and administration. Relationships are limited to calls shown in excerpts, SOURCE INDEX references, or README capability statements; some page internals and database wiring were not sampled.

Main entry points: [`package.php`](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/package.php) (Package booking), [`includes/auth.php`](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/auth.php) (Session and auth), [`packages.php`](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/packages.php) (Package browsing), [`admin/_boot.php`](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/_boot.php) (Admin access frame)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer travel"]
  node_home["Home discovery<br/>[index.php]"]
  node_auth_pages["Account access<br/>[login.php]"]
  node_package_browse["Package browsing<br/>[packages.php]"]
  node_package_booking["Package booking<br/>[package.php]"]
  node_trip_planner["Custom planner<br/>[plan.php]"]
  node_trip_history["My trips<br/>[my_trips.php]"]
  node_profile_page["Profile management<br/>[profile.php]"]
end

subgraph group_shared["Shared web layer"]
  node_auth_helpers["Session and auth<br/>[auth.php]"]
  node_profile_helpers["Profile helpers<br/>[profile.php]"]
  node_media_helpers["Media helpers<br/>[media.php]"]
  node_site_header["Site navigation<br/>[header.php]"]
end

subgraph group_admin["Administration"]
  node_admin_boot["Admin access frame<br/>[_boot.php]"]
  node_admin_dashboard["Admin dashboard<br/>[index.php]"]
  node_admin_crud["Travel data CRUD<br/>[_crud.php]"]
  node_admin_catalog["Catalog management<br/>[destinations.php]"]
  node_admin_bookings["Booking management<br/>[bookings.php]"]
  node_admin_users["User management<br/>[users.php]"]
end

subgraph group_persistence["Travel data"]
  node_travel_store[("Travel database<br/>[travel_planner.sql]")]
  node_db_connection["PDO connection<br/>[db.php]"]
end

node_traveler(("Traveler"))
node_admin_actor(("Administrator"))

node_traveler -->|"opens"| node_home
node_traveler -->|"registers or signs in"| node_auth_pages
node_traveler -->|"browses packages"| node_package_browse
node_traveler -->|"plans trip"| node_trip_planner
node_traveler -->|"manages bookings"| node_trip_history
node_traveler -->|"updates profile"| node_profile_page
node_admin_actor -->|"opens dashboard"| node_admin_dashboard
node_home -->|"loads"| node_auth_helpers
node_home -->|"loads"| node_media_helpers
node_home -->|"links to"| node_package_browse
node_auth_pages -->|"loads"| node_auth_helpers
node_package_browse -->|"loads"| node_auth_helpers
node_package_browse -->|"loads"| node_profile_helpers
node_package_browse -->|"loads"| node_media_helpers
node_package_booking -->|"loads"| node_auth_helpers
node_package_booking -->|"reads and saves"| node_profile_helpers
node_package_booking -->|"loads"| node_media_helpers
node_trip_planner -->|"loads"| node_auth_helpers
node_trip_planner -->|"reads and saves"| node_profile_helpers
node_profile_page -->|"loads"| node_profile_helpers
node_profile_page -->|"loads"| node_auth_helpers
node_package_browse -->|"offers booking"| node_package_booking
node_trip_planner -->|"redirects after save"| node_trip_history
node_package_booking -->|"redirects after booking"| node_trip_history
node_admin_boot -->|"checks access"| node_auth_helpers
node_admin_dashboard -->|"loads"| node_admin_boot
node_admin_dashboard -->|"queries summaries"| node_travel_store
node_admin_catalog -->|"delegates CRUD"| node_admin_crud
node_admin_catalog -->|"loads"| node_admin_boot
node_admin_crud -->|"loads"| node_admin_boot
node_admin_crud -->|"writes records"| node_travel_store
node_admin_bookings -->|"loads"| node_admin_boot
node_admin_users -->|"delegates CRUD"| node_admin_crud
node_admin_users -->|"loads"| node_admin_boot
node_trip_planner -->|"reads and writes trips"| node_travel_store
node_package_booking -->|"reads and writes bookings"| node_travel_store
node_db_connection -.->|"connects to"| node_travel_store

click node_home "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/index.php"
click node_auth_pages "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/login.php"
click node_package_browse "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/packages.php"
click node_package_booking "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/package.php"
click node_trip_planner "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/plan.php"
click node_trip_history "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/my_trips.php"
click node_profile_page "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/profile.php"
click node_auth_helpers "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/auth.php"
click node_profile_helpers "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/profile.php"
click node_media_helpers "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/media.php"
click node_site_header "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/header.php"
click node_admin_boot "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/_boot.php"
click node_admin_dashboard "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/index.php"
click node_admin_crud "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/_crud.php"
click node_admin_catalog "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/destinations.php"
click node_admin_bookings "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/bookings.php"
click node_admin_users "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/users.php"
click node_travel_store "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/database/travel_planner.sql"
click node_db_connection "https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/db.php"

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_home,node_auth_pages,node_package_browse,node_package_booking,node_trip_planner,node_trip_history,node_profile_page toneBlue
class node_auth_helpers,node_profile_helpers,node_media_helpers,node_site_header toneAmber
class node_admin_boot,node_admin_dashboard,node_admin_crud,node_admin_catalog,node_admin_bookings,node_admin_users toneMint
class node_travel_store,node_db_connection toneRose
class node_traveler,node_admin_actor toneIndigo
```

## Components

### Customer travel

- [Home discovery](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/index.php): `index.php`
- [Account access](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/login.php): `login.php`
- [Package browsing](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/packages.php): `packages.php`
- [Package booking](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/package.php): `package.php`
- [Custom planner](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/plan.php): `plan.php`
- [My trips](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/my_trips.php): `my_trips.php`
- [Profile management](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/profile.php): `profile.php`

### Shared web layer

- [Session and auth](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/auth.php): `includes/auth.php`
- [Profile helpers](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/profile.php): `includes/profile.php`
- [Media helpers](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/media.php): `includes/media.php`
- [Site navigation](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/header.php): `includes/header.php`

### Administration

- [Admin access frame](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/_boot.php): `admin/_boot.php`
- [Admin dashboard](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/index.php): `admin/index.php`
- [Travel data CRUD](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/_crud.php): `admin/_crud.php`
- [Catalog management](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/destinations.php): `admin/destinations.php`
- [Booking management](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/bookings.php): `admin/bookings.php`
- [User management](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/admin/users.php): `admin/users.php`

### Travel data

- [Travel database](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/database/travel_planner.sql): `database/travel_planner.sql`
- [PDO connection](https://github.com/naznin01/tourcraft-smart-travel-planner/blob/main/includes/db.php): `includes/db.php`

### Other components

- **Traveler**
- **Administrator**

## Connections

- Traveler → Home discovery: opens (evidence: `README.md`)
- Traveler → Account access: registers or signs in (evidence: `README.md`)
- Traveler → Package browsing: browses packages (evidence: `README.md`)
- Traveler → Custom planner: plans trip (evidence: `README.md`)
- Traveler → My trips: manages bookings (evidence: `README.md`)
- Traveler → Profile management: updates profile (evidence: `README.md`)
- Administrator → Admin dashboard: opens dashboard (evidence: `README.md`)
- Home discovery → Session and auth: loads (evidence: `index.php`)
- Home discovery → Media helpers: loads (evidence: `index.php`)
- Home discovery → Package browsing: links to (evidence: `index.php`)
- Account access → Session and auth: loads (evidence: `login.php`)
- Package browsing → Session and auth: loads (evidence: `packages.php`)
- Package browsing → Profile helpers: loads (evidence: `packages.php`)
- Package browsing → Media helpers: loads (evidence: `packages.php`)
- Package booking → Session and auth: loads (evidence: `package.php`)
- Package booking → Profile helpers: reads and saves (evidence: `package.php`)
- Package booking → Media helpers: loads (evidence: `package.php`)
- Custom planner → Session and auth: loads (evidence: `plan.php`)
- Custom planner → Profile helpers: reads and saves (evidence: `plan.php`)
- Profile management → Profile helpers: loads (evidence: `profile.php`)
- Profile management → Session and auth: loads (evidence: `profile.php`)
- Package browsing → Package booking: offers booking (evidence: `README.md`)
- Custom planner → My trips: redirects after save (evidence: `plan.php`)
- Package booking → My trips: redirects after booking (evidence: `package.php`)
- Admin access frame → Session and auth: checks access (evidence: `admin/_boot.php`)
- Admin dashboard → Admin access frame: loads (evidence: `admin/index.php`)
- Admin dashboard → Travel database: queries summaries (evidence: `admin/index.php`)
- Catalog management → Travel data CRUD: delegates CRUD (evidence: `admin/destinations.php`)
- Catalog management → Admin access frame: loads (evidence: `admin/destinations.php`)
- Travel data CRUD → Admin access frame: loads (evidence: `admin/_crud.php`)
- Travel data CRUD → Travel database: writes records (evidence: `admin/_crud.php`)
- Booking management → Admin access frame: loads (evidence: `admin/bookings.php`)
- User management → Travel data CRUD: delegates CRUD (evidence: `admin/users.php`)
- User management → Admin access frame: loads (evidence: `admin/users.php`)
- Custom planner → Travel database: reads and writes trips (evidence: `plan.php`)
- Package booking → Travel database: reads and writes bookings (evidence: `package.php`)
- PDO connection → Travel database: connects to
