{"id":13733294,"url":"https://github.com/freemountain/quark","last_synced_at":"2025-05-08T09:31:58.244Z","repository":{"id":71778429,"uuid":"73829293","full_name":"freemountain/quark","owner":"freemountain","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-10T16:43:41.000Z","size":15027,"stargazers_count":19,"open_issues_count":4,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T01:19:30.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/freemountain.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}},"created_at":"2016-11-15T15:50:04.000Z","updated_at":"2023-10-09T20:41:44.000Z","dependencies_parsed_at":"2023-03-13T20:19:26.257Z","dependency_job_id":null,"html_url":"https://github.com/freemountain/quark","commit_stats":{"total_commits":183,"total_committers":4,"mean_commits":45.75,"dds":"0.48633879781420764","last_synced_commit":"8f5c75e894b4e467f71bb66346479179ec3b6529"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemountain%2Fquark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemountain%2Fquark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemountain%2Fquark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemountain%2Fquark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freemountain","download_url":"https://codeload.github.com/freemountain/quark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804206,"owners_count":21806769,"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-03T03:00:40.761Z","updated_at":"2025-05-08T09:31:58.230Z","avatar_url":"https://github.com/freemountain.png","language":"C++","funding_links":[],"categories":["GUI Frameworks"],"sub_categories":["Qt"],"readme":"\n# Quark [![Build Status](https://travis-ci.org/freemountain/quark.svg?branch=master)](https://travis-ci.org/freemountain/quark)\n## :arrow_right: electron :heavy_minus_sign: chromium :heavy_plus_sign: Qt quick\n\nQuark is the easiest way to write and ship cross-platform desktop applications using JavaScript and QML. It uses Node.js 7.0 and Qt 5.7 under the hood.\n\n## How does it work\nA Quark application consists of a JavaScript host process and a QML-based rendering process.\n\nThe host process can be powered by Node.js or the Qt JavaScript engine V4 with an Node.js like api (currently wip, see src/libqnode).\n\nThis architecture is used to make it possible to script the whole application logic in JavaScript, while leveraging QT's declarative, cross-platform view-layer (QML).\nBoth processes are always being aware of the whole application state (think Elm or Redux), using stdin and stdout to exchange updates and or actions in a unidirectional way.\n\nTo wrap it all up, a basic Quark application just needs three files in order to work:\n\n\n- a `package.json` - points to the app's main file and lists its details and dependencies\n- a `\u003cmain\u003e.js` - contains the business logic\n- an `index.qml` - QML description of the view\n\n## Example\nSo let's implement a very primitive counter as a basic example of how to use this thing:\n\n### [package.json](https://github.com/freemountain/quark/blob/master/example/counter/package.json)\n```json\n{\n  \"name\"    : \"counter\",\n  \"version\" : \"0.1.0\",\n  \"main\"    : \"main.js\",\n  \"scripts\": {\n    \"run\": \"quark-prebuilt ./package.json\",\n  },\n  \"dev-dependencies\": {\n    \"quark-prebuilt\": \"0.0.3\"\n  }\n}\n```\n\n### [main.js](https://github.com/freemountain/quark/blob/master/example/counter/main.js)\n```js\nconst Quark = require(\"quark\");\nconst path  = require(\"path\");\n\nQuark.of({\n    qml:          path.join(__dirname, \"index.qml\"),\n    initialState: { count: 0 },\n    intents:      {\n        onSub: state =\u003e state.update(\"count\", count =\u003e count - 1),\n        onAdd: state =\u003e state.update(\"count\", count =\u003e count + 1)\n    }\n});\n```\n\n### [index.qml](https://github.com/freemountain/quark/blob/master/example/counter/index.qml)\n```qml\nimport QtQuick 2.2\nimport QtQuick.Controls 2.0\nimport QtQuick.Layouts 1.3\nimport Quark 1.0\n\nApplicationWindow {\n    visible: true\n    width: 300\n    id:window\n\n    Store {\n        /*\n          This component holds the application state.\n          The property value holds the current value.\n          The slot dispatch can be called to emit an action.\n        */\n        id: store\n    }\n\n    RowLayout {\n        anchors.fill: parent\n        Button {\n            anchors.left: window.left\n            text: \"-\"\n            onClicked: store.dispatch(\"sub\")\n        }\n        Label {\n            Layout.fillWidth: true\n            horizontalAlignment: Text.AlignHCenter\n            verticalAlignment: Text.AlignVCenter\n            text: JSON.stringify(store.value.count);\n        }\n        Button {\n            text: \"+\"\n            onClicked: store.dispatch(\"add\")\n        }\n    }\n}\n```\n\n### Running\n```bash\nnpm install\nnpm run\n```\n\n## Downloads\nPrebuilt binaries can be found on the [releases page](https://github.com/freemountain/quark/releases).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreemountain%2Fquark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreemountain%2Fquark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreemountain%2Fquark/lists"}