# Tourism Proposal PDF System Specification

## 1. Overview

This document defines a Laravel-based system for generating modern tourism proposal PDFs that support:

- English and Arabic content
- Bilingual PDF output
- Multi-currency pricing
- Two proposal types: Individual and Corporate
- PDF preview, editing, and history tracking
- A luxury, elegant, blue-themed design language

The generated PDF must feel premium and visually polished, with the company logo positioned at the top left of the PDF layout.

## 2. Project Goal

Build an admin-managed proposal generator for tourism packages where the team can create branded proposals, select reusable tourism content from the admin panel, and export a professionally designed PDF in English, Arabic, or bilingual format.

## 3. Technology Direction

### Core Stack

- Backend: Laravel
- Language: PHP
- Database: MySQL or MariaDB
- Admin panel: Laravel Filament or a custom Laravel admin
- PDF rendering: HTML-to-PDF approach recommended for modern styling and Arabic support
- Styling: Blade templates with a premium blue design system

### Recommended Laravel Packages

- Translation support: spatie/laravel-translatable
- Media uploads: spatie/laravel-medialibrary
- Activity/history log: spatie/laravel-activitylog
- Money formatting: moneyphp/money or a custom currency formatter
- PDF generation: Spatie Browsershot or a robust Arabic-compatible HTML-to-PDF solution

Note: Arabic text rendering must be validated carefully. The PDF engine must support RTL direction, Arabic glyph shaping, and mixed English/Arabic layouts.

## 4. Business Scope

The system is for tourism proposal generation and must support:

- Proposal creation from an admin panel
- Reusable master data setup from admin
- Branded PDF generation with modern design
- PDF preview before final export
- Editing existing proposals
- Proposal version/history tracking

## 5. Proposal Types

The system must support two proposal types.

### Individual Proposal

Fields:

- Client name
- Phone
- Email

### Corporate Proposal

Fields:

- Corporate name
- Contact person name
- Phone
- Email

The proposal form should dynamically change based on the selected proposal type.

## 6. Language Requirements

The system must support:

- English
- Arabic
- Bilingual output

### Language Behavior

- Admin content should be stored in both English and Arabic where applicable.
- Proposal output mode should support:
  - English only
  - Arabic only
  - Bilingual
- Arabic layout must be RTL.
- Bilingual pages may use stacked sections or a mirrored two-column layout depending on readability and PDF page composition.

## 7. Currency Requirements

The system must support multiple currencies.

### Currency Features

- Admin can define available currencies.
- Each pricing item may have:
  - Amount
  - Currency
- Proposal totals must display in the chosen currency format.
- If needed later, the system may support exchange rates, but phase one can store values per selected currency without automatic conversion.

Examples:

- USD
- EUR
- AED
- SAR
- EGP

## 8. Admin Panel Modules

The admin panel must allow managing reusable content for proposals.

### 8.1 Company Settings

- Company name
- Logo
- Contact details
- Default header text
- Default subheading text
- Brand colors
- PDF theme settings

### 8.2 Cities

- City name in English
- City name in Arabic
- Status
- Sort order

### 8.3 Hotels

- Related city
- Hotel name in English
- Hotel name in Arabic
- Address in English
- Address in Arabic
- Website link
- Optional hotel images
- Status

### 8.4 Places / Attractions

- Related city
- Place name in English
- Place name in Arabic
- Description in English
- Description in Arabic
- Multiple images
- Status
- Sort order

### 8.5 Transportation Types

- Flight
- Bus
- Train
- Other

Each transportation entry may include:

- From location
- To location
- Transport type
- Price
- Currency
- Notes

### 8.6 Inclusions

- Title in English
- Title in Arabic
- Default description in English
- Default description in Arabic
- Status

### 8.7 Exclusions

- Title in English
- Title in Arabic
- Default description in English
- Default description in Arabic
- Status

### 8.8 Cancellation Policies

- Policy title
- Description in English
- Description in Arabic
- Status

### 8.9 Payment Methods

- Method title
- Description in English
- Description in Arabic
- Status

### 8.10 Proposal History

- Proposal number
- Created by
- Updated by
- Version number
- Status
- Draft/exported/approved indicators
- PDF generation timestamps

## 9. Proposal Creation Workflow

### Step 1: General Proposal Data

- Proposal type: Individual or Corporate
- Proposal title
- Header
- Subheading
- Company name
- Trip from
- Trip to
- Number of days
- Number of nights
- Language mode
- Currency
- Cover background image

### Step 2: Client Details

If Individual:

- Name
- Phone
- Email

If Corporate:

- Corporate name
- Contact person name
- Phone
- Email

### Step 3: Hotels by City

- Select one or more cities
- For each city, select one or more hotels
- Display hotel name, address, and website

### Step 4: Program Itinerary

The itinerary must support multiple days.

For each day:

- Day number
- City selection
- Day title in English and Arabic if custom
- One or more places/activities
- Description override if needed
- Related images
- Transportation section optional

Transportation per day may include:

- From
- To
- Type: flight, bus, train, or other
- Price
- Currency
- Notes

### Step 5: Inclusions and Exclusions

For each selected item:

- Choose from admin-managed list
- Set proposal-specific price if needed
- Set currency if pricing is used

### Step 6: Pricing and Policies

- Total proposal price
- Currency
- Cancellation policy
- Payment method
- Payment description
- Additional notes

### Step 7: Preview and Export

- Preview PDF in browser
- Save draft
- Update proposal
- Export final PDF
- Keep version history

## 10. PDF Structure

The PDF must have a premium layout with a luxury blue visual theme and modern spacing, typography, and imagery.

### Global PDF Rules

- Company logo at the top left
- Strong visual hierarchy
- Clean premium typography
- Proper RTL handling for Arabic
- Balanced white space
- Full support for images and backgrounds
- Consistent page numbering and footer style where appropriate

### Page 1: Cover Page

Requirements:

- Full-page background image uploaded by the admin or proposal creator
- Company branding
- Company name
- Header
- Subheading
- Trip route: from and to
- Number of days and nights
- Client block on the opposite side of the page

If Corporate:

- Corporate name
- Contact person name
- Phone
- Email

If Individual:

- Client name
- Phone
- Email

Design notes:

- Premium hero layout
- Blue overlays or gradient treatment to unify the background image with brand identity
- Elegant title styling
- High contrast text for readability

### Page 2: Hotels and Stay

Requirements:

- Show selected city or cities
- Under each city, list one or more hotels
- Hotel name
- Address
- Website link

Optional design enhancement:

- Hotel cards
- City section separators
- Small hotel image thumbnails if desired

### Page 3: Program Itinerary

Requirements:

- Day-by-day itinerary layout
- City name per day
- Selected places/activities from admin panel
- Place descriptions
- Place images
- Transportation information if selected

Transportation block includes:

- Transport type
- From
- To
- Price if available
- Currency

Design notes:

- Timeline or card-based day layout
- Strong day markers
- Image-led presentation with readable descriptions

### Page 4: Inclusions and Exclusions

Requirements:

- Inclusions list
- Exclusions list
- Price per proposal item if applicable
- Currency if applicable

Design notes:

- Two balanced sections
- Icon-supported bullet lists
- Premium clean layout

### Page 5: Pricing and Policies

Requirements:

- Total proposal price
- Currency
- Cancellation policy
- Payment methods
- Payment description

Design notes:

- Strong pricing emphasis
- Well-structured policy section
- Elegant summary presentation

## 11. Preview, Editing, and History

The system must include the following proposal management features.

### Preview

- Live preview before export
- HTML preview matching the PDF layout as closely as possible

### Editing

- Reopen and edit saved proposals
- Update any section without recreating the proposal

### History

- Track who created and updated each proposal
- Store export timestamps
- Preserve proposal versions when major edits are made
- Allow viewing previously generated PDFs

## 12. Suggested Database Entities

Recommended main entities:

- users
- companies
- currencies
- cities
- hotels
- places
- transportation_types
- inclusions
- exclusions
- cancellation_policies
- payment_methods
- proposals
- proposal_clients
- proposal_hotels
- proposal_days
- proposal_day_places
- proposal_day_transportations
- proposal_inclusions
- proposal_exclusions
- proposal_versions
- media

## 13. Proposal Data Model Notes

### Proposals

Main fields:

- proposal_number
- proposal_type
- language_mode
- currency_id
- company_id
- header_en
- header_ar
- subheading_en
- subheading_ar
- trip_from_en
- trip_from_ar
- trip_to_en
- trip_to_ar
- days_count
- nights_count
- cover_background
- total_price
- status

### Proposal Client

- proposal_id
- client_type
- name
- corporate_name
- contact_person_name
- phone
- email

### Proposal Days

- proposal_id
- day_number
- city_id
- title_en
- title_ar
- notes_en
- notes_ar

### Proposal Day Transportation

- proposal_day_id
- transport_type_id
- from_location_en
- from_location_ar
- to_location_en
- to_location_ar
- price
- currency_id
- notes_en
- notes_ar

## 14. UI and Design Direction

The admin panel and the PDF itself should follow a luxury modern blue theme.

### Visual Style

- Elegant and premium
- Eye-catching but not cluttered
- Corporate luxury aesthetic for tourism proposals
- Strong spacing and visual hierarchy
- Modern cards, dividers, and large imagery

### Color Direction

Primary palette direction:

- Deep royal blue
- Midnight blue
- Soft silver or platinum neutrals
- White for clarity and contrast

Possible accent usage:

- Muted gold for premium highlights

### Typography Direction

- Clean modern Latin font for English
- Professional Arabic font with strong readability
- Font pairing must feel premium and balanced across both languages

### Layout Direction

- Full-bleed cover image on page 1
- Editorial-style content sections on inner pages
- Modern card/timeline layouts for itinerary content
- Clear blocks for prices, inclusions, and policies

## 15. Functional Requirements

- Admin can manage reusable tourism content
- Admin can create a proposal from predefined content plus custom data
- System supports English, Arabic, and bilingual output
- System supports multiple currencies
- System supports Individual and Corporate proposals
- System generates branded PDF proposals
- System supports PDF preview before export
- System stores proposal history and previous versions
- System supports image uploads for cover page and places
- System supports admin-defined hotels, cities, places, policies, and payment methods

## 16. Non-Functional Requirements

- Arabic text must render correctly in PDF
- PDF layout must remain stable across modern browsers and exports
- Uploaded images should be optimized for PDF generation
- The interface should be responsive for desktop and tablet usage
- Proposal generation should be fast and reliable
- The system should be maintainable and modular

## 17. Phase 1 Delivery Scope

Recommended first implementation phase:

- Laravel project setup
- Admin authentication
- Company settings module
- Cities, hotels, places, inclusions, exclusions, policies, and payment methods modules
- Proposal builder form
- PDF HTML templates
- PDF preview and export
- Proposal history log
- English and Arabic content support
- Multi-currency storage and formatting

## 18. Future Enhancements

- Exchange rate conversion
- Multiple PDF themes
- Client approval workflow
- Proposal sharing by secure link
- eSignature support
- Optional QR code on proposal
- CRM integration
- WhatsApp/email sending from proposal screen

## 19. Acceptance Criteria

- A user can create either an Individual or Corporate tourism proposal.
- A user can generate a PDF with the company logo at the top left.
- The proposal supports English, Arabic, and bilingual presentation.
- The proposal supports reusable admin-managed data.
- The itinerary supports multiple days, cities, places, images, and transport entries.
- Inclusions and exclusions can be selected from admin data and priced per proposal.
- The final page includes total pricing, cancellation policy, and payment methods.
- The user can preview, edit, and regenerate the PDF.
- The system keeps a history of proposal updates and generated PDFs.

## 20. Build Recommendation

The best implementation approach is to build this as a Laravel application with an admin panel and a Blade-based PDF rendering pipeline, using an HTML-to-PDF engine that fully supports Arabic and modern CSS. The proposal editor should behave like a structured builder, while the generated PDF should look like a high-end tourism presentation rather than a plain invoice or report.