{"id":50276801,"url":"https://github.com/mysbryce/webx","last_synced_at":"2026-05-27T21:02:08.781Z","repository":{"id":356619063,"uuid":"1233339396","full_name":"mysbryce/webx","owner":"mysbryce","description":"Vanilla ES module UI framework and CLI for WebX projects.","archived":false,"fork":false,"pushed_at":"2026-05-08T21:32:19.000Z","size":304,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T23:30:56.547Z","etag":null,"topics":["fivem","framework","vanilla-js"],"latest_commit_sha":null,"homepage":"https://webx.sure-developer.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mysbryce.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":"2026-05-08T21:16:16.000Z","updated_at":"2026-05-08T21:32:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mysbryce/webx","commit_stats":null,"previous_names":["mysbryce/webx"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mysbryce/webx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysbryce%2Fwebx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysbryce%2Fwebx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysbryce%2Fwebx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysbryce%2Fwebx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mysbryce","download_url":"https://codeload.github.com/mysbryce/webx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysbryce%2Fwebx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33583399,"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-27T02:00:06.184Z","response_time":53,"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":["fivem","framework","vanilla-js"],"created_at":"2026-05-27T21:02:07.989Z","updated_at":"2026-05-27T21:02:08.761Z","avatar_url":"https://github.com/mysbryce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebX 5M\n\n![WebX 5M logo](docs/public/webx-logo.svg)\n\nWebX 5M is a lightweight vanilla ES module UI framework and FiveM NUI boilerplate. It gives you component files, reactive state, template bindings, scoped CSS, stores, lifecycle hooks, and CFX/NUI helpers without a build step for the runtime UI.\n\n## Features\n\n- Component-based UI with `app.js`, `template.html`, and optional `style.css`\n- Text interpolation with `{{ expression }}`\n- Event and action bindings with `@click`, `@keyup.enter`, and modifiers\n- JavaScript bindings with `:title`, `:show`, `:class`, `:style`, `:ref`, and more\n- Two-way form state with `sync`\n- Reactive `data`, `props`, and stores powered by `Proxy`\n- `watch` support for data, props, and store values\n- Props validation with Zod and an in-page error overlay\n- Control flow with `\u003cfor\u003e`, `\u003cif\u003e`, `\u003celseif\u003e`, and `\u003celse\u003e`\n- Scoped CSS with class name rewriting\n- `onMounted` and `onUnmounted` lifecycle hooks\n- `onCfx` and `cfx.call` helpers for FiveM NUI messages and callbacks\n\n## Create a Project\n\n```bash\nbunx webx-5m create my-app\n```\n\nThis clones the WebX template, removes the template `.git` folder, and installs dependencies when a `package.json` is found.\n\nTo create the files without installing dependencies:\n\n```bash\nbunx webx-5m create my-app --no-install\n```\n\n## Generate `webx.json`\n\nAfter adding or removing components in `web/components`, run:\n\n```bash\nbunx webx-5m generate\n```\n\nThe command scans component folders that contain both `app.js` and `template.html`, then updates `web/webx.json`.\n\nChoose the main component manually:\n\n```bash\nbunx webx-5m generate --main home\n```\n\n## Project Structure\n\n```txt\nweb/\n  index.html\n  webx.json\n  components/\n    home/\n      app.js\n      template.html\n      style.css\n  directives/\n    index.js\n  stores/\n    appStore.js\n  wbx/\n    app.js\n    core/\n```\n\n## Component Example\n\n`web/components/counter/app.js`\n\n```js\nimport z from 'zod'\n\nexport default {\n  template: 'Counter',\n  props: {\n    title: z.string()\n  },\n  data: {\n    count: 0\n  },\n  method: {\n    increment() {\n      this.data.count++\n    }\n  },\n  watch: {\n    count(value, previousValue) {\n      console.log('count changed:', previousValue, value)\n    }\n  }\n}\n```\n\n`web/components/counter/template.html`\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv class=\"counter\"\u003e\n    \u003ch1\u003e{{ title }}\u003c/h1\u003e\n    \u003cp\u003e{{ count }}\u003c/p\u003e\n    \u003cbutton @click=\"increment\"\u003eIncrement\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## FiveM NUI\n\nReceive dynamic NUI messages with `onCfx`:\n\n```js\nimport z from 'zod'\n\nexport default {\n  onCfx: {\n    'app:updateTitle': {\n      schema: z.string(),\n      handler(title) {\n        this.data.name = title\n      }\n    }\n  }\n}\n```\n\nCall a NUI callback with `cfx.call`:\n\n```js\nconst response = await this.cfx.call('counter:getValue', {\n  count: this.data.count\n}, {\n  ok: true,\n  value: this.data.count\n})\n```\n\nThe third argument is mock data for browser development.\n\n## Documentation\n\nThe documentation app lives in `docs` and is built with Next.js and Fumadocs.\n\n```bash\ncd docs\nnpm run dev\n```\n\nOpen `http://localhost:3000/docs`.\n\n## License\n\nGPL-3.0-only\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysbryce%2Fwebx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmysbryce%2Fwebx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysbryce%2Fwebx/lists"}