Thanks for your interest in Sparkling! This guide explains how contributors can propose ideas, report issues, and land changes while keeping the project healthy.
- Use clear, descriptive titles and fill in steps to reproduce.
- Include environment details (host OS, platform target Android/iOS, Node.js version, pnpm version, Lynx version,Sparkling version) and screenshots/logs when possible.
- Open a feature request issue describing the problem and the value to Sparkling developers.
- Call out whether the change targets the SDK, CLI, templates.
- If you already have an approach in mind, outline it briefly so maintainers can give early feedback.
- Start with small, contained changes so you can validate your setup end-to-end.
- Look for issues labeled “good first issue” (when available) or ask maintainers to confirm scope.
- Prefer to touch one package at a time (for example,
packages/sparkling-sdkortemplate/sparkling-app-template) so reviews stay focused.
- Install Node.js 22+ and pnpm
10.26.0(matches the workspace lockfile). - Install dependencies once:
pnpm install. - The workspace uses recursive scripts. Running commands from the repo root will target each package unless you filter them (e.g.,
pnpm --filter sparkling-method build).
- Fork the repository and clone your fork.
- Create a feature branch:
git checkout -b <topic-branch>. - Make your changes and keep them focused on one problem.
- Run the checks listed in Testing & Verification before opening a PR.
- Write a well-structured commit message (see Commit Message Format).
- Push your branch and open a Pull Request with:
- A summary of what changed and why.
- Links to related issues/docs if applicable.
- Notes on testing coverage and any known gaps.
We welcome small, incremental PRs. If a change is large, break it into reviewable pieces. Maintainers may ask you to squash fixup commits before merging to keep history clean.
Follow this template to help reviewers and future readers understand your change:
[Label] Concise title of the change
Summary of change:
- What changed and why.
- Previous behavior vs. new behavior.
issue: #123 # optional, link to GitHub issue
doc: https://... # optional; required for Feature/Refactor if a design doc exists
TEST: pnpm -r test # optional but recommended; list the commands or cases you ran
Labels (pick the first from this set): [Feature], [BugFix], [Refactor], [Optimize], [Infra], [Testing], [Doc]. Add secondary labels if helpful (e.g., [Feature][iOS]).
- The title line must contain at least one label and a non-empty description, separated by a space after the label block.
- Leave a blank line between the title and the summary section.
- Use the summary to capture context and impact; wrap lines at ~72 characters to keep logs readable.
- Aim to add or update tests with your change; if you cannot, explain why in the PR.
- Core checks before submitting:
pnpm -r buildto ensure all packages type-check and compile.pnpm -r testto execute package tests (for example, Jest forsparkling-method).pnpm exec eslint .to catch lint and license-header issues. Seedocs/code-style/style-configs.mdfor formatter locations and platform-specific configs.
- Targeted commands:
pnpm --filter sparkling-method testfor the method CLI.pnpm --filter sparkling-app-cli buildto validate the CLI build.
- Application templates and the playground do not ship unit tests; validate changes by building/running flows instead.
- Template changes: generate a fresh app with
npx create-sparkling-app <dir> --ts, then run the paths you touched (for example,npx sparkling buildandnpx sparkling run:android --copyorrun:ios --copy).
If a check does not apply to your change, mention why in the PR description.
- Follow the platform guidelines documented in
docs/code-style/style-configs.md. - JavaScript/TypeScript uses the shared flat ESLint config in
eslint.config.js. Keep import order tidy and ensure files carry the required license header where enforced. - Use Prettier settings from
template/sparkling-app-template/.prettierrcfor frontend code, and platform configs (.editorconfig,.clang-format,.swiftlint.yml) within the template directories.
- At least one maintainer review is required before merge. Reviewers may request changes or additional tests to reduce regression risk.
- CI must be green before a PR is merged. If CI exposes flakiness unrelated to your change, call it out in the PR.
- Maintainers will handle landing; please avoid force-pushes after review starts unless requested.
Participation in this project is governed by our CODE_OF_CONDUCT.md. By contributing, you agree to uphold these standards.
Thank you for helping improve Sparkling!