{"id":45476149,"url":"https://github.com/kvet/queuert","last_synced_at":"2026-05-21T20:01:11.727Z","repository":{"id":331956419,"uuid":"1084788632","full_name":"kvet/queuert","owner":"kvet","description":"Control flow library for your persistency layer driven applications","archived":false,"fork":false,"pushed_at":"2026-05-14T18:58:33.000Z","size":4083,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-14T19:05:39.393Z","etag":null,"topics":["background-jobs","job-queue","mongodb","nodejs","postgresql","queue","sqlite","transactional-outbox","typescript","workflow"],"latest_commit_sha":null,"homepage":"https://kvet.github.io/queuert/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kvet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-28T06:50:21.000Z","updated_at":"2026-05-01T16:57:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"8089e23d-4577-437e-8e62-4cf4210065cf","html_url":"https://github.com/kvet/queuert","commit_stats":null,"previous_names":["kvet/queuert"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/kvet/queuert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvet%2Fqueuert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvet%2Fqueuert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvet%2Fqueuert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvet%2Fqueuert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kvet","download_url":"https://codeload.github.com/kvet/queuert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvet%2Fqueuert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33136110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-jobs","job-queue","mongodb","nodejs","postgresql","queue","sqlite","transactional-outbox","typescript","workflow"],"created_at":"2026-02-22T15:01:15.510Z","updated_at":"2026-05-21T20:01:11.710Z","avatar_url":"https://github.com/kvet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Queuert\n\n[![npm version](https://img.shields.io/npm/v/queuert.svg)](https://www.npmjs.com/package/queuert)\n[![license](https://img.shields.io/github/license/kvet/queuert.svg)](https://github.com/kvet/queuert/blob/main/LICENSE)\n\n**Durable, typed job chains that commit with your database transactions.**\n\nQueuert is a job-chain library — durable, typed background work in your database. Job chains compose like Promise chains (`.then`, `Promise.all`), but they survive crashes and commit with your transactions. Postgres or SQLite, no Redis required, no separate server.\n\n[**Documentation**](https://kvet.github.io/queuert/) | [**Getting Started**](https://kvet.github.io/queuert/getting-started/introduction/) | [**Comparison**](https://kvet.github.io/queuert/comparison/)\n\n## How it looks\n\nDefine a typed chain of jobs. Each step's input, output, and continuation are inferred — wrong-shape continuations are compile errors.\n\n```ts\nconst jobTypes = defineJobTypes\u003c{\n  \"provision-account\": {\n    entry: true;\n    input: { userId: number };\n    continueWith: { typeName: \"send-welcome-email\" };\n  };\n  \"send-welcome-email\": {\n    input: { userId: number; accountId: string };\n    continueWith: { typeName: \"sync-to-crm\" };\n  };\n  \"sync-to-crm\": {\n    input: { userId: number; accountId: string };\n  };\n}\u003e();\n```\n\nStart the chain _inside_ your DB transaction. If the transaction rolls back, the chain is never created. No outbox glue, no dual-write window.\n\n```ts\nconst client = await createClient({ stateAdapter, jobTypes });\n\nawait withTransactionHooks(async (transactionHooks) =\u003e\n  db.transaction(async (tx) =\u003e {\n    const user = await tx.users.create({ name: \"Alice\", email: \"alice@example.com\" });\n\n    await client.startChain({\n      tx,\n      transactionHooks,\n      typeName: \"provision-account\",\n      input: { userId: user.id },\n      //         ↑ wrong shape here is a compile error\n    });\n  }),\n);\n```\n\nEach handler continues with the next step. The compiler enforces that `continueWith` matches the declared next type's input.\n\n```ts\nconst worker = await createInProcessWorker({\n  client,\n  processors: createProcessors({\n    client,\n    jobTypes,\n    processors: {\n      \"provision-account\": {\n        attemptHandler: async ({ job, complete }) =\u003e {\n          const accountId = await provisionAccount(job.input.userId);\n\n          return complete(async ({ continueWith }) =\u003e\n            continueWith({\n              typeName: \"send-welcome-email\",\n              input: { userId: job.input.userId, accountId },\n              //      ↑ missing accountId would be a compile error\n            }),\n          );\n        },\n      },\n      // ...handlers for \"send-welcome-email\" and \"sync-to-crm\"\n    },\n  }),\n});\n\nconst stop = await worker.start();\n```\n\n## Where it fits\n\nBackground-work libraries trade off across two axes: what storage tier they own, and what shape of work they model.\n\n|                       | Queuert               | pg-boss             | BullMQ            | Temporal          | Inngest           |\n| --------------------- | --------------------- | ------------------- | ----------------- | ----------------- | ----------------- |\n| Category              | Job-chain library     | Job queue           | Job queue         | Workflow platform | Workflow platform |\n| Storage               | Your DB (PG / SQLite) | Postgres            | Redis             | Separate cluster  | Inngest server    |\n| Transactional enqueue | ✅ structural         | 🟡 per-call adapter | ❌ app discipline | ❌ app discipline | ❌ app discipline |\n| Operate a server?     | No                    | No                  | Redis             | Yes               | Yes               |\n\nQueuert sits between job queues and workflow engines. A one-job chain _is_ a queue; a multi-step chain with blockers is closer to a workflow. Neither label fully fits, which is why the canonical term is \"job-chain library.\"\n\nFor deeper comparisons, see the [docs site](https://kvet.github.io/queuert/comparison/) — one page per neighbor.\n\n## Why Queuert\n\n- **Transactional, both ends.** Enqueue commits inside your DB transaction; handler completion and next-step `continueWith` commit in the same transaction as your domain writes. For DB-bound work, no outbox at enqueue and no idempotency-key ritual at processing — both halves are structural.\n- **Typed job chains.** Inputs, outputs, continuations, and blockers infer end-to-end via `defineJobTypes`. Refactoring is compiler-checked.\n- **Lives in your database.** Postgres or SQLite. No Redis required, no workflow server, no separate persistence tier to operate.\n- **Sub-second wakeup.** `LISTEN/NOTIFY` (or Redis pub/sub, or NATS) wakes workers when a row commits — not on a polling timer.\n- **Schedule for later.** Delay a chain to a specific time or duration. Schedule retries with backoff. Future work, no extra infrastructure.\n- **Deduplication.** Pass a deduplication key on enqueue. Identical keys collapse to a single chain — at-most-once, by construction.\n- **Lean and battle-tested.** Zero runtime dependencies in every package — driver libraries are `peerDependencies` you already own. 4,000+ tests across adapters and a shared conformance suite every state and notify adapter must pass.\n\n## Installation\n\n```bash\n# Core (required)\nnpm install queuert\n\n# State adapter (pick one)\nnpm install @queuert/postgres   # PostgreSQL — recommended for production\nnpm install @queuert/sqlite     # SQLite (experimental)\n\n# Notify adapter (optional, for sub-second wakeup)\nnpm install @queuert/redis      # Redis pub/sub\nnpm install @queuert/nats       # NATS pub/sub (experimental)\n# Or use PostgreSQL LISTEN/NOTIFY via @queuert/postgres — no extra infra\n\n# Dashboard (optional, experimental)\nnpm install @queuert/dashboard\n\n# Observability (optional)\nnpm install @queuert/otel\n```\n\n## Learn more\n\n- [Getting Started](https://kvet.github.io/queuert/getting-started/introduction/)\n- [Chain Patterns](https://kvet.github.io/queuert/guides/chain-patterns/)\n- [Transaction Hooks](https://kvet.github.io/queuert/guides/transaction-hooks/)\n- [Job Blockers](https://kvet.github.io/queuert/guides/job-blockers/)\n- [Comparison with other libraries](https://kvet.github.io/queuert/comparison/)\n- [Benchmarks](https://kvet.github.io/queuert/benchmarks/)\n- [API Reference](https://kvet.github.io/queuert/reference/queuert/client/)\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvet%2Fqueuert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkvet%2Fqueuert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvet%2Fqueuert/lists"}