# Globotrip Static Data Dictionary

This file describes the static JSON collections used before MySQL integration.

## Core public collections

### `/data/destinations.json`
Public destination records used by destination cards and destination detail pages.

Key fields:

```txt
id, name, country, slug, from_price, tagline, best_for, gradient, image, route_hint
```

### `/data/guides.json`
Public guide records used by tour recommendations and guide matching previews.

Key fields:

```txt
id, name, location, specialty, rating, reviews, languages, avatar, verified
```

### `/data/tours.json`
Public tour/experience records used by tour cards and tour detail pages.

Key fields:

```txt
id, slug, title, destination_id, guide_id, price, duration, category, badge, rating, reviews, summary, included, gradient, image
```

## Marketplace workflow collections

### `/data/trip_requests.json`
Admin/global view of traveler requests.

### `/data/tour_customization_requests.json`
Global mock records for planned tour requests and customized tour requests. Later maps to `tour_customization_requests`.

Key fields:

```txt
id, traveler_id, tour_id, guide_id, destination_id, request_intent, requested_date, group_size, preferred_start_time, language, pickup_location, budget, private_or_shared, activities_to_add, activities_to_remove, food_restrictions, special_needs, custom_notes, status
```

### `/data/traveler_tour_requests.json`
Traveler dashboard subset of planned/customized tour requests.

### `/data/traveler_trips.json`
Traveler dashboard trips and request states.

### `/data/guide_requests.json`
Guide-side request queue.

### `/data/guide_proposals.json`
Static proposal records prepared for the future guide proposal workflow.

### `/data/guide_tour_analytics.json`
Guide-facing tour performance mock data used by `/guide/analytics.php`, `/guide/tour-analytics.php`, `/guide/tours.php`, and the guide dashboard analytics snapshot. Later maps to event aggregates from `tour_analytics_events`.

Key fields:

```txt
summary, tours, sources, traveler_segments, events
```

Tour row fields:

```txt
tour_id, title, destination, views, requests, planned_requests, customizations, saves, messages, conversion_rate, estimated_revenue, avg_group_size, top_language, top_traveler_type, top_request_window, trend, health_score, sparkline, insight, recommendations
```

### `/data/itineraries.json`
Saved/generated itinerary examples. The real planner simulation can expand this in Phase 11.

## User/account collections

### `/data/users.json`
Mock unified users. Important future fields include:

```txt
role, default_dashboard, status
```

### `/data/guide_applications.json`
Backend-ready guide application records derived from the admin approval queue.

## Communication and trust collections

### `/data/messages.json`
Combined traveler, guide, and admin messages.

### `/data/reviews.json`
Mock review/testimonial records for future profile and tour pages.

## Role-specific UI collections

Traveler:

```txt
traveler_saved_plans.json
traveler_messages.json
traveler_bookings.json
traveler_timeline.json
traveler_tour_requests.json
```

Guide:

```txt
guide_messages.json
guide_schedule.json
guide_experiences.json
guide_transactions.json
guide_tour_analytics.json
guide_quality_checklist.json
```

Admin:

```txt
admin_applications.json
admin_travelers.json
admin_messages.json
admin_content_queue.json
admin_settings_rows.json
```

## Loader functions

Use:

```php
gtStaticData('collection_name');
```

Example:

```php
$trips = gtStaticData('traveler_trips');
```

Do not create new hardcoded page arrays unless it is temporary UI copy. New mock records should go into `/data/*.json`.


---

## Phase 12 additions — Traveler notifications + inbox polish

### `traveler_notifications`

Static source: `/data/traveler_notifications.json`

Purpose: mock traveler-facing event stream before MySQL. Later this can map to a `notifications` table or event-generated inbox records.

Recommended fields:

```txt
id
category
type
title
message
time
created_at
read
priority
tone
icon
status
related_kind
related_id
action_label
action_url
```

### `traveler_messages`

Phase 12 enriches message records with backend-ready thread metadata:

```txt
thread_id
unread_count
priority
status
trip
related_url
quick_action
messages[]
attachment
```

The UI remains static. No real message sending, notifications, read receipts, auth, or database writes have been added.


## Phase 13 — Trust, Safety & Verification Data

### `/data/safety_resources.json`

Static safety guidance shown on `/safety.php`. Later this can become policy/CMS content.

Key fields:

- `id`
- `title`
- `category`
- `icon`
- `summary`
- `action`
- `tone`

### `/data/verification_requirements.json`

Static guide verification requirements shown on `/verification.php` and guide application status screens.

Key fields:

- `id`
- `title`
- `owner`
- `status`
- `tone`
- `description`
- `future_fields`

### `/data/safety_reports.json`

Static safety/support reports shown in `/admin/reports.php`.

Key fields:

- `id`
- `category`
- `reporter`
- `reporter_role`
- `related_party`
- `related_item`
- `severity`
- `status`
- `tone`
- `received`
- `summary`
- `next_action`

---

## `ai_planner_rules.json`

Added in Phase 14.

Purpose: local mock-AI rule source used before real AI and MySQL. The planner uses this file with existing `destinations.json`, `tours.json`, and `guides.json` to generate a realistic itinerary preview in the browser.

Important fields:

```txt
metadata.mode
budget_profiles
pace_profiles
style_profiles
destination_logic
day_templates
match_explanations
```

Notes:

- This is not a paid AI call.
- This is not persisted to MySQL.
- Generated results are stored temporarily in browser `localStorage` under `globotrip_generated_itinerary`.
- During the backend phase, the generated object should map to `ai_itinerary_drafts.request_payload` and `ai_itinerary_drafts.response_payload`.


## Phase 15 SEO/Public Launch Collections

### `/data/public_pages.json`
Static inventory of public launch pages such as About, Contact, Privacy, Terms, Safety, and Verification. These records help future backend or CMS logic understand which pages are part of the public navigation and SEO surface.

### `/data/seo_faqs.json`
Reusable FAQ content for public SEO sections. In the static MVP this supports home, destinations, and tours pages. Later this can become CMS-managed FAQ data or destination/tour-specific SEO content.

### Public SEO files
- `/sitemap.xml` lists public static routes plus current destination and tour slug URLs.
- `/robots.txt` allows crawling and points search engines to the sitemap.
- Global metadata is rendered through `/includes/header.php` using canonical URL, robots meta, Open Graph, Twitter card, and JSON-LD variables.
