Skip to main content
Alpha

ERP Sync

This track builds a back-office data ingestion service — an ERP sync backend that watches for supplier data files, turns each one into a durable background job, scales that work behind a queue, and runs scheduled maintenance on a cron. It is the durable-processing companion to the main tutorials ladder: where that ladder ends at a request/response service plus a webhook, this one is about everything that happens off the request path.

  1. 1 · Scaffold
  2. 2 · Import job
  3. 3 · Polyglot transform
  4. 4 · Queue & cron
  5. 5 · Deploy

What you will build

By the end of this five-chapter track you will have my-erp/ on disk: a NetScript workspace with the workers and triggers plugins installed, a file-watch trigger that fires the moment a supplier drops a products_*.csv into a watched folder, a background job that parses it, a queue sized for throughput, and a cron schedule that runs recurring maintenance — all orchestrated locally by Aspire and visible in one dashboard. You will also understand how NetScript runs polyglot (non-TypeScript) transform tasks, so a Python or shell step can join the pipeline when TypeScript is not the right tool.

The spine is one idea repeated at every layer: durable background processing. An inbound file becomes a queued job; the job runs in an isolated worker; recurring work runs on a schedule; and nothing is lost across a restart.

The arc

supplier drops products_2024.csv          (a file lands in .data/incoming/products)
        │  defineFileWatch trigger fires on 'create'
        ▼
enqueueJob('import-products')             (a durable worker job, :8091)
        │  the job parses + records the rows
        ▼
queue provider (Deno KV → Redis/RabbitMQ) (sized for throughput in config)
        │
        ▼
cron / scheduled trigger                  (recurring re-sync + cleanup)

Chapter 3 steps off this hands-on spine to teach the polyglot runtime: how to define a python or shell task, the per-runtime permission model, and which runtimes NetScript supports. It is the one chapter you read rather than run end-to-end — and it says so plainly.

The chapters

Before you start

This track assumes the same local toolchain as the main ladder: a recent Deno and the .NET Aspire CLI on your PATH, plus Docker running so Aspire can provision Postgres and Redis. This track uses Postgres (the default; swap --db postgres for mysql, mssql, or sqlite when you scaffold). If NetScript is brand new to you, walk the Storefront tutorial first — it explains every generated directory in more depth than we re-cover here. This track then re-grounds you from a fresh scaffold, so you can start either place.