{"catalogRevision":"cat_726f873af6f566cc","recipeId":"page:recipes:digital-downloads:laravel:relational-catalog","recipeRevision":"r1","canonicalPath":"/recipes/digital-downloads/laravel/relational-catalog","label":"Host digital downloads with Laravel: relational catalog data","title":"How to host a digital downloads built with Laravel on Ample: relational catalog data","family":"Workload recipe","summary":"Deploy a digital downloads built with Laravel on Ample using the transactional workflows pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Laravel: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected). The digital downloads-specific behavior (your domain records, validation rules and concurrency policy) is your application code on that verified basis.","representativeQueries":["Host digital downloads with Laravel: relational catalog data","Where can I host Digital downloads built with Laravel?","I need catalog tables, transactional update logic and application-level access boundaries."],"breadcrumbIds":["discovery","workload","workload:commerce-and-catalogs","workload:digital-downloads","page:recipes:digital-downloads:laravel:relational-catalog"],"breadcrumbs":[{"id":"discovery","label":"Agent hosting discovery","canonicalPath":"/discover/discovery","kind":"root"},{"id":"workload","label":"Applications and workloads","canonicalPath":"/discover/workload","kind":"facet"},{"id":"workload:commerce-and-catalogs","label":"Commerce and catalogs","canonicalPath":"/discover/workload/commerce-and-catalogs","kind":"group"},{"id":"workload:digital-downloads","label":"Digital downloads","canonicalPath":"/discover/workload/digital-downloads","kind":"atom"},{"id":"page:recipes:digital-downloads:laravel:relational-catalog","label":"Host digital downloads with Laravel: relational catalog data","canonicalPath":"/recipes/digital-downloads/laravel/relational-catalog","kind":"recipe"}],"parentIds":["workload:digital-downloads","stack:framework-laravel","pattern:transactional-workflows","intent:deploy-web-app"],"parents":[{"id":"workload:digital-downloads","label":"Digital downloads","canonicalPath":"/discover/workload/digital-downloads","kind":"atom"},{"id":"stack:framework-laravel","label":"Laravel","canonicalPath":"/discover/stack/framework-laravel","kind":"atom"},{"id":"pattern:transactional-workflows","label":"Transactional workflows","canonicalPath":"/discover/pattern/transactional-workflows","kind":"atom"},{"id":"intent:deploy-web-app","label":"Deploy web app","canonicalPath":"/discover/intent/deploy-web-app","kind":"atom"}],"resourceRequirements":["primitive:compute","primitive:postgres"],"infrastructureRequirements":[{"primitiveId":"primitive:compute","label":"Compute","canonicalPath":"/discover/primitive/compute","status":"verified","summary":"Apps run in isolated x86_64 Firecracker microVMs; sizes are the priced VM sizes."},{"primitiveId":"primitive:postgres","label":"Postgres","canonicalPath":"/discover/primitive/postgres","status":"verified","summary":"Managed PostgreSQL 16 with pgvector runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied."}],"framework":"Laravel","workload":"Digital downloads","releaseStatus":"published","supportStatus":"verified","executionStatus":"ready","docsOnly":false,"prerequisites":["A Laravel project that builds and starts with the documented commands (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template)","A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted, or supplied with --env)","An Ample account token with servers:write, databases:read"],"testedConfiguration":{"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"},"inputSchema":{"additionalProperties":false,"properties":{"env":{"description":"Encrypted environment variables (bucket credentials, secrets)","items":{"pattern":"^[A-Z][A-Z0-9_]*=.*$","type":"string"},"maxItems":50,"type":"array"},"name":{"description":"App name","maxLength":63,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"path":{"description":"Project directory or ample.toml service","maxLength":512,"minLength":1,"type":"string"},"release_command":{"description":"Migration command run before activation","maxLength":512,"type":"string"}},"required":["name","path"],"type":"object"},"outputSchema":null,"workflowSteps":[{"title":"Build and start","body":"composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template. The server must bind 0.0.0.0 on PORT."},{"title":"Implement the pattern on PostgreSQL","body":"The fixture's module implements transactional workflows: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected). Copy the approach into your schema; keep migrations idempotent and run them with --release-command."},{"title":"Deploy","body":"Run the synchronous deploy once and read the result (exit 0 live, 1 failed, 2 needs an answer first). Re-running with no change is a no-op.","command":"ample deploy . --name <app-name> --public"},{"title":"Verify","body":"Fetch the live URL and the pattern self-test route(s) (/p/transactional-workflows) from the example; then run your own checks. On failure read `ample logs <deployment_id> --kind build` then `--kind runtime`.","command":"ample logs <deployment_id> --kind build"}],"examples":[{"title":"Laravel pattern fixture","description":"Multi-pattern Laravel app whose transactional workflows module was checked live; the module is under tests/deploy-canaries/_pattern-modules.","sourceRef":"tests/deploy-canaries/laravel-patterns"}],"successChecks":[{"description":"app responds on its public URL","kind":"http_get","path":"/","expect":"ample canary laravel patterns"},{"description":"transactional-workflows self-test","kind":"http_get","path":"/p/transactional-workflows","expect":"tx=ok history=2 conflict=rejected"}],"limitations":["Verified on the php-8.5 template at s-1vcpu-1gb with the example fixture.","The pattern checks verified the platform side; the digital downloads itself (your domain records, validation rules and concurrency policy) is your application code.","Managed PostgreSQL 16 with pgvector; apps and their databases are placed together."],"costEstimate":{"currency":"USD","monthlyAmount":10.0,"authoritative":true,"basis":"size prices from pricing.toml (loaded by the API) at build revision 3a3dfe06151688a20d397caac2aa66e562c23eb0","components":[{"name":"app server","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0},{"name":"managed PostgreSQL database","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0}],"note":"Upper-bound monthly price of the tested sizes. Buckets are allocation-priced per quota and not included."},"evidenceSummary":[{"kind":"canary_run","summary":"Laravel pattern fixture deployed on Ample (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template); checks passed for transactional-workflows and configuration-secrets. Pattern proof: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected).","observedAt":"2026-11-06T06:00:29Z","implementationRevision":"5e3f3dc4c9a9","expiresAt":"2027-05-05T06:00:29Z","scope":{"checks":["/p/transactional-workflows"],"pattern":"pattern:transactional-workflows","template":"php-8.5"}},{"kind":"canary_run","summary":"The same Laravel app deployed with a --release-command migration; the marker it created was readable after activation.","observedAt":"2026-11-06T06:00:29Z","implementationRevision":"5e3f3dc4c9a9","expiresAt":"2027-05-05T06:00:29Z","scope":{"pattern":"pattern:transactional-workflows"}}],"lastVerifiedAt":"2026-11-06T06:00:29Z","mcpBinding":{"registryRef":"mcp:ample_deploy","toolName":"ample_deploy","schemaHash":"0802c329be823fa0695460cf73206d47a6fa0efa57417c386c34b6614a92ea5f","observedAt":"2026-11-06T06:16:17.558478534+00:00","implementationRevision":"4558e9477d09","requiredScopes":["servers:write","databases:read"],"bindingState":"current"},"unknowns":[],"formats":{"html":"https://ample.computer/recipes/digital-downloads/laravel/relational-catalog","markdown":"https://ample.computer/recipes/digital-downloads/laravel/relational-catalog.md","json":"https://api.ample.computer/v1/catalog/recipes/page%3Arecipes%3Adigital-downloads%3Alaravel%3Arelational-catalog"},"nextActions":[{"actionId":"browse-catalog","label":"Browse the catalog index","operationId":"catalog_index","method":"GET","relativePath":"/v1/catalog","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"search-recipes","label":"Search published recipes by intent, stack and constraints","operationId":"search_recipes","method":"POST","relativePath":"/v1/catalog/search","origin":"api","parameters":{"body":{"limit":5,"query":"Host digital downloads with Laravel: relational catalog data"}},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"plan:page:recipes:digital-downloads:laravel:relational-catalog","label":"Prepare a side-effect-free deployment plan for an authorized project","operationId":"plan_deployment","method":"POST","relativePath":"/v1/catalog/plan","origin":"api","parameters":{"body":{"inputs":{},"projectId":"<workspace or server id you own>","recipeId":"page:recipes:digital-downloads:laravel:relational-catalog","recipeRevision":"r1"}},"requiresAuthentication":true,"requiresApproval":false},{"actionId":"auth-setup","label":"Read the existing agent authentication setup","operationId":"existing_auth_setup","method":"GET","relativePath":"/mcp/setup","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:workload:digital-downloads","label":"Browse Digital downloads","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/workload%3Adigital-downloads","origin":"api","parameters":{"nodeId":"workload:digital-downloads"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:stack:framework-laravel","label":"Browse Laravel","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/stack%3Aframework-laravel","origin":"api","parameters":{"nodeId":"stack:framework-laravel"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:pattern:transactional-workflows","label":"Browse Transactional workflows","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/pattern%3Atransactional-workflows","origin":"api","parameters":{"nodeId":"pattern:transactional-workflows"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:intent:deploy-web-app","label":"Browse Deploy web app","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/intent%3Adeploy-web-app","origin":"api","parameters":{"nodeId":"intent:deploy-web-app"},"requiresAuthentication":false,"requiresApproval":false}]}