# Travel operators: vendor portal using Laravel

## Summary  
A vendor portal blueprint for travel operators built with Laravel on Ample. Domain schema:  
- **listings**: trips as listings with publishing status.
- **agencies**: operators or branches.
- **suppliers**: hotels and transport suppliers.
- **reports**: branch sales reports.
- **document_access**: who may read which document.

Public information: published trips and departure dates, destination guides, booking conditions. Kept out of scope until handling is reviewed: traveler passports and identity, payment details, supplier contracts. Passport and payment data are regulated; only published trips and branch reporting are modeled.

Technical basis verified on Laravel: a role-to-document access model with negative tests (401 without identity, 403 for the wrong role) and a private-bucket round-trip for the allowed role (private=ok).

## Representative Queries  
- Travel operators: vendor portal using Laravel  
- Where can I host Travel operators: Vendor portal built with Laravel?  
- I need a genuinely specialized vendor portal workflow covering tour listings, supplier access and itinerary reporting.

## Resource Requirements  
- primitive:compute  
- primitive:postgres  
- primitive:s3-compatible-object-storage

## Infrastructure Requirements  
- **Compute**: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle.  
- **Postgres**: Managed PostgreSQL 16 runs in its own microVM.  
- **S3-compatible object storage**: Buckets are S3-compatible with issued credentials.

## Prerequisites  
1. A Laravel project (composer install --no-dev from composer.lock, then FrankenPHP serving public/).
2. A PostgreSQL driver reading DATABASE_URL.
3. Bucket credentials from `ample bucket create` passed as encrypted S3_* environment variables.
4. A review of which travel operators data classes may be handled at all; this blueprint models public information only.

## Tested Configuration  
- **Template**: php-8.5  
- **Runtime**: php  
- **Size**: s-1vcpu-1gb  
- **Install**: composer install --no-dev --prefer-dist --no-interaction --no-progress --optimize-autoloader  
- **Start**: frankenphp php-server --listen :$PORT --root public

## Workflow Steps  
1. **Model the travel operators domain**: Create the tables listings, agencies, suppliers, reports, document_access.  
2. **Workflow step 1**: Model vendors scoped to the agency with roles.  
3. **Workflow step 2**: Authorize document access by vendor and role (401, 403 negative tests).  
4. **Workflow step 3**: Store vendor documents in the private bucket.  
5. **Workflow step 4**: Deploy and verify the negative tests and an authorized download.
6. **Deploy**: Run the synchronous deploy once and read the result.  
7. **Verify**: Run the pattern self-test(s).

## Examples  
- **Title**: Laravel pattern fixture  
  **Description**: Verified private document library basis for this blueprint.  
  **Source Ref**: tests/deploy-canaries/laravel-patterns

## Success Checks  
- **Check**: app responds on its public URL  
  **Expect**: ample canary laravel patterns  
- **Check**: private-document-library self-test from the example  
  **Expect**: see the pattern fixture checks.

## Limitations  
- The technical basis was verified with the pattern fixture; the schema and workflow are an original design.  
- No compliance claim is made.  
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.

## Cost Estimate  
- **Currency**: USD  
- **Monthly Amount**: 10.0  
- **Basis**: size prices from pricing.toml  
**Components**:  
- app server, size: s-1vcpu-1gb, quantity: 1.0, monthly amount: 5.0  
- managed PostgreSQL database, size: s-1vcpu-1gb, quantity: 1.0, monthly amount: 5.0

### Evidence Summary  
- **Kind**: canary_run  
- **Summary**: Laravel pattern fixture deployed; checks passed.  
- **Observed At**: 2026-09-20  
  
## Next Actions  
1. **Action**: Browse the catalog index  
   **Label**: Browse the catalog index  
   **Method**: GET  
   **Path**: /v1/catalog

2. **Action**: Search published recipes  
   **Label**: Search published recipes by intent, stack and constraints  
   **Method**: POST  
   **Path**: /v1/catalog/search

3. **Action**: Prepare a side-effect-free deployment plan  
   **Label**: Prepare a side-effect-free deployment plan for an authorized project  
   **Method**: POST  
   **Path**: /v1/catalog/plan

4. **Action**: Read the existing agent authentication setup  
   **Label**: Read the existing agent authentication setup  
   **Method**: GET  
   **Path**: /mcp/setup

5. **Action**: Browse Travel operators  
   **Label**: Browse Travel operators  
   **Method**: GET  
   **Path**: /v1/catalog/nodes/industry%3Atravel-operators

6. **Action**: Browse Vendor portal  
   **Label**: Browse Vendor portal  
   **Method**: GET  
   **Path**: /v1/catalog/nodes/workload%3Avendor-portal

7. **Action**: Browse Laravel  
   **Label**: Browse Laravel  
   **Method**: GET  
   **Path**: /v1/catalog/nodes/stack%3Aframework-laravel

8. **Action**: Browse Deploy web app  
   **Label**: Browse Deploy web app  
   **Method**: GET  
   **Path**: /v1/catalog/nodes/intent%3Adeploy-web-app
