{"id":13626704,"url":"https://github.com/cztomsik/graffiti","last_synced_at":"2025-05-16T18:10:53.938Z","repository":{"id":33546744,"uuid":"154177632","full_name":"cztomsik/graffiti","owner":"cztomsik","description":"HTML/CSS engine for node.js and deno.","archived":false,"fork":false,"pushed_at":"2023-11-08T17:06:06.000Z","size":4720,"stargazers_count":939,"open_issues_count":2,"forks_count":18,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-16T13:09:47.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://tomsik.cz/graffiti","language":"Zig","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/cztomsik.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}},"created_at":"2018-10-22T16:30:00.000Z","updated_at":"2025-05-16T00:31:16.000Z","dependencies_parsed_at":"2023-01-15T01:22:23.261Z","dependency_job_id":"a61f1193-4657-4bc8-8983-511f45d79479","html_url":"https://github.com/cztomsik/graffiti","commit_stats":{"total_commits":1023,"total_committers":7,"mean_commits":"146.14285714285714","dds":0.02639296187683282,"last_synced_commit":"c2a2ca2eabbd5f5722a58903a2fc6bf5c4f6e82d"},"previous_names":["cztomsik/node-webrender"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cztomsik%2Fgraffiti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cztomsik%2Fgraffiti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cztomsik%2Fgraffiti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cztomsik%2Fgraffiti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cztomsik","download_url":"https://codeload.github.com/cztomsik/graffiti/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582907,"owners_count":22095518,"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":[],"created_at":"2024-08-01T21:02:27.138Z","updated_at":"2025-05-16T18:10:53.905Z","avatar_url":"https://github.com/cztomsik.png","language":"Zig","funding_links":[],"categories":["Zig","C","👓 Alternatives to the [Electron.js](https://electronjs.org) ⚛","Framework","Rust","GUI Frameworks"],"sub_categories":["Javascript","Web"],"readme":"# graffiti (prealpha MVP)\nHTML/CSS engine for node.js and deno.\n\nCurrently, it is just my hobby/research project and it's **not yet intended for\nany use**.\n\n[Discord](https://discord.gg/zQwyzFb)\n| [Quickstart repo](https://github.com/cztomsik/hello-graffiti/)\n\n---\n\n\u003cdiv style=\"display: flex; align-items: center\"\u003e\n\u003cdiv style=\"max-height: 400px; overflow-y: scroll\"\u003e\n\n```javascript\nconst Counter = () =\u003e {\n  const [count, setCount] = React.useState(0)\n  const dec = () =\u003e setCount(count - 1)\n  const inc = () =\u003e setCount(count + 1)\n\n  return (\n    \u003cdiv style={styles.counter}\u003e\n      \u003cspan\u003e{count}\u003c/span\u003e\n\n      \u003cdiv style={{ ...styles.bar, width: count * 5 }} /\u003e\n\n      \u003cdiv style={styles.buttons}\u003e\n        \u003cbutton onClick={dec}\u003e--\u003c/button\u003e\n        \u003cbutton onClick={inc}\u003e++\u003c/button\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  )\n}\n\nconst styles = {\n  counter: {\n    flex: 1,\n    padding: 20,\n    justifyContent: 'space-between'\n  },\n\n  bar: {\n    backgroundColor: '#ff0000',\n    height: 20\n  },\n\n  buttons: {\n    flexDirection: 'row',\n    justifyContent: 'space-between'\n  }\n}\n```\n\u003c/div\u003e\n\u003cimg src=\"https://github.com/cztomsik/graffiti/raw/936b6e4bb5a51e138910a9315ecb91332012afb0/docs/images/counter.gif\" /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n---\n\n## Current scope\n- single-window, single-thread, single-script (global `document`), nodejs-only\n  (N-API)\n- subset of DOM needed by major JS frameworks (`preact`-only for now)\n- subset of CSS and CSSOM for CSS-in-JS (`goober`-only for now)\n- block/flexbox layout (no floats)\n- no index.html, no runtime behavior (no `\u003cscript\u003e`, no `\u003clink\u003e`, ...)\n- no HMR, no live-reload (but `nodemon` works)\n- publish to npm (until then, you can `npm i github:cztomsik/graffiti`)\n- and even then, [it will be just a\n  toy](https://www.cmyr.net/blog/gui-framework-ingredients.html)\n\n## Goals \u0026 philosophy\n- simplicity \u003e number of features\n- support \"reasonable subset\" of DOM/CSS so we don't need to learn anything new\n- fit nicely into the existing node.js ecosystem (lib is better than framework)\n- it has to be fun (for me, sorry)\n\n## Hacking\nTo work on the project, you will need recent Zig (`0.11.0-dev.3731+c6e2e1ae4`)\nand system-installed GLFW3.3 with headers (`brew install pkg-config glfw`).\n\n```\ngit clone ...\ncd ...\ngit submodule init\ngit submodule update\nnpm i\nzig build\nnode examples/hello.js\n```\n\n## License\nThe code in this repository is licensed under the MIT license, except for the\nHTML parser in `lib/core/htmlparser.js` which is based on the work of John Resig\n(MIT), Juriy \"kangax\" Zaytsev (MIT) and Erik Arvidsson (MPL).\n\nYou are also bound by the licenses of all the transitive dependencies:\n- [Zig](https://ziglang.org/) (MIT)\n- [GLFW](https://www.glfw.org/) (ZLIB)\n- [nanovg-zig](https://github.com/fabioarnold/nanovg-zig) (ZLIB) \n  - [nanovg](https://github.com/memononen/nanovg) (ZLIB)\n  - [fontstash](https://github.com/memononen/fontstash) (ZLIB)\n  - [stb_truetype](https://github.com/nothings/stb) (MIT)\n- Roboto font (Apache 2.0)\n\n## Contributing\nIf you are interested in contributing, please join the Discord channel to\ndiscuss your ideas before submitting a pull request. Unexpected merge requests\nare likely to be rejected.\n\nThank you for your interest :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcztomsik%2Fgraffiti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcztomsik%2Fgraffiti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcztomsik%2Fgraffiti/lists"}