page:recipes:order tracking:nuxt:inventory imports

Host order tracking with Nuxt: inventory imports

Deploy a order tracking built with Nuxt on Ample using the bulk import staging 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, a private S3-compatible bucket holds objects with credentials delivered as encrypted environment variables. Verified on Nuxt: a CSV staged as an object, row-level validation with per-row errors recorded, and a restart-safe import keyed by import id (imported=2 rejected=1 restart=ok). Not separately tested: your import format, mapping and conflict rules; treat the order tracking-specific behavior as your application code.

Representative Queries

Prerequisites

  1. A Nuxt project that builds and starts with the documented commands (nuxt build then node .output/server/index.mjs (reads HOST and PORT) on the node-22 template)
  2. A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted, or supplied with --env)
  3. A bucket from ample bucket create with its credentials passed as encrypted S3_* environment variables
  4. An Ample account token with servers:write, databases:read, buckets:read

Tested Configuration

Workflow Steps

  1. Build and start: nuxt build then node .output/server/index.mjs (reads HOST and PORT) on the node-22 template. The server must bind 0.0.0.0 on PORT.
  2. Implement the pattern on PostgreSQL: The fixture's module implements bulk import staging: a CSV staged as an object, row-level validation with per-row errors recorded, and a restart-safe import keyed by import id (imported=2 rejected=1 restart=ok). Copy the approach into your schema; keep migrations idempotent and run them with --release-command.
  3. Wire object storage: Create the bucket(s), then pass endpoint, region, bucket and keys as --env values. Use path-style addressing. Keep private data in an unpublished bucket.
  4. Deploy: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
    • Command: ample deploy . --name --public --env S3_ENDPOINT=... --env S3_REGION=... --env S3_BUCKET=... --env S3_ACCESS_KEY_ID=... --env S3_SECRET_ACCESS_KEY=...
  5. Verify: Fetch the live URL and the pattern self-test route(s) (/api/p/bulk-import-staging) from the example; then run your own checks.
    • Command: ample logs --kind build

Success Checks

Limitations

  1. Verified only on the node-22 template at s-1vcpu-1gb with the example fixture.
  2. The order tracking itself is application code and was not separately tested.
  3. Region availability is unknown.
  4. Managed PostgreSQL 16 only; extensions, connection limits and backup or restore procedures are not verified.
  5. PutObject and GetObject with path-style addressing are verified; multipart upload and other S3 operations are not.

Cost Estimate

Last Verified