{"id":50319152,"url":"https://github.com/solcreek/adapter-creek","last_synced_at":"2026-05-29T02:06:29.828Z","repository":{"id":347707849,"uuid":"1194966749","full_name":"solcreek/adapter-creek","owner":"solcreek","description":"Next.js deployment adapter for Creek (Cloudflare Workers)","archived":false,"fork":false,"pushed_at":"2026-05-19T22:35:22.000Z","size":685,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-19T22:44:57.644Z","etag":null,"topics":["adapter","cloudflare","cloudflare-workers","creek","deployment","edge-computing","miniflare","nextjs","nextjs-adapter","serverless"],"latest_commit_sha":null,"homepage":"https://creek.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solcreek.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":"2026-03-29T03:23:07.000Z","updated_at":"2026-05-19T22:35:26.000Z","dependencies_parsed_at":"2026-05-19T21:02:53.153Z","dependency_job_id":null,"html_url":"https://github.com/solcreek/adapter-creek","commit_stats":null,"previous_names":["solcreek/adapter-creek"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/solcreek/adapter-creek","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solcreek%2Fadapter-creek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solcreek%2Fadapter-creek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solcreek%2Fadapter-creek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solcreek%2Fadapter-creek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solcreek","download_url":"https://codeload.github.com/solcreek/adapter-creek/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solcreek%2Fadapter-creek/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["adapter","cloudflare","cloudflare-workers","creek","deployment","edge-computing","miniflare","nextjs","nextjs-adapter","serverless"],"created_at":"2026-05-29T02:06:27.837Z","updated_at":"2026-05-29T02:06:29.817Z","avatar_url":"https://github.com/solcreek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adapter-creek\n\n[![npm](https://img.shields.io/npm/v/@solcreek/adapter-creek?color=brightgreen\u0026logo=npm)](https://www.npmjs.com/package/@solcreek/adapter-creek)\n[![checks](https://github.com/solcreek/adapter-creek/actions/workflows/checks.yml/badge.svg?branch=main)](https://github.com/solcreek/adapter-creek/actions/workflows/checks.yml)\n[![e2e deploy tests](https://github.com/solcreek/adapter-creek/actions/workflows/test-e2e-deploy.yml/badge.svg)](https://github.com/solcreek/adapter-creek/actions/workflows/test-e2e-deploy.yml)\n[![Next.js](https://img.shields.io/badge/next.js-%E2%89%A516.2-black?logo=nextdotjs)](https://nextjs.org/docs/app/api-reference/adapters)\n[![license](https://img.shields.io/npm/l/@solcreek/adapter-creek?color=blue)](./LICENSE)\n\nNext.js deployment adapter for [Creek](https://creek.dev).\n\n## What is Creek?\n\nCreek is an open-source edge deployment platform built on [Cloudflare Workers for Platforms](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/). It provides a managed infrastructure layer so you can deploy full-stack apps to the edge without managing Cloudflare resources directly.\n\n```bash\nnpx creek deploy\n# Live in seconds → https://my-app-acme.bycreek.com\n```\n\nCreek handles: multi-tenant isolation, preview URLs, custom domains, environment variables, DO bindings, static asset hosting, team management, and AI agent integration (MCP server) — all through a single CLI or API.\n\n## Why adapter-creek?\n\nThis adapter implements the Next.js 16.2+ `NextAdapter` interface to deploy Next.js apps through Creek's infrastructure. It bundles build output directly for Cloudflare Workers.\n\n**Creek vs. self-hosting with Cloudflare + opennext:**\n\n| | Creek | Cloudflare + opennext |\n|--|-------|----------------------|\n| Deploy | `creek deploy` (one command) | wrangler.toml + opennext build + wrangler deploy |\n| Config | Zero-config (auto-detect) | Manual wrangler.toml + open-next.config.ts |\n| CF account | Not needed | Required (your own account) |\n| Preview URLs | Automatic per-deploy | DIY routing |\n| Custom domains | `creek domains add` | CF Dashboard + manual DNS |\n| DO for ISR | Auto-injected | Manual setup + migration management |\n| Env variables | Encrypted, `creek env set` | wrangler.toml or CF Dashboard |\n| Teams / RBAC | Built-in | None |\n| Adapter updates | Creek team maintains | You maintain opennext patches |\n| Build pipeline | Adapter API (typed) | 8-step workaround chain |\n\nCreek is a **platform** — this adapter is the bridge between Next.js and that platform. opennext is a **tool** for self-hosting on your own CF account.\n\n## Status\n\nFull Next.js coverage on Cloudflare Workers — zero adapter-specific skips. The `test/deploy-tests-manifest.adapter-creek.json` file is empty; every test that runs against other adapters also runs (and passes) here.\n\n| Feature | Status |\n|---------|:------:|\n| Static pages / SSG | ✅ |\n| SSR (progressive streaming) | ✅ |\n| Middleware (edge + node runtimes) | ✅ |\n| Server Actions | ✅ |\n| App Router incl. PPR / `'use cache'` | ✅ |\n| ISR, tag / path revalidation | ✅ (Durable-Objects-backed) |\n| Image Optimization | ✅ CF Image Resizing |\n| `@vercel/og` (node + edge) | ✅ WASM-path |\n| `sqlite3` native-addon packages | ✅ transparent sql.js shim |\n| Multi-runtime isolation (opt-in) | ✅ `CREEK_MULTI_WORKER=1` |\n| Next.js e2e deploy suite | ✅ 100% of in-scope tests (full matrix green) |\n\n## Requirements\n\n- Next.js ≥ 16.2\n- Turbopack (default) or Webpack via `--webpack`\n\n## Usage\n\nThe adapter is used automatically when deploying with Creek:\n\n```bash\nnpx creek deploy\n```\n\nFor manual use, set `NEXT_ADAPTER_PATH`:\n\n```bash\nNEXT_ADAPTER_PATH=@solcreek/adapter-creek npx next build\n```\n\nOr configure in `next.config.js`:\n\n```js\nmodule.exports = {\n  adapterPath: require.resolve('@solcreek/adapter-creek'),\n}\n```\n\nOutput goes to `.creek/adapter-output/`:\n\n```\n.creek/adapter-output/\n  assets/              — static files (WfP Static Assets API)\n  server/worker.js     — bundled CF Workers entry (single-worker mode)\n  server/wrangler.toml — bindings, DOs, nodejs_compat flags\n  manifest.json        — deploy metadata\n```\n\n### Opt-in multi-worker mode (enterprise-tier)\n\n`CREEK_MULTI_WORKER=1` switches the build to a 3-worker topology with runtime-label-aware dispatch — the same shape Vercel uses for its per-runtime deployment model. Unlocks Node-runtime × Edge-runtime isolation inside a single Creek deploy without losing the `env.*` bindings that Next.js expects.\n\n```\n.creek/adapter-output/\n  dispatcher/worker.js    — route → runtime map + service-binding fan-out\n  node-runtime/worker.js  — nodejs handlers\n  edge-runtime/worker.js  — edge handlers\n  assets/ …\n```\n\n## How It Works\n\n```\nnext build  (Turbopack by default, Webpack via --webpack)\n  → modifyConfig\n      • `outputFileTracingRoot` (monorepo aware)\n      • `cacheMaxMemorySize: 0` (we ship a DO-backed IncrementalCache)\n      • `maxPostponedStateSize: 20mb` (workerd-safe PPR fallback size)\n\n  → onBuildComplete\n      1. Collect static files from typed outputs\n      2. Embed .next/ manifests (JSON + JS, base64-safe)\n      3. Seed ISR/`'use cache'` entries (composable cache handler in-bundle)\n      4. Bundle `.sqlite` fixtures via Next.js's file trace\n      5. Generate the worker entry\n           - middleware + `@next/routing` resolveRoutes\n           - streaming HTML with `Content-Encoding: identity` pin\n             (stops miniflare's edge-sim from bulk-gzipping progressive chunks)\n           - edge/node dispatch via `_ENTRIES` registry\n           - same-origin `fetch()` coalescer for RSC chunk-count fidelity\n           - `IncomingMessage` / `ServerResponse` bridge\n      6. Post-process Turbopack output\n           - hard-resolve `[externals]*.js` lazy-requires\n           - collect ssr/ lazy-require aliases → wrangler `alias` map\n           - (preserves module identity; no source rewrite of ssr/ chunks)\n      7. esbuild + workerd bundle via `wrangler --dry-run`\n      8. Write `.creek/adapter-output/` + deploy manifest\n```\n\nSide systems plugged in for specific Next.js features:\n\n- **`@solcreek/adapter-creek` sqlite3 shim** — post-install patch at `scripts/patch-node-modules-sqlite3.mjs` replaces `node_modules/sqlite3`'s native binding with a sql.js-backed drop-in so user code that imports `sqlite3` builds and runs on workerd. Same-API, WASM-path.\n- **Content-Encoding: identity on FL-compressed types** — labels text/html / text/plain / JSON / RSC streams so miniflare's edge-simulator doesn't collapse progressive chunks into a single gzipped blob. Real CF edge still re-compresses at the byte-stream level in production.\n\n## Testing\n\nThis adapter runs the [Next.js adapter test suite](https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath#testing-adapters) against the real workerd runtime via [miniflare](https://miniflare.dev/) embedded in-process (not `wrangler dev` spawning a subprocess).\n\nEach adapter tests against its own target runtime:\n\n| Adapter | Test runtime |\n|---------|-------------|\n| adapter-vercel | Node.js (`next start`) |\n| adapter-bun | Bun (`bun serve`) |\n| **adapter-creek** | **CF Workers via miniflare** |\n\nThis ensures test results reflect real workerd behaviour — `nodejs_compat` boundaries, V8 isolate limits, chunked transfer semantics — not a Node.js approximation.\n\n### Harness scripts\n\n```bash\nscripts/e2e-deploy.sh              # Build + start miniflare, print localhost URL\nscripts/e2e-logs.sh                # Return BUILD_ID, DEPLOYMENT_ID, server logs\nscripts/e2e-cleanup.sh             # Stop the miniflare process + its children\nscripts/worker-dev-server-miniflare.mjs   # single-worker launcher (default)\nscripts/multi-worker-dev.mjs              # 3-worker launcher (CREEK_MULTI_WORKER=1)\n```\n\n### Running locally\n\n```bash\n# Clone the Next.js repo alongside this adapter\ngit clone --depth 25 --branch canary https://github.com/vercel/next.js nextjs\ncd nextjs \u0026\u0026 pnpm install \u0026\u0026 pnpm build \u0026\u0026 pnpm install\npnpm playwright install chromium\n\n# Single test, default single-worker mode\n./scripts/local-test.sh test/e2e/app-dir/actions/app-action.test.ts\n\n# Opt-in multi-worker mode\nCREEK_MULTI_WORKER=1 ./scripts/local-test.sh test/e2e/app-dir/actions/app-action.test.ts\n```\n\n### CI\n\n- `.github/workflows/checks.yml` — PR + push on main; typecheck, unit tests, build\n- `.github/workflows/test-e2e-deploy.yml` — workflow_dispatch; full 16-way e2e matrix against canary Next.js\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolcreek%2Fadapter-creek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolcreek%2Fadapter-creek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolcreek%2Fadapter-creek/lists"}