{"id":13880923,"url":"https://github.com/jails-org/Jails","last_synced_at":"2025-07-16T17:31:18.755Z","repository":{"id":2886780,"uuid":"3893791","full_name":"jails-org/Jails","owner":"jails-org","description":"Elegant and Minimalistic Web Components Micro Framework","archived":false,"fork":false,"pushed_at":"2025-07-10T00:03:51.000Z","size":2312,"stargazers_count":187,"open_issues_count":0,"forks_count":6,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-07-10T01:07:48.543Z","etag":null,"topics":["custom-element","hateoas","island-architecture","javascript","javascript-applications","javascript-library","javascript-tools","lightweight-javascript-library","micro-frontend","micro-frontends","web-component","web-components"],"latest_commit_sha":null,"homepage":"https://jails-js.org","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/jails-org.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"patreon":"jails"}},"created_at":"2012-04-01T16:39:00.000Z","updated_at":"2025-07-10T00:01:09.000Z","dependencies_parsed_at":"2023-11-11T00:21:48.428Z","dependency_job_id":"dc5406fc-01c2-4d86-b8bb-929181d80a4a","html_url":"https://github.com/jails-org/Jails","commit_stats":{"total_commits":757,"total_committers":14,"mean_commits":54.07142857142857,"dds":0.4623513870541611,"last_synced_commit":"052c3438a67f4df5455ae3fc5484edaf1e882567"},"previous_names":[],"tags_count":119,"template":false,"template_full_name":null,"purl":"pkg:github/jails-org/Jails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jails-org%2FJails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jails-org%2FJails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jails-org%2FJails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jails-org%2FJails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jails-org","download_url":"https://codeload.github.com/jails-org/Jails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jails-org%2FJails/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265527547,"owners_count":23782480,"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","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":["custom-element","hateoas","island-architecture","javascript","javascript-applications","javascript-library","javascript-tools","lightweight-javascript-library","micro-frontend","micro-frontends","web-component","web-components"],"created_at":"2024-08-06T08:03:39.822Z","updated_at":"2025-07-16T17:31:18.749Z","avatar_url":"https://github.com/jails-org.png","language":"TypeScript","funding_links":["https://patreon.com/jails"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"https://github.com/user-attachments/assets/8b4dbfb9-f05e-4b83-8d42-8847038a97e2\" alt=\"Jails\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eJails\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003eAn Elegant and Minimalistic\u003cbr /\u003e Web Components Micro-Framework\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable align=\"center\" border=\"0\"\u003e\n    \u003ctr\u003e\u003ctd align=\"center\"\u003e🏝 Built for \u003cbr/\u003e\u003ca href=\"https://www.patterns.dev/posts/islands-architecture/\" target=\"_blank\"\u003eIsland Architecture\u003c/a\u003e\u003c/td\u003c/tr\u003e\n    \u003ctd align=\"center\"\u003eƛ Inspired by \u003cbr/\u003e\u003ca href=\"https://guide.elm-lang.org/architecture/\" target=\"_blank\"\u003eElm Architecture\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🔗 Ready for \u003cbr/\u003e\u003ca href=\"https://htmx.org/essays/hypermedia-driven-applications\" target=\"_blank\"\u003ehypermedia applications\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/jails-js.svg?id=4\" alt=\"NPM Jails Version\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"MIT License\" /\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## ✍️ Abstract\n\nThe JavaScript ecosystem, including browsers and tools, has undergone significant evolution over the years. However, it's evident that many of the complexities introduced by frameworks today may not be essential for the majority of web applications. The prevailing trend in modern app development seems to prioritize expertise in frameworks over mastery of the language itself, often leading to a sense of being confined within the framework ecosystem.\n\nJails was designed to be:\n- **Decoupled** - Backend-agnostic, our solution seamlessly integrates with any backend framework or programming language. It refrains from importing styles and ensures a clean demarcation by avoiding mixing HTML within the codebase.\n- **Lightweight** - Lightweight, weighing in at just around 5kb when gzipped. It enhances your application's performance by progressively lightening the load, separating HTML from your JavaScript code. This practice results in smaller bundles and a more streamlined application.\n- **Interoperable** - It seamlessly integrates and functions alongside any other vanilla UI or behavioral libraries. You no longer need to wait for a specific Jails Chart.js library to be available; simply integrate it into your application hassle-free.\n\n\u003cbr clear=\"all\" /\u003e\n\u003cbr /\u003e\n\n## 👩🏻‍💻 Usage\n\n`index.html`\n```html\n....\n\n\u003capp-counter\u003e\n  \u003ctemplate\u003e\n    \u003ch1\u003e{{count}}\u003c/h1\u003e\n    \u003cbutton data-add\u003eAdd\u003c/button\u003e\n    \u003cbutton data-subtract\u003eSubtract\u003c/button\u003e\n  \u003c/template\u003e\n\u003c/app-counter\u003e\n\n\u003c!-- or alternate version ( Considering SSR on page load ) --\u003e\n\u003capp-counter\u003e\n  \u003ch1 html-inner=\"count\"\u003e0\u003c/h1\u003e\n  \u003cbutton data-add\u003eAdd\u003c/button\u003e\n  \u003cbutton data-subtract\u003eSubtract\u003c/button\u003e\n\u003c/app-counter\u003e\n```\n\n\u003cbr /\u003e\n\n`components/counter/index.ts`\n```ts\nexport default function appCounter({ main, on, state }) {\n\n  main( _ =\u003e {\n    on('click', '[data-add]', add)\n    on('click', '[data-subtract]', subtract)\n  })\n\n  const add = () =\u003e {\n    state.set( s =\u003e s.count+= 1 )\n  }\n\n  const subtract = () =\u003e {\n    state.set( s =\u003e s.count-= 1 )\n  }\n}\n\nexport const model = {\n  count: 0\n}\n```\n\n\u003cbr /\u003e\n\n`main.ts` \n```ts\nimport { register, start } from 'jails-js'\nimport * as appCounter from './components/counter'\n\n// Register all your components\nregister('app-counter', appCounter)\n\n// Execute Jails\nstart()\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 🎥 Best Scenarios to use\nJails is better suited for:\n        \n#### Server Side Rendered ( SSR )\n\n- Wordpress\n- Laravel\n- Ruby on Rails\n- Node Backend with a Template System:\n  - Pug, Liquid, Nunjucks, Handlebars etc.\n\n#### Static Site Generated ( SSG )\n\n- Hugo\n- Astro\n- Jekill\n- 11ty\n  ...etc\n\n... Any site you can add a script tag on it =). So if you already have a engine that renders your html, Jails can be a good way to create an elegant event driven system.\n\n\u003cbr /\u003e\n        \n## 📚 Demos \u0026 Docs\n\n- [Online Examples \u0026 Playground](https://stackblitz.com/@Javiani/collections/jails-organization)\n- [Documentation](https://jails-js.org/about/docs)\n\n\u003cbr /\u003e\n\n## ✋ Discussions\nJoin to the forum and be part of the project by asking, answering or discuss some aspect of the project and be welcome to help in your way.\n\n➡ [Discussions](https://github.com/jails-org/Jails/discussions)\n\n\u003cbr /\u003e\n        \n## 🎖 License\n\n[MIT](http://opensource.org/licenses/MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjails-org%2FJails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjails-org%2FJails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjails-org%2FJails/lists"}