{"id":31186038,"url":"https://github.com/skarab42/htms-js","last_synced_at":"2025-09-19T19:22:31.010Z","repository":{"id":314059190,"uuid":"1053162058","full_name":"skarab42/htms-js","owner":"skarab42","description":"HTMS 💨 Stream Async HTML, Stay SEO-Friendly","archived":false,"fork":false,"pushed_at":"2025-09-17T14:55:42.000Z","size":6350,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-17T16:48:33.489Z","etag":null,"topics":["async","express","fastify","hono","html","nodejs","seo","stream"],"latest_commit_sha":null,"homepage":"https://htms.skarab42.dev","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/skarab42.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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},"funding":{"github":"skarab42","custom":"http://paypal.me/skarab"}},"created_at":"2025-09-09T04:37:21.000Z","updated_at":"2025-09-17T14:53:30.000Z","dependencies_parsed_at":"2025-09-10T11:11:32.837Z","dependency_job_id":null,"html_url":"https://github.com/skarab42/htms-js","commit_stats":null,"previous_names":["skarab42/htms-js"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/skarab42/htms-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarab42%2Fhtms-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarab42%2Fhtms-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarab42%2Fhtms-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarab42%2Fhtms-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skarab42","download_url":"https://codeload.github.com/skarab42/htms-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarab42%2Fhtms-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275843879,"owners_count":25538987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"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":["async","express","fastify","hono","html","nodejs","seo","stream"],"created_at":"2025-09-19T19:22:25.402Z","updated_at":"2025-09-19T19:22:27.731Z","avatar_url":"https://github.com/skarab42.png","language":"TypeScript","funding_links":["https://github.com/sponsors/skarab42","http://paypal.me/skarab"],"categories":[],"sub_categories":[],"readme":"# htms 💨 Stream Async HTML, Stay SEO-Friendly\n\n[![npm htms-js](https://img.shields.io/npm/v/htms-js.svg?label=htms-js\u0026color=blue)](./packages/htms-js)\n[![npm fastify-htms](https://img.shields.io/npm/v/fastify-htms.svg?label=fastify-htms\u0026color=blue)](./packages/fastify-htms)\n[![npm fastify-htms](https://img.shields.io/npm/v/htms-server.svg?label=htms-server\u0026color=blue)](./packages/htms-server)\n[![build status](https://img.shields.io/github/actions/workflow/status/skarab42/htms-js/ci.yml?branch=main\u0026label=ci)](https://github.com/skarab42/htms-js/actions)\n[![codecov](https://codecov.io/github/skarab42/htms-js/branch/main/graph/badge.svg)](https://codecov.io/github/skarab42/htms-js)\n[![license](https://img.shields.io/github/license/skarab42/htms-js)](./license.md)\n[![stars](https://img.shields.io/github/stars/skarab42/htms-js?style=social)](https://github.com/skarab42/htms-js/stargazers)\n\n\u003e Send HTML that **renders instantly**, then **fills itself in** as async tasks complete. One response. No hydration. No empty shells.\n\nThis monorepo hosts the JavaScript implementation of **HTMS**: a proposal to progressively render HTML with async functions while staying SEO-friendly and lightweight.\n\n---\n\n## Packages\n\nThis workspace contains multiple packages:\n\n- [**htms-js**](./packages/htms-js) – Core library to tokenize, resolve, and stream HTML.\n- [**fastify-htms**](./packages/fastify-htms) – Fastify plugin that wires `htms-js` into Fastify routes.\n- [**htms-server**](./packages/htms-server) – CLI to quickly spin up a server and test streaming HTML.\n\nEach package has its own README with installation and usage instructions.\n\n\u003e 🦀 Rustacean? Check out [**htms-rs**](https://github.com/skarab42/htms-rs).\n\n---\n\n## Why try it\n\n- **Instant rendering:** browsers show HTML immediately.\n- **Progressive async:** placeholders stream in as soon as ready.\n- **Scoped modules:** keep tasks organized by context, even with nested `data-htms-module` blocks.\n- **SEO intact:** bots see full HTML.\n- **Tiny runtime:** one Web Component, injected automatically.\n- **Tech-agnostic:** works with Express, Fastify, Hono, workers, or even raw `stdout`.\n\n---\n\n## How it works\n\n1. **Tokenizer:** scans HTML for `data-htms`.\n2. **Resolver:** maps names to async functions.\n3. **Serializer:** streams HTML and emits chunks as tasks finish.\n4. **Client runtime:** swaps placeholders and cleans up markers.\n\nResult: **SEO-friendly streaming HTML** with minimal overhead.\n\n### Try the `curl` optimized demo\n\n```bash\n$ curl -N https://htms.skarab42.dev/curl\n```\n\n[![htms streaming flow animation](https://cdn.skarab42.dev/htms/images/htms-flow-animation.webp 'htms streaming flow animation')](https://htms.skarab42.dev/curl)\n\n### Try the (too much) dashboard demo\n\n[![htms streaming dashboard demo](https://cdn.skarab42.dev/htms/images/htms-dashboard-demo.webp 'htms streaming dashboard demo')](https://htms.skarab42.dev/)\n\n---\n\n## Status\n\nThis is **experimental**. APIs may change.\n\nWe'd love developers to:\n\n- **Experiment** in different contexts.\n- **Find limits:** performance, DX, compatibility.\n- **Challenge assumptions** and suggest alternatives.\n- **See if it fits your framework or stack.**\n\n---\n\n## Contribute\n\nHelp explore whether streaming HTML can be practical:\n\n- ⭐ [Star the repo](https://github.com/skarab42/htms-js)\n- 🐛 [Report issues](https://github.com/skarab42/htms-js/issues)\n- 💡 [Propose ideas](https://github.com/skarab42/htms-js/discussions)\n- 🙏 [Open PRs](https://github.com/skarab42/htms-js/pulls)\n\nThe only way to know where this works or breaks is to **try it together**.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskarab42%2Fhtms-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskarab42%2Fhtms-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskarab42%2Fhtms-js/lists"}