{"id":45476149,"url":"https://github.com/kvet/queuert","last_synced_at":"2026-04-02T20:15:49.614Z","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-03-31T20:24:58.000Z","size":3555,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T20:40:59.327Z","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-03-31T20:25:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"4864bcb2-ea39-4da4-b9c8-d38d42ed5944","html_url":"https://github.com/kvet/queuert","commit_stats":null,"previous_names":["kvet/queuert"],"tags_count":20,"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":31315301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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-04-02T20:15:49.609Z","avatar_url":"https://github.com/kvet.png","language":"TypeScript","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\nControl flow library for your persistency layer driven applications.\n\n[**Documentation**](https://kvet.github.io/queuert/) | [**Getting Started**](https://kvet.github.io/queuert/getting-started/introduction/)\n\nRun your application logic as a series of background jobs that are started alongside state change transactions in your persistency layer. Perform long-running tasks with side-effects reliably in the background and keep track of their progress in your database. Own your stack and avoid vendor lock-in by using the tools you trust.\n\n## Quick Example\n\nImagine a user signs up and you want to send them a welcome email. You don't want to block the registration request, so you queue it as a background job.\n\n```ts\nconst jobTypeRegistry = defineJobTypeRegistry\u003c{\n  \"send-welcome-email\": {\n    entry: true;\n    input: { userId: number; email: string; name: string };\n    output: { sentAt: string };\n  };\n}\u003e();\n\nconst client = await createClient({\n  stateAdapter,\n  jobTypeRegistry,\n});\n\nawait withTransactionHooks(async (transactionHooks) =\u003e\n  db.transaction(async (tx) =\u003e {\n    const user = await tx.users.create({\n      name: \"Alice\",\n      email: \"alice@example.com\",\n    });\n\n    await client.startJobChain({\n      tx,\n      transactionHooks,\n      typeName: \"send-welcome-email\",\n      input: { userId: user.id, email: user.email, name: user.name },\n    });\n  }),\n);\n```\n\nWe scheduled the job inside a database transaction. This ensures that if the transaction rolls back (e.g., user creation fails), the job is not started. No orphaned emails. (Refer to transactional outbox pattern.)\n\nLater, a background worker picks up the job and sends the email:\n\n```ts\nconst worker = await createInProcessWorker({\n  client,\n  jobTypeProcessorRegistry: createJobTypeProcessorRegistry({\n    client,\n    jobTypeRegistry,\n    processors: {\n      \"send-welcome-email\": {\n        attemptHandler: async ({ job, complete }) =\u003e {\n          await sendEmail({\n            to: job.input.email,\n            subject: \"Welcome!\",\n            body: `Hello ${job.input.name}, welcome to our platform!`,\n          });\n\n          return complete(async () =\u003e ({\n            sentAt: new Date().toISOString(),\n          }));\n        },\n      },\n    },\n  }),\n});\n\nconst stop = await worker.start(); // Call stop() for graceful shutdown\n```\n\n## Why Queuert?\n\n- **Your database is the source of truth** — No separate persistence layer. Jobs live alongside your application data.\n- **True transactional consistency** — Start jobs inside your database transactions. If the transaction rolls back, the job is never created. No dual-write problems.\n- **No vendor lock-in** — Works with PostgreSQL and SQLite. Bring your own ORM (Kysely, Drizzle, Prisma, raw drivers).\n- **Simple mental model** — Job chains work like Promise chains. No determinism requirements, no replay semantics to learn.\n- **Full type safety** — TypeScript inference for inputs, outputs, continuations, and blockers. Catch errors at compile time.\n- **Flexible notifications** — Use Redis, NATS, or PostgreSQL LISTEN/NOTIFY for low-latency. Or just poll—no extra infrastructure required.\n- **MIT licensed** — No enterprise licensing concerns.\n\n## Installation\n\n```bash\n# Core package (required)\nnpm install queuert\n\n# State adapters (pick one)\nnpm install @queuert/postgres  # PostgreSQL - recommended for production\nnpm install @queuert/sqlite    # SQLite (experimental)\n\n# Notify adapters (optional, for reduced latency)\nnpm install @queuert/redis     # Redis pub/sub - recommended for production\nnpm install @queuert/nats      # NATS pub/sub (experimental)\n# Or use PostgreSQL LISTEN/NOTIFY via @queuert/postgres (no extra infra)\n\n# Dashboard (optional)\nnpm install @queuert/dashboard  # Embeddable web UI for job observation (experimental)\n\n# Observability (optional)\nnpm install @queuert/otel      # OpenTelemetry metrics and tracing\n```\n\n## Learn More\n\nVisit the [documentation site](https://kvet.github.io/queuert/) for guides on:\n\n- [Transaction Hooks](https://kvet.github.io/queuert/guides/transaction-hooks/)\n- [Job Processing Modes](https://kvet.github.io/queuert/guides/processing-modes/)\n- [Job Chain Patterns](https://kvet.github.io/queuert/guides/chain-patterns/)\n- [Error Handling](https://kvet.github.io/queuert/guides/error-handling/)\n- [Scheduling \u0026 Recurring Jobs](https://kvet.github.io/queuert/guides/scheduling/)\n- [Deduplication](https://kvet.github.io/queuert/guides/deduplication/)\n- [Feature Slices](https://kvet.github.io/queuert/guides/slices/)\n- [Horizontal Scaling](https://kvet.github.io/queuert/guides/horizontal-scaling/)\n- [Dashboard](https://kvet.github.io/queuert/integrations/dashboard/)\n- [Observability](https://kvet.github.io/queuert/integrations/observability/)\n- And more...\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"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"}