Skip to content

Commit 1f851a0

Browse files
committed
strengthen open source project foundations
Repair and validate documentation links, add a current bilingual project story and roadmap, define governance and community standards, publish an unreleased changelog, and automate ownership, dependency updates, and Gallery submissions.
1 parent 51de0c8 commit 1f851a0

16 files changed

Lines changed: 342 additions & 92 deletions

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* @everettjf
2+
3+
/Shared/ScriptWidgetRuntime/ @everettjf
4+
/Gallery/ @everettjf
5+
/.github/ @everettjf
6+
/SECURITY.md @everettjf
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Gallery submission
2+
description: Propose a reviewed Widget or AI Skill for the curated Gallery.
3+
title: "[Gallery]: "
4+
labels: [gallery]
5+
body:
6+
- type: dropdown
7+
id: kind
8+
attributes:
9+
label: Package kind
10+
options: [Widget, Skill]
11+
validations:
12+
required: true
13+
- type: input
14+
id: identifier
15+
attributes:
16+
label: Stable package identifier and version
17+
placeholder: app.example.widget · 1.0.0
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: outcome
22+
attributes:
23+
label: User outcome
24+
description: Explain who this helps, what it does, and why it belongs in the curated Gallery.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: trust
29+
attributes:
30+
label: Data, network, permissions, AI, and privacy
31+
description: List every network domain and permission, stored data, sensitive input, AI behavior, and fallback. Write “none” where applicable.
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: verification
36+
attributes:
37+
label: Verification evidence
38+
description: Include platforms/families tested, screenshots for Widgets, Prompt examples for Skills, and the release-readiness result.
39+
validations:
40+
required: true
41+
- type: checkboxes
42+
id: confirmations
43+
attributes:
44+
label: Submission confirmations
45+
options:
46+
- label: I have the right to submit all source, assets, names, and license information.
47+
required: true
48+
- label: The committed index sizes and SHA-256 values were calculated from the exact committed files.
49+
required: true
50+
- label: No credentials, personal data, trackers, obfuscated behavior, or undeclared network access are included.
51+
required: true
52+
- label: I read and followed docs/gallery.md and ran ./Scripts/release-readiness.sh.
53+
required: true

.github/dependabot.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: /Editor/editorfe
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
groups:
9+
editor-development:
10+
dependency-type: development
11+
12+
- package-ecosystem: github-actions
13+
directory: /
14+
schedule:
15+
interval: weekly
16+
open-pull-requests-limit: 5
17+
- package-ecosystem: swift
18+
directory: /iOS
19+
schedule:
20+
interval: monthly
21+
open-pull-requests-limit: 5
22+
23+
- package-ecosystem: swift
24+
directory: /macOS
25+
schedule:
26+
interval: monthly
27+
open-pull-requests-limit: 5

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ Describe the user-visible outcome and implementation scope.
1616
- [ ] No credentials or personal data are included
1717
- [ ] Script, network, import, iCloud, and app-group boundaries remain fail-closed
1818
- [ ] Migration or compatibility impact is documented
19+
20+
## Gallery changes (when applicable)
21+
22+
- [ ] Exact file byte counts and SHA-256 values match committed Gallery files
23+
- [ ] Source, author, license, permissions, network/privacy behavior, and update notes were reviewed
24+
- [ ] Widget family screenshots or Skill Prompt examples are attached
25+
- [ ] No arbitrary native/plugin execution or undeclared capability is introduced

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
Notable user-visible changes are recorded here. ScriptWidget follows semantic versioning for public package/runtime contracts even when App Store marketing versions use another cadence.
4+
5+
## Unreleased
6+
7+
### Added
8+
9+
- Full macOS app and WidgetKit workspace with Studio editing, diagnostics, Console, multi-size previews, native commands, and first-run tutorial.
10+
- OpenAI-compatible Widget generation with Keychain-backed credentials, structured prompts, run/diagnose/refine workflow, evaluations, and reusable Skills 1.0.
11+
- Package 2.0 manifests, JSON schemas, migration compatibility, secure imports, and authoring documentation.
12+
- GitHub-backed Widget & Skills Gallery with verified files, offline cache, install/update UI on macOS and iOS/iPadOS, seed content, and contributor workflow.
13+
- Runtime XCTest targets, golden/template validation, release-readiness CI, and iPad/iCloud device scripts.
14+
15+
### Changed
16+
17+
- Expanded the template catalog to 70 validated examples and generated preview fixtures.
18+
- Reworked documentation around a five-minute path, versioned Runtime API, Studio, AI, Skills, packages, Gallery, release readiness, and bilingual onboarding.
19+
20+
### Fixed
21+
22+
- Added local build-cache fallback and proactive package caching for scripts evicted by iCloud. GitHub issue #6 remains open until the physical-iPhone offline acceptance matrix is complete.

CODE_OF_CONDUCT.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Community Code of Conduct
2+
3+
ScriptWidget is built by people with different backgrounds and levels of experience. We are committed to a welcoming, safe, and constructive community.
4+
5+
## Expected behavior
6+
7+
- Be respectful, patient, and specific. Critique ideas and code, not people.
8+
- Welcome beginners and explain assumptions without gatekeeping.
9+
- Respect privacy, licenses, authorship, and responsible security disclosure.
10+
- Accept feedback, correct mistakes, and prioritize the health of the community.
11+
- Keep discussions relevant and avoid harassment, threats, discrimination, sexualized attention, spam, or publishing another person's private information.
12+
13+
## Enforcement
14+
15+
Maintainers may edit or remove content, close participation, or temporarily or permanently ban contributors whose behavior harms the community. Enforcement should be proportional, documented privately when practical, and avoid exposing reporters or affected people.
16+
17+
Report conduct concerns privately to `xnuapp@gmail.com`. Do not use a public issue for sensitive reports. Maintainers will review the available context, protect confidentiality as far as practical, and communicate the outcome to affected parties when appropriate.
18+
19+
This policy applies in repository spaces and when someone publicly represents the ScriptWidget project.

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Thank you for helping make native widget creation accessible to everyone. Contributions to the runtime, ScriptWidget Studio, templates, tests, and documentation are welcome.
44

5+
Participation is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). Maintainer roles and project decisions are described in [Governance](GOVERNANCE.md), current priorities in the [Roadmap](ROADMAP.md), and notable user-visible work in the [Changelog](CHANGELOG.md).
6+
57
## Before you start
68

79
- Search existing issues and discussions before opening a duplicate.

GOVERNANCE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Governance
2+
3+
ScriptWidget uses a maintainer-led, contribution-friendly model. The goal is to make decisions transparent while keeping a security-sensitive Apple application coherent and shippable.
4+
5+
## Roles
6+
7+
- **Users** report needs, test releases, and share widgets or Skills.
8+
- **Contributors** submit code, tests, documentation, designs, templates, or reviews under the project license.
9+
- **Reviewers** are trusted contributors who consistently provide accurate review in a subsystem.
10+
- **Maintainers** merge changes, manage releases and security reports, curate Gallery content, and set repository policy. The current lead maintainer is Everett Jiang (`@everettjf`).
11+
12+
Roles are earned through sustained, constructive work. Maintainers may delegate review areas and should document new maintainer or reviewer responsibilities publicly.
13+
14+
## Decisions
15+
16+
Routine fixes use pull-request review and passing release checks. Significant changes—public Runtime APIs, package formats, security boundaries, data collection, platform scope, large dependencies, or migrations—start with an issue or discussion describing the user problem, alternatives, compatibility, risk, tests, and documentation.
17+
18+
Maintainers seek rough consensus, but the lead maintainer has final responsibility when a decision is blocked. Decisions should cite technical and user evidence; disagreement is not misconduct. Security fixes may be developed privately and documented after coordinated disclosure.
19+
20+
## Compatibility and trust
21+
22+
Runtime and package contracts are versioned. Breaking changes require an explicit migration path and release note. Imported scripts, network content, Gallery metadata, AI output, iCloud documents, app-group storage, and credentials are security boundaries and must fail closed.
23+
24+
The Gallery is curated, not an unrestricted executable marketplace. Inclusion is discretionary and may be revoked for security, privacy, licensing, abandonment, misleading behavior, or repeated quality failures.
25+
26+
## Releases
27+
28+
A release candidate should pass `./Scripts/release-readiness.sh`, document known limitations, and complete the device matrix appropriate to its changes. Maintainers publish release notes from `CHANGELOG.md` and may defer a feature that cannot be verified safely.
29+
30+
## Policy changes
31+
32+
Governance changes use a pull request and normal public review. The lead maintainer may make an urgent temporary policy change for safety, followed by a documented review.

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![License](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)
88
[![Platform](https://img.shields.io/badge/Platform-iOS%20%7C%20macOS-lightgrey?style=flat-square&logo=apple)](https://developer.apple.com)
99
[![Version](https://img.shields.io/badge/Version-3.0-blue?style=flat-square)](https://github.com/everettjf/ScriptWidget/releases)
10+
[![Release Readiness](https://github.com/everettjf/ScriptWidget/actions/workflows/release-readiness.yml/badge.svg)](https://github.com/everettjf/ScriptWidget/actions/workflows/release-readiness.yml)
1011

1112
**Create native widgets for iPhone, iPad, and Mac using JavaScript, JSX, and AI**
1213

@@ -24,7 +25,7 @@ ScriptWidget is a powerful widget development platform that lets you create nati
2425

2526
Think of it as "React Native for Widgets" - but simpler and more flexible.
2627

27-
![ScriptWidget Demo](screenshot.png)
28+
![ScriptWidget template gallery](Resource/WidgetDemoScreenshots/_contact-sheet-1.jpg)
2829

2930
---
3031

@@ -39,6 +40,7 @@ Think of it as "React Native for Widgets" - but simpler and more flexible.
3940
| 📱 **Interactive Widgets** | Tap, swipe, and interact with widgets |
4041
| 🎨 **Custom Styling** | Full control over appearance |
4142
| 📦 **Template Gallery** | Pre-built templates to get started |
43+
| 🌐 **Community Gallery** | Verified, one-click Widget and AI Skill installs |
4244
| 🧰 **ScriptWidget Studio** | Build on Mac with CodeMirror, diagnostics, console, and multi-size preview |
4345
|**AI Generation** | Generate, run, diagnose, and refine widgets with an OpenAI-compatible model |
4446

@@ -80,6 +82,7 @@ ScriptWidget/
8082
├── Shared/
8183
│ └── ScriptWidgetRuntime/ # Core runtime: JavaScriptCore host, JSX→SwiftUI
8284
│ ├── Common/ # Script storage & package management
85+
│ ├── Gallery/ # Verified GitHub catalog, cache & installer
8386
│ ├── Widget/Runtime/ # JS engine setup, Babel transform, execution
8487
│ ├── Widget/API/ # JS APIs ($device, $file, $storage, ...)
8588
│ ├── Widget/Component/ # Element → SwiftUI view mapping
@@ -92,6 +95,7 @@ ScriptWidget/
9295
│ ├── ScriptWidgetMac/ # macOS app
9396
│ └── ScriptWidgetMacWidget/ # macOS widget
9497
├── Editor/editorfe/ # React + CodeMirror editor frontend
98+
├── Gallery/ # Curated Widget & Skills Gallery index
9599
├── Resource/ # Marketing assets, screenshots
96100
└── README.md
97101
```
@@ -216,7 +220,7 @@ Start with the **[documentation hub](docs/README.md)** or build **[your first wi
216220

217221
<div align="center">
218222

219-
![Widget Gallery](gallery.png)
223+
![Widget Gallery](Resource/WidgetDemoScreenshots/_contact-sheet-2.jpg)
220224

221225
*Sample widgets created with ScriptWidget*
222226

@@ -246,6 +250,9 @@ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md)
246250
- 🔧 Submit pull requests
247251
- 📝 Write documentation
248252
- 🎨 Share your widgets
253+
- 🧠 Share focused AI Skills
254+
255+
See the [public roadmap](ROADMAP.md), [governance model](GOVERNANCE.md), and [Gallery submission guide](docs/gallery.md). Every pull request runs the same release-readiness checks used locally.
249256

250257
---
251258

README_CN.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# ScriptWidget 🎨
2+
3+
<div align="center">
4+
5+
[![GitHub Stars](https://img.shields.io/github/stars/everettjf/ScriptWidget?style=flat-square&color=4ECDC4)](https://github.com/everettjf/ScriptWidget/stargazers)
6+
[![License](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)
7+
[![Release Readiness](https://github.com/everettjf/ScriptWidget/actions/workflows/release-readiness.yml/badge.svg)](https://github.com/everettjf/ScriptWidget/actions/workflows/release-readiness.yml)
8+
9+
**使用 JavaScript、JSX 和 AI,为 iPhone、iPad 与 Mac 创建原生 Widget**
10+
11+
[English](README.md) | [中文](README_CN.md)
12+
13+
</div>
14+
15+
![ScriptWidget 模板画廊](Resource/WidgetDemoScreenshots/_contact-sheet-1.jpg)
16+
17+
ScriptWidget 是一个 MIT 开源的 Widget 创作平台。你不需要学习 Swift:在 Mac Studio、iPhone 或 iPad 上编辑 `main.jsx`,运行时会把声明式 JSX 映射为原生 SwiftUI/WidgetKit 界面。
18+
19+
## 为什么选择 ScriptWidget
20+
21+
- 一份脚本适配 iOS、iPadOS 与 macOS,多尺寸布局可通过 `$getenv("widget-size")` 调整。
22+
- 支持交互式 Widget、App Intents、Live Activity、灵动岛与 Control Widget。
23+
- Mac Studio 内置 CodeMirror 编辑器、补全、诊断、Console 和多尺寸预览。
24+
- 可用 OpenAI 兼容模型生成、运行、诊断并迭代 Widget;API Key 保存在 Keychain。
25+
- Widget & Skills Gallery 支持经过索引、大小、路径与 SHA-256 验证的一键安装和离线缓存。
26+
- 70 个内置模板、版本化 Runtime API、Package 2.0 与 Skills 1.0 均有自动测试和发布门禁。
27+
28+
## 五分钟开始
29+
30+
```bash
31+
git clone https://github.com/everettjf/ScriptWidget.git
32+
cd ScriptWidget
33+
open macOS/ScriptWidgetMac.xcodeproj
34+
# 或:open iOS/ScriptWidget.xcodeproj
35+
```
36+
37+
在 Xcode 中选择 `ScriptWidgetMac``ScriptWidget` scheme,配置 `iCloud.ScriptWidget` container 与 `group.everettjf.scriptwidget` App Group,然后运行。也可以直接按照[五分钟教程](docs/five-minute-tutorial.md)创建第一个 Widget。
38+
39+
最小脚本:
40+
41+
```jsx
42+
$render(
43+
<vstack frame="max" background="#0f172a">
44+
<text font="title3" color="#f8fafc">Hello, ScriptWidget!</text>
45+
</vstack>
46+
);
47+
```
48+
49+
## 文档
50+
51+
- [文档中心](docs/README.md)
52+
- [从零创建第一个 Widget](docs/getting-started.md)
53+
- [ScriptWidget Studio](docs/studio.md)
54+
- [Runtime API](docs/runtime-api.md)
55+
- [AI 生成](docs/ai-generate.md)
56+
- [Widget & Skills Gallery](docs/gallery.md)
57+
- [Package 2.0](docs/package-format.md)[Skills 1.0](docs/skills.md)
58+
- [公开路线图](ROADMAP.md)
59+
60+
## 参与贡献
61+
62+
欢迎提交 Runtime、Mac/iOS 体验、模板、Gallery Widget、AI Skill、测试与文档。请先阅读[贡献指南](CONTRIBUTING.md)[治理规则](GOVERNANCE.md)[行为准则](CODE_OF_CONDUCT.md),并在提交前运行:
63+
64+
```bash
65+
./Scripts/release-readiness.sh
66+
```
67+
68+
安全问题请按照[安全政策](SECURITY.md)私下报告,不要在公开 Issue 中披露利用细节或个人数据。
69+
70+
ScriptWidget 使用 [MIT License](LICENSE) 发布。

0 commit comments

Comments
 (0)