page:recipes:recruiting tracker:next js:csv imports

Host Recruiting Tracker with Next.js: CSV Imports

Deploy a recruiting tracker built with Next.js 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 Next.js: 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).

Summary

Workload Requirements

Prerequisites

  1. A Next.js project that builds and starts with the documented commands (next build then next start -H 0.0.0.0 -p $PORT on the node-22 template).
  2. A PostgreSQL driver reading DATABASE_URL at runtime.
  3. A bucket from ample bucket create with its credentials as encrypted S3_* environment variables.
  4. An Ample account token with appropriate access permissions.

Tested Configuration

Workflow Steps

  1. Build and start:

    • Command: next build then next start -H 0.0.0.0 -p $PORT on the node-22 template
  2. Implement the pattern on PostgreSQL:

    • The fixture's module implements bulk import staging: a CSV staged as an object, row-level validation, and a restart-safe import.
  3. Wire object storage:

    • Create the bucket(s), then pass endpoint, region, bucket, and keys as --env values.
  4. Deploy:

    • 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:

    • Command: ample logs --kind build

Next Actions

Limitations

Cost Estimate

Evidence Summary

For more details, please refer to the documentation.