{"id":27963113,"url":"https://github.com/hudson-newey/2web","last_synced_at":"2026-07-01T13:31:24.638Z","repository":{"id":284932384,"uuid":"955302455","full_name":"hudson-newey/2web","owner":"hudson-newey","description":"[WIP] 🧑‍💻 A compiler-based web framework for blazing fast web apps","archived":false,"fork":false,"pushed_at":"2026-06-26T12:01:09.000Z","size":27712,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-26T12:12:27.323Z","etag":null,"topics":["compiler","framework","frontend","server-rendering","ssg","static-site-generator","web-framework"],"latest_commit_sha":null,"homepage":"https://grathium-industries.github.io/posts/deployments/2web/","language":"Go","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/hudson-newey.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-03-26T12:36:45.000Z","updated_at":"2026-06-26T12:01:19.000Z","dependencies_parsed_at":"2025-03-28T13:24:48.479Z","dependency_job_id":"29e34565-3ff7-4f34-b3a4-145901f651dc","html_url":"https://github.com/hudson-newey/2web","commit_stats":null,"previous_names":["hudson-newey/2web","two-web/2web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hudson-newey/2web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudson-newey%2F2web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudson-newey%2F2web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudson-newey%2F2web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudson-newey%2F2web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hudson-newey","download_url":"https://codeload.github.com/hudson-newey/2web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudson-newey%2F2web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35009267,"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-01T02:00:05.325Z","response_time":130,"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":["compiler","framework","frontend","server-rendering","ssg","static-site-generator","web-framework"],"created_at":"2025-05-07T19:58:09.234Z","updated_at":"2026-07-01T13:31:24.633Z","avatar_url":"https://github.com/hudson-newey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2 Web\n\nA web framework that compiles straight to lazy loaded HTML, CSS and JS with\nnear-zero runtime overhead.\n\nI am to make all reactivity compiled so that there is minimal runtime overhead.\n\n## Resources\n\n- [Tutorial (beta)](./docs/README.md)\n- [CLI Documentation](./cli/README.md)\n\n## Basic Counter Example\n\n```html\n\u003cscript compiled\u003e\n  $ count = 0;\n\u003c/script\u003e\n\n\u003ch1\u003e{{ $count }}\u003c/h1\u003e\n\n\u003cbutton @click=\"$count = $count + 1\"\u003eIncrement\u003c/button\u003e\n\u003cbutton @click=\"$count = $count - 1\"\u003eDecrement\u003c/button\u003e\n```\n\n## Quick Start\n\nInstall the 2web cli.\n\n```sh\n$ npm install -g @two-web/cli\n\u003e\n```\n\nGenerate a new 2web project.\n\n```sh\n$ 2web new \u003cproject_name\u003e\n\u003e\n```\n\n## Structure\n\n### [Compiler](./compiler/)\n\nThe 2Web compiler can optimize existing HTML, JavaScript/TypeScript, and\nCSS/SCSS/SASS code while also providing a \"fixed\" syntax of HTML.\n\n#### Optimizations\n\n1. The compiler can recognize that a resource is not on the hot-path, and will\n   lazy load the resource.\n2. The compiler can identify dynamic parts of the page and automatically apply\n   `contains` and `will-change` optimizations.\n3. (**TODO**) Automatically create pages for dynamic routes using the\n   `[param_name]` file name syntax.\n\n#### Improvements\n\n1. First-class TypeScript support in `\u003cscript\u003e` tags\n2. (**TODO**) First-class SASS/SCSS support in `\u003cstyle\u003e` and `\u003clink\u003e` tags\n3. (**TODO**) All elements can now self-close (e.g. `\u003cscript src=\"my-script.ts\" /\u003e`)\n4. (**TODO**) You can escape HTML tokens (e.g. `\u003c`) by using back slashes\n   (e.g. `/\u003c` will display a `\u003c` character).\n5. Tags inside of `\u003ccode\u003e` blocks no longer need to use HTML escape codes.\n6. You can import `.html` files as components.\n7. New JavaScript reactive variable declaration syntax using `$` keyword.\n8. Create web pages without HTML boilerplate\n9. Create web pages using Markdown\n\n### [2web/kit](./packages/)\n\nThe 2Web kit is a package containing framework agnostic helpers to build fast\nand robust web applications.\n\n### [CLI](./cli/)\n\nProvides a standardized (opinionated) way to set up a project.\n\nThe CLI also contains a lot of templates and generators that can be used to\neasily add functionality such as SSR, database, load balancers, etc... to your\napplication with one command.\n\n### VsCode Extension\n\nA vscode extension to integrate with the 2web cli.\n\n### MCP Server\n\n2Web comes with a built-in MCP server that can be used to directly connect LLMs\nand code editors to your 2Web project for AI-enhanced development.\n\n## Additional Libraries\n\n2Web is not intended to be a complete solution for web development, and is\ninstead supposed to patch quirks.\n\nYou should **consider** using the following libraries with 2Web.\n\n- [Tailwind preflight (for css reset)](https://tailwindcss.com/docs/preflight)\n- [zod (for form/input validation)](https://zod.dev/)\n- [Injection-js (for DI)](https://github.com/mgechev/injection-js)\n- [Lion](https://lion.js.org/)\n- [deno std library](https://jsr.io/@std)\n- [ts-toolbelt](https://github.com/millsp/ts-toolbelt)\n- [tanstack/hotkeys](https://tanstack.com/hotkeys/latest)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudson-newey%2F2web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhudson-newey%2F2web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudson-newey%2F2web/lists"}