{"id":51339658,"url":"https://github.com/async/web","last_synced_at":"2026-07-02T06:04:46.810Z","repository":{"id":360611700,"uuid":"1248746677","full_name":"async/web","owner":"async","description":"Tiny local web runtime for static-hosted demos and fast Node-side integration tests.","archived":false,"fork":false,"pushed_at":"2026-06-12T22:49:28.000Z","size":336,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-13T01:08:03.366Z","etag":null,"topics":["runtime","website"],"latest_commit_sha":null,"homepage":null,"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/async.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-25T02:33:50.000Z","updated_at":"2026-06-12T23:15:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/async/web","commit_stats":null,"previous_names":["async-framework/miniweb","async-framework/async-web","async/web"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/async/web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/async%2Fweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/async%2Fweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/async%2Fweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/async%2Fweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/async","download_url":"https://codeload.github.com/async/web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/async%2Fweb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35035005,"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-07-02T02:00:06.368Z","response_time":173,"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":["runtime","website"],"created_at":"2026-07-02T06:04:46.192Z","updated_at":"2026-07-02T06:04:46.785Z","avatar_url":"https://github.com/async.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Async Web\n\nAsync Web is the workspace for the Async web ecosystem.\n\n- `@async/web` is the developer-facing app framework. Start here when you are building an app with app conventions, AsyncDB shortcuts, deployment defaults, and a simple path to production.\n- `@async/web/router` is the pure structured routing package. Use it for richer inspectable route specs, route composition, validation, and route table printing.\n- `@async/web/runtime` is the lower-level Request -\u003e Response runtime. Drop down here when you need explicit routing, runtime placement, cache behavior, platform simulation, provider hooks, or compile-away infrastructure control.\n\nThe original runtime direction is preserved: apps, routes, scoped platform APIs, cache stores, middleware, virtual browser behavior, and Vite compile-away behavior all remain centered on `platform.fetch()` entering a controlled Request -\u003e Response route graph.\n\n## Public Imports\n\n| Import | Role |\n| --- | --- |\n| `@async/web` | Friendly app authoring API that lowers conventions into WebRuntime config. |\n| `@async/web/router` | Pure `type`-tagged route specs and composition helpers. |\n| `@async/web/runtime` | Runtime engine, route graph, platform APIs, cache policies, tracing, provider extension points, and Vite compile-away plugin. |\n| `@async/db` | Data contracts, resources, schemas, operations, generated types, and store contracts. |\n\n## Quick Start\n\n```sh\npnpm add @async/web\n```\n\n```ts\nimport {\n  asyncDbApp,\n  browserApp,\n  defineApp,\n  fetchApp,\n  mount,\n  toApp,\n  tryApp\n} from '@async/web';\nimport dbConfig from './db.config.mjs';\n\nexport default defineApp({\n  origin: 'https://crm.acme.async.run',\n  apps: {\n    web: browserApp({\n      document: './apps/web/index.html',\n      basePath: '/',\n      fallback: 'spa'\n    }),\n    bff: fetchApp({\n      runtime: 'edge',\n      placement: 'global',\n      fetch: edgeFetch\n    }),\n    api: fetchApp({\n      runtime: 'origin',\n      basePath: '/api/',\n      region: 'us-east',\n      fetch: apiFetch\n    }),\n    db: asyncDbApp({\n      config: dbConfig,\n      basePath: '/db/',\n      region: 'same-as-api',\n      viewerPath: '/__db/'\n    })\n  },\n  routes: [\n    mount('/db', toApp('db')),\n    mount('/api', tryApp({}, [\n      toApp('bff'),\n      toApp('api')\n    ])),\n    toApp('web')\n  ]\n});\n```\n\n`browserApp()` creates a static browser `FetchApp` from a document and assets. `fetchApp()` keeps raw Fetch handlers as the lower-level escape hatch, and `asyncDbApp()` mounts the WebRuntime adapter while `@async/db` remains the data contract owner. `@async/web` also keeps app-level shortcuts such as `api: { dir: './src/api' }` and `db: dbConfig` for convention-based projects. The explicit `apps` and `routes` form is the source of truth when you need to see how browser, edge, backend, database, or other systems are wired.\n\nFor richer routing, import the advanced structured helpers from `@async/web/router`:\n\n```ts\nimport {\n  host,\n  method,\n  splitTraffic\n} from '@async/web/router';\n```\n\nDistribution is not a route type. Apps and route steps describe logical topology; placement and region policy live on app/runtime config and can later compile to provider infrastructure.\n\nUse `@async/web/runtime` directly when you want the runtime graph:\n\n```ts\nimport {\n  defineRuntime,\n  mount,\n  toApp\n} from '@async/web/runtime';\n\nexport default defineRuntime({\n  origin: 'https://crm.acme.async.run',\n  apps: {\n    web: {\n      runtime: 'browser',\n      basePath: '/',\n      fetch: webFetch\n    },\n    api: {\n      runtime: 'origin',\n      basePath: '/api/',\n      fetch: apiFetch\n    },\n    db: {\n      runtime: 'async-db',\n      basePath: '/db/',\n      fetch: asyncDbFetch\n    }\n  },\n  routes: [\n    mount('/db', toApp('db')),\n    mount('/api', toApp('api')),\n    toApp('web')\n  ]\n});\n```\n\n## Workspace\n\n```sh\npnpm install\npnpm run pipeline:verify\npnpm run pipeline:pages\npnpm run release:check\n```\n\n## Docs\n\n- [Getting Started](docs/getting-started.md)\n- [Concepts](docs/concepts.md)\n- [Web vs WebRuntime](docs/web-vs-webruntime.md)\n- [Router](docs/router.md)\n- [Routes and Cache](docs/routes-and-cache.md)\n- [Platform and Runtimes](docs/platform-and-runtimes.md)\n- [AsyncDB Integration](docs/async-db-integration.md)\n- [Mini Cloudflare](docs/mini-cloudflare.md)\n- [Vite Compile-Away](docs/vite-compile-away.md)\n- [Migration Guide](docs/migration-from-miniweb.md)\n\n## Non-Goals\n\nThis pass does not implement a hosted PaaS, billing, real provider provisioning, or a full Imperva/Fly/Cloudflare deployment adapter. Provider packages are extension points until the deployment layer is ready.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasync%2Fweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasync%2Fweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasync%2Fweb/lists"}