{"id":27618084,"url":"https://github.com/ammarahm-ed/nativescript-macos-solid","last_synced_at":"2025-04-23T05:00:23.493Z","repository":{"id":261644321,"uuid":"866583359","full_name":"ammarahm-ed/nativescript-macos-solid","owner":"ammarahm-ed","description":"Dive into the world of macOS Native app development with the speed and elegance of Solid","archived":false,"fork":false,"pushed_at":"2024-12-06T18:45:30.000Z","size":10699,"stargazers_count":52,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-15T12:16:49.055Z","etag":null,"topics":["appkit","javascript","macos","objc","solidjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ammarahm-ed.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":"2024-10-02T14:18:27.000Z","updated_at":"2025-03-27T16:47:18.000Z","dependencies_parsed_at":"2024-12-12T15:32:50.413Z","dependency_job_id":null,"html_url":"https://github.com/ammarahm-ed/nativescript-macos-solid","commit_stats":null,"previous_names":["ammarahm-ed/nativescript-macos-solid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarahm-ed%2Fnativescript-macos-solid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarahm-ed%2Fnativescript-macos-solid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarahm-ed%2Fnativescript-macos-solid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarahm-ed%2Fnativescript-macos-solid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ammarahm-ed","download_url":"https://codeload.github.com/ammarahm-ed/nativescript-macos-solid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372919,"owners_count":21419722,"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":["appkit","javascript","macos","objc","solidjs","typescript"],"created_at":"2025-04-23T05:00:22.932Z","updated_at":"2025-04-23T05:00:23.475Z","avatar_url":"https://github.com/ammarahm-ed.png","language":"TypeScript","funding_links":[],"categories":["macOS"],"sub_categories":["End-to-end Integration Testing"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./icon//icon-128.png\" alt=\"Solid for macOS\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSolid for macOS\u003c/h1\u003e\n\nSolid for macOS empowers you to build truly native desktop apps, leveraging\nnative [AppKit](https://developer.apple.com/documentation/appkit) components for\na seamless and performant user experience. Unlike purely webview based\ncross-platform frameworks (_or frameworks that attempt to recreate the entire\nplatform interface_), Solid for macOS directly integrates with native APIs,\nensuring your apps behave, look and feel right at home on macOS. This\nintegration allows you to develop fully native apps that utilize _all_ the\nnuanced capabilities of the entire platform, providing users with a smooth and\nresponsive experience.\n\nThe first macOS app built with [Solid](https://www.solidjs.com/) is already\navailable on the\n[Mac App Store here](https://apps.apple.com/us/app/solid-for-macos/id1574916360).\nWe welcome you to install and give it a try (_compatible with macOS 14+ and\nM-series arm64 machines_).\n\nYou can also try out the example app in this repository. To run the example,\nclone this repository and run the following commands:\n\n```bash\ndeno task start\n```\n\nYes, **you don't need Xcode installed** to run and develop the app for macOS.\nYou can start the app directly from the terminal, it's as simple as that. Only\nwhen you are ready to release your app would you need Xcode and an Apple\ndeveloper account to publish to the store.\n\n## Architecture\n\nLet's explore the architecture of Solid for macOS. There are a lot of components\nworking together behind the scenes to make Solid for macOS possible.\n\n### Runtime\n\nThe runtime is a critical component that connects macOS APIs to JavaScript.\nWritten in Objective-C++, it leverages\n[Node-API](https://nodejs.org/api/n-api.html#node-api) to facilitate seamless\ncommunication with any JavaScript engine that implements engine-agnostic\nNode-API layer. This open-source runtime, available at\n[macos-node-api](https://github.com/NativeScript/runtime-node-api), handles the\ntask of bringing all the native APIs seamlessly to JavaScript land.\n\n## DOM\n\nDOM provides the simplest possible implementation of a\n[DOM Document](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model),\njust enough to expose the most basic DOM Apis needed by Solid. We are using\n[undom-ng](https://github.com/ClassicOldSong/undom-ng) as a simple and\nlightweight DOM implementation.\n\n## Foundation\n\nFoundation integrates the concepts of web and native, making the process of\nbuilding native macOS apps intuitive and familiar for web developers. By\ncombining the best ideas from both worlds, it ensures that developers can\nleverage their existing web development skills to create high-quality apps from\nday one.\n\nOne of foundation's primary responsibilities is to handle various aspects of the\napplication, including styling, layout, rendering, windowing, menubars, and the\noverall application lifecycle. It ensures that all essential elements of a macOS\napp are seamlessly managed, providing a cohesive development experience.\n\nTo achieve this, foundation makes each AppKit UI component to be a DOM element\nand registers it with the global document object, allowing developers to\ninteract with native components using familiar web development paradigms.\n\nFor layout management, foundation utilizes the flexbox layout engine provided by\n[Meta's Yoga](https://github.com/facebook/yoga), enabling developers to apply\nalmost all flexbox properties to DOM elements. This approach simplifies the\nprocess of creating complex and responsive layouts.\n\nThe most basic UI element provided by foundation is the view, which internally\ncreates an [NSView](https://developer.apple.com/documentation/appkit/nsview)\nwhich serves as a building block for more complex components and user\ninterfaces. Foundation already includes a comprehensive set of basic AppKit\ncomponents, and ongoing efforts are being made to expand this library further,\nensuring that developers have access to all AppKit has to offer.\n\n## Solid Renderer\n\nA custom renderer, implemented at [renderer](./solid-native/renderer.js), is\nused to transform JSX into our DOM implementation. This renderer seamlessly\nintegrates Solid's reactive capabilities with native macOS components.\n\n## Deployment\n\nIf you have noticed, our\n[Solid Desktop app on Mac App Store](https://apps.apple.com/us/app/solid-for-macos/id1574916360)\nis just 5.5 MB in size. That is possible with\n[Hermes](https://github.com/facebook/hermes), a JavaScript engine developed by\nMeta. Credit to [Tzvetan Mikov](https://github.com/tmikov) for his continued\nexcellence on the engine. Hermes provides optimal performance while having\nminimal footprint.\n\nhttps://github.com/user-attachments/assets/ad087d8c-f303-485a-bbe3-889430286bd9\n\n## Contributors\n\n- [Ammar Ahmed](https://github.com/ammarahm-ed)\n- [Diljit Singh](https://github.com/DjDeveloperr)\n- [Nathan Walker](https://github.com/NathanWalker)\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammarahm-ed%2Fnativescript-macos-solid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fammarahm-ed%2Fnativescript-macos-solid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammarahm-ed%2Fnativescript-macos-solid/lists"}