Ctrl K
ComunidadGuías…

CONTRIBUTING.md

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Contributing

## What is accepted

**Issues and discussions are welcome.** Code from outside the project is not accepted for now: a contribution would have to be licensed in a way that preserves the owner's right to license Convia commercially ([`LICENSE.md`](LICENSE.md)), and the agreement that does that — a contributor license agreement — will be introduced before code from anybody else is.

## How a change is made

1. **Read [`README.md`](README.md) and [`AGENTS.md`](AGENTS.md)** before any work. They define the product and the rules.
2. **Work on a branch**, never on `main`.
3. **Write commits as [Conventional Commits](https://www.conventionalcommits.org/)**: `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `build:`, `ci:`, `chore:`.
4. **Open a pull request.** It is merged after every check of [ADR 0002](docs/adr/0002-what-a-change-must-pass.md) passes and somebody other than its author approves it. The rule is not lowered or bypassed for convenience.

## Versions

Convia follows [Semantic Versioning](https://semver.org/): `0.x` while it is being developed, and `1.0.0` once its protocol and its experience are mature.

## Building and checking locally

You need Go (the version in `go.mod`), Node.js 24 and the Wails v2 CLI at the version `go.mod` requires.

```text
wails dev                                  # the application, reloading as it changes
wails build -platform windows/amd64        # build/bin/convia.exe

cd frontend
npm ci
npm run format:check && npm run lint && npm run typecheck && npm test

cd ..
go vet ./... && go test ./...
```

`go vet` and `go test` need `frontend/dist` to exist, because the binary embeds the built interface: run `npm run build` in `frontend` once, or create the directory.

Convia keeps its files in `%LocalAppData%\Convia` and runs once per directory. To run two peers on one machine, give the second its own: `CONVIA_HOME=C:\convia-second build\bin\convia.exe`.

coturn and the rendezvous service run together on this machine with Docker, for development and tests. Copy `.env.example` to `.env` and give `TURN_SECRET` a random value of at least 32 characters — `.env` is never committed — then:

```text
docker compose up -d --build    # rendezvous on ws://127.0.0.1:8443, STUN and TURN on 127.0.0.1:3478
CONVIA_COTURN=1 TURN_SECRET=<the value in .env> go test ./internal/turn    # the credentials, against that coturn
```

Real WebRTC is tested in Chromium with Playwright (ADR 0025): `npm run e2e` in `frontend` for direct connections, or, for the relay as well, Chromium and a coturn of its own in Docker, as CI runs them:

```text
docker compose --profile e2e run --rm e2e
```

The protocols are in [`docs/protocol`](docs/protocol).