{"id":15379888,"url":"https://github.com/yisar/smallapp","last_synced_at":"2025-04-06T19:14:09.158Z","repository":{"id":37744786,"uuid":"181659311","full_name":"yisar/smallapp","owner":"yisar","description":"🎃 Chinese miniapp architecture.","archived":false,"fork":false,"pushed_at":"2024-03-12T00:16:08.000Z","size":12510,"stargazers_count":237,"open_issues_count":6,"forks_count":55,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-16T02:25:42.521Z","etag":null,"topics":["mini-program","vdom","web-worker","webworker"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yisar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-04-16T09:35:47.000Z","updated_at":"2024-05-14T11:30:48.000Z","dependencies_parsed_at":"2024-10-01T14:20:21.787Z","dependency_job_id":"a31af8b4-9e35-49d8-a232-f531a3506dca","html_url":"https://github.com/yisar/smallapp","commit_stats":null,"previous_names":["yisar/smallapp","132yse/voe","yisar/fre-miniapp"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisar%2Fsmallapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisar%2Fsmallapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisar%2Fsmallapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yisar%2Fsmallapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yisar","download_url":"https://codeload.github.com/yisar/smallapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535521,"owners_count":20954576,"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":["mini-program","vdom","web-worker","webworker"],"created_at":"2024-10-01T14:20:12.820Z","updated_at":"2025-04-06T19:14:09.125Z","avatar_url":"https://github.com/yisar.png","language":"JavaScript","readme":"![](https://cdn-us.imgs.moe/2023/06/08/6481702430f68.png)\n\n# smallapp\n\n`smallapp` is a [Chinese miniapp architecture](https://www.w3.org/TR/mini-app-white-paper) implementation.\n\nAs of now, there are over 7 million miniapps in China, Chinese people do not like to use browsers or search engines.\n\nMusk envied `WeChat` and he really wanted this miniapp architecture, so I opened it up.\n\n### Docs\n\nsmallapp follows WeChat's miniapp standard, you should refer to WeChat's documentation.\n\n[WeChat miniapp docs](https://developers.weixin.qq.com/miniprogram/en/dev/framework/)\n\n### Syntax\n\n```html\n\u003cview\u003e\n    \u003ctext\u003e{{count}}\u003c/text\u003e\n    \u003cbutton bindtap=\"add\"\u003e+\u003c/button\u003e\n\u003c/view\u003e\n```\n```js\nPage({\n    data: {\n        count: 0\n    },\n    add: () {\n        this.setData({\n            count: this.data.count + 1\n        })\n\n        wx.showToast({ \n            title: 'count is added!' \n        })\n    }\n})\n```\n\n### Demos\n\n[https://v.douyin.com/Ug9bwvq/](https://v.douyin.com/Ug9bwvq/)\n\n\u003cimg src=\"https://cdn-us.imgs.moe/2023/06/08/64815bf234e71.jpg\" width=\"250px\"\u003e\u003c/img\u003e\n\n### Principle\n\n1. compiler\n\n```\nsmallapp build -e app.json -o /dist\n```\n\nThis step will package the miniapp project into js files, which is double threaded. The jsx file is used for rendering threads, and the js file is used for logical threads.\n\n2. worker\n\nThe logical thread is responsible for running JavaScript logic, and you need to find a JavaScript runtime, such as worker.\n\n- Web worker\n- Cloudflare worker\n- quickjs/v8/hermes\n\nAs long as it has the standard API and communication mechanism of the worker, it can serve as the logical layer of the miniapp.\n\n3. Native container\n\nMiniapps runs on a super app, such as Wechat/Alipay/Baidu and its API is provided by the native container.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisar%2Fsmallapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyisar%2Fsmallapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisar%2Fsmallapp/lists"}