|
1 | 1 | --- |
2 | | -title: Contributing |
3 | | -description: "How to contribute to Hyperframes." |
| 2 | +title: Contribute to HyperFrames |
| 3 | +description: Set up the repository, make a focused change, and open a pull request. |
4 | 4 | --- |
5 | 5 |
|
6 | | -Thanks for your interest in contributing to Hyperframes! This guide covers everything you need to get set up, run tests, and submit a pull request. |
7 | | - |
8 | | -## Getting Started |
9 | | - |
10 | | -<Steps> |
11 | | - <Step title="Fork and clone"> |
12 | | - Fork the repository on GitHub, then clone your fork: |
13 | | - ```bash |
14 | | - git clone https://github.com/YOUR_USERNAME/hyperframes.git |
15 | | - cd hyperframes |
16 | | - ``` |
17 | | - </Step> |
18 | | - <Step title="Install dependencies"> |
19 | | - Hyperframes uses [bun](https://bun.sh/) for package management: |
20 | | - ```bash |
21 | | - bun install |
22 | | - ``` |
23 | | - </Step> |
24 | | - <Step title="Build all packages"> |
25 | | - Build the monorepo to ensure everything compiles: |
26 | | - ```bash |
27 | | - bun run build |
28 | | - ``` |
29 | | - </Step> |
30 | | - <Step title="Run the studio"> |
31 | | - Start the development server to verify your setup: |
32 | | - ```bash |
33 | | - bun run dev |
34 | | - ``` |
35 | | - If the studio opens at `http://localhost:5190` with a preview, your environment is ready. |
36 | | - </Step> |
37 | | - <Step title="Create a branch"> |
38 | | - Create a feature branch for your work: |
39 | | - ```bash |
40 | | - git checkout -b my-feature |
41 | | - ``` |
42 | | - </Step> |
43 | | -</Steps> |
44 | | - |
45 | | -## Development |
46 | | - |
47 | | -### Common Commands |
| 6 | +## Set up the repository |
48 | 7 |
|
49 | 8 | ```bash |
50 | | -bun install # Install all dependencies |
51 | | -bun run dev # Start the studio (composition editor + live preview) |
52 | | -bun run build # Build all packages |
53 | | -bun run --filter '*' typecheck # Type-check all packages |
| 9 | +git clone https://github.com/YOUR_USERNAME/hyperframes.git |
| 10 | +cd hyperframes |
| 11 | +bun install |
| 12 | +bun run build |
54 | 13 | ``` |
55 | 14 |
|
56 | | -### Studio Editing Work |
| 15 | +HyperFrames uses Bun for workspace operations. Do not add a `pnpm-lock.yaml` or replace `bun.lock`. |
57 | 16 |
|
58 | | -If you are changing Studio's visual editing surface, read |
59 | | -[Studio Manual DOM Editing](/contributing/studio-manual-dom-editing) before |
60 | | -editing code. The inspector intentionally exposes only interactions it can |
61 | | -persist safely back to HTML, so changes should preserve the capability gates, |
62 | | -source patching model, and documented limitations. |
63 | | - |
64 | | -### Running Tests |
65 | | - |
66 | | -<CodeGroup> |
67 | | -```bash Core |
68 | | -bun run --filter @hyperframes/core test |
69 | | -``` |
70 | | -```bash Engine |
71 | | -bun run --filter @hyperframes/engine test |
72 | | -``` |
73 | | -```bash Runtime Contract |
74 | | -bun run --filter @hyperframes/core test:hyperframe-runtime-ci |
75 | | -``` |
76 | | -```bash Producer (Docker) |
77 | | -cd packages/producer && bun run docker:build:test && bun run docker:test |
78 | | -``` |
79 | | -</CodeGroup> |
80 | | - |
81 | | -### Running All Tests |
| 17 | +Start Studio while working on UI or composition behavior: |
82 | 18 |
|
83 | 19 | ```bash |
84 | | -bun run --filter '*' test |
| 20 | +bun run dev |
85 | 21 | ``` |
86 | 22 |
|
87 | | -## Packages |
88 | | - |
89 | | -| Package | Path | Description | |
90 | | -|---------|------|-------------| |
91 | | -| [`@hyperframes/core`](/packages/core) | `packages/core` | Types, HTML generation, runtime, linter | |
92 | | -| [`@hyperframes/sdk`](/packages/sdk) | `packages/sdk` | Headless composition editing engine | |
93 | | -| [`@hyperframes/engine`](/packages/engine) | `packages/engine` | Seekable page-to-video capture engine | |
94 | | -| [`@hyperframes/player`](/packages/player) | `packages/player` | Embeddable composition player | |
95 | | -| [`@hyperframes/producer`](/packages/producer) | `packages/producer` | Full rendering pipeline (capture + encode) | |
96 | | -| [`@hyperframes/shader-transitions`](/packages/shader-transitions) | `packages/shader-transitions` | WebGL shader transition engine | |
97 | | -| [`@hyperframes/aws-lambda`](/packages/aws-lambda) | `packages/aws-lambda` | AWS Lambda distributed rendering adapter | |
98 | | -| [`@hyperframes/gcp-cloud-run`](/packages/gcp-cloud-run) | `packages/gcp-cloud-run` | GCP Cloud Run distributed rendering adapter | |
99 | | -| [`@hyperframes/studio`](/packages/studio) | `packages/studio` | Composition editor UI | |
100 | | -| [`hyperframes`](/packages/cli) | `packages/cli` | CLI for creating, previewing, and rendering | |
101 | | -| `@hyperframes/sdk-playground` (private) | `packages/sdk-playground` | Local SDK playground app | |
| 23 | +Studio listens on `http://localhost:5190` when run from the monorepo. |
102 | 24 |
|
103 | | -## What to Work On |
| 25 | +## Check your change |
104 | 26 |
|
105 | | -Not sure where to start? Here are some ideas: |
| 27 | +Run the smallest relevant test while iterating, then the repository gates before opening a pull request: |
106 | 28 |
|
107 | | -- **Good first issues** — look for issues labeled `good first issue` on GitHub |
108 | | -- **Documentation** — improve docs, add examples, fix typos |
109 | | -- **Linter rules** — add new rules to catch more composition mistakes |
110 | | -- **Examples** — create new starter examples |
111 | | -- **Bug fixes** — check the issue tracker for reported bugs |
112 | | - |
113 | | -## Pull Requests |
114 | | - |
115 | | -### Commit Format |
| 29 | +```bash |
| 30 | +bun run lint |
| 31 | +bun run format:check |
| 32 | +bun run --filter '*' typecheck |
| 33 | +bun run test |
| 34 | +``` |
116 | 35 |
|
117 | | -Use [conventional commit](https://www.conventionalcommits.org/) format for all commits and PR titles: |
| 36 | +For a composition or registry item, also run: |
118 | 37 |
|
| 38 | +```bash |
| 39 | +npx hyperframes lint |
| 40 | +npx hyperframes check |
119 | 41 | ``` |
120 | | -feat: add timeline export |
121 | | -fix: resolve seek overflow at composition boundary |
122 | | -docs: add GSAP easing examples |
123 | | -refactor: extract frame buffer pool into shared module |
124 | | -test: add regression test for nested composition timing |
125 | | -``` |
126 | | - |
127 | | -### CI Requirements |
128 | 42 |
|
129 | | -All of the following must pass before your PR can be merged: |
| 43 | +The pre-commit hooks format staged files and run checks for the files you changed. |
130 | 44 |
|
131 | | -- **Build** — `bun run build` succeeds |
132 | | -- **Type check** — `bun run --filter '*' typecheck` reports no errors |
133 | | -- **Tests** — all test suites pass |
134 | | -- **Semantic PR title** — PR title follows conventional commit format |
| 45 | +## Work in the right package |
135 | 46 |
|
136 | | -### Review Process |
| 47 | +| Surface | Package or directory | |
| 48 | +| --- | --- | |
| 49 | +| Composition parsing, runtime, types | `packages/core` and `packages/parsers` | |
| 50 | +| Browser frame capture | `packages/engine` | |
| 51 | +| Encoding and audio/render orchestration | `packages/producer` | |
| 52 | +| Command line | `packages/cli` | |
| 53 | +| Browser editor | `packages/studio` and `packages/studio-server` | |
| 54 | +| Embeddable player | `packages/player` | |
| 55 | +| Headless editing API | `packages/sdk` | |
| 56 | +| AWS and GCP distributed rendering | `packages/aws-lambda` and `packages/gcp-cloud-run` | |
| 57 | +| Reusable blocks and snippets | `registry` | |
| 58 | +| Agent instructions | `skills` | |
137 | 59 |
|
138 | | -- PRs require at least 1 approval from a maintainer |
139 | | -- Keep PRs focused — one feature or fix per PR |
140 | | -- Target alpha-only PRs at `next` instead of `main`; see |
141 | | - [Release channels](/contributing/release-channels) for branch policy details |
142 | | -- Include a clear description of what changed and why |
143 | | -- Add tests for new features and bug fixes |
| 60 | +For Studio changes, verify the behavior in the browser and preserve the source-patching and capability-gate contracts described in the [Studio docs](/studio/index). |
144 | 61 |
|
145 | | -## Reporting Issues |
| 62 | +## Pull request requirements |
146 | 63 |
|
147 | | -- Use [GitHub Issues](https://github.com/heygen-com/hyperframes/issues) for bug reports and feature requests |
148 | | -- Search existing issues before creating a new one |
149 | | -- For bug reports, include: |
150 | | - - Steps to reproduce |
151 | | - - Expected behavior vs. actual behavior |
152 | | - - Hyperframes version (`npx hyperframes info`) |
153 | | - - Operating system and Node.js version |
| 64 | +- Keep the change focused and explain the user-visible reason for it. |
| 65 | +- Add or update tests when behavior changes. |
| 66 | +- Use a conventional PR title such as `fix: preserve audio after seeking`. |
| 67 | +- Run formatting, lint, typecheck, and relevant tests. |
| 68 | +- Include screenshots or a short capture for visual changes. |
| 69 | +- Target prerelease-only work to the branch described in [Release channels](/contributing/release-channels). |
154 | 70 |
|
155 | | -## Community |
| 71 | +Use [GitHub Issues](https://github.com/heygen-com/hyperframes/issues) for bugs and proposals. A useful bug report includes the smallest reproduction, the first exact error, `npx hyperframes info`, and the operating system. |
156 | 72 |
|
157 | | -<CardGroup cols={2}> |
158 | | - <Card title="GitHub Issues" icon="github" href="https://github.com/heygen-com/hyperframes/issues"> |
159 | | - Report bugs, request features, and discuss ideas. |
160 | | - </Card> |
161 | | - <Card title="Code of Conduct" icon="handshake" href="https://github.com/heygen-com/hyperframes/blob/main/CODE_OF_CONDUCT.md"> |
162 | | - Our community standards and expectations. |
163 | | - </Card> |
164 | | -</CardGroup> |
| 73 | +By contributing, you agree that your work is licensed under the [Apache 2.0 License](https://github.com/heygen-com/hyperframes/blob/main/LICENSE) and follows the [Code of Conduct](https://github.com/heygen-com/hyperframes/blob/main/CODE_OF_CONDUCT.md). |
165 | 74 |
|
166 | | -## License |
| 75 | +## Related topics |
167 | 76 |
|
168 | | -By contributing, you agree that your contributions will be licensed under the [Apache 2.0 License](https://github.com/heygen-com/hyperframes/blob/main/LICENSE). |
| 77 | +- [Test local CLI changes](/contributing/testing-local-changes) |
| 78 | +- [Contribute a Catalog item](/contributing/catalog) |
| 79 | +- [Understand release channels](/contributing/release-channels) |
0 commit comments