summaryrefslogtreecommitdiff
path: root/.github/CONTRIBUTING.md
blob: 504c2f780590fd21a198ac28d9654833bbe4c729 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Contributing to OpenCut

Thank you for your interest in contributing to OpenCut! This document provides guidelines and instructions for contributing.

## Getting Started

### Prerequisites

- [Bun](https://bun.sh/docs/installation)
- Rust toolchain (only needed when editing `rust/`)

No env files, no database, no Docker — the editor is fully client-side; all state lives in IndexedDB.

### Setup

1. Fork the repository
2. Clone your fork locally
3. Install dependencies: `bun install`
4. Start the development server from the repo root: `bun dev:web`

The editor is at [http://localhost:3000](http://localhost:3000).

> **Note:** Web development uses the published `opencut-wasm` package by default, so a fresh clone does not need a local WASM build.
>
> If you are editing `rust/wasm`, run `bun run build:wasm`, then `cd rust/wasm/pkg && bun link`, then `cd ../../../apps/web && bun link opencut-wasm`.

### Desktop

Only needed if you're working on `apps/desktop` (Electron shell):

```bash
bun build:web                          # static export -> apps/web/out
bun run --cwd apps/desktop copy:web    # bundle it into the desktop app
bun run --cwd apps/desktop dev         # run the shell
```

`bun run --cwd apps/desktop dist` builds AppImage, `.deb`, and `.rpm` into `apps/desktop/release/`.

## How to Contribute

### Reporting Bugs

- Use the bug report template
- Include steps to reproduce
- Provide screenshots if applicable

### Suggesting Features

- Use the feature request template
- Explain the use case
- Consider implementation details

### Code Contributions

1. Create a new branch: `git checkout -b feature/your-feature-name`
2. Make your changes
3. Run the relevant checks for the area you touched:

   - Web changes: from `apps/web`, run `bun run lint` and `bun run format`; from the repo root, `bun test` and `bunx tsc --noEmit --project apps/web`
   - Desktop changes: `bun run --cwd apps/desktop build`

4. Commit your changes with a descriptive message
5. Push to your fork and create a pull request

## Code Style

- We use ESLint for linting and Prettier for formatting (tabs)
- Run `bun run format` from the `apps/web` directory to format code
- Run `bun run lint` from the `apps/web` directory to check for linting issues
- Follow the existing code patterns

## Pull Request Process

1. Fill out the pull request template completely
2. Link any related issues
3. Ensure CI passes
4. Request review from maintainers
5. Address any feedback

## Community

- Be respectful and inclusive
- Follow our Code of Conduct
- Help others in discussions and issues

Thank you for contributing!