YACS

Contributing

License of contributions

YACS is licensed under the Apache License 2.0. Under section 5 of the license, any contribution you submit is licensed under the same terms unless you explicitly state otherwise. Contributions to packages/webshare fall under its MIT License.

Workflow

  1. Set up the project with the Quick start.
  2. Create a branch and make your change.
  3. Before opening a pull request, run:
yarn build
yarn typecheck
yarn test
yarn lint
yarn format

CI runs build, typecheck and tests on every pull request.

Changing the wire format

Schemas live in packages/dto/proto/v1. While yarn dev is running, code is regenerated whenever a .proto file changes; otherwise run:

yarn workspace @yacs/dto generate

Keep changes backwards compatible: add new fields with new numbers, never reuse or renumber existing ones, and run buf lint (part of yarn lint). Older installed PWAs may still be talking to a newer server.

Code conventions

  • Feature folders. Both api/src and app/src are organised by feature (conversation, message, call…), not by layer.
  • Shared contract. Event names, request shapes and limits go in @yacs/dto — never duplicate them in the app or API.
  • Logging. Use the shared logger rather than console.log:
import { createLogger } from "../libs/logger";

const logger = createLogger("conversation/controller");
logger.info("New conversation created %s", conversation.id);
  • Formatting is Prettier; run yarn format.

Releasing

Publishing a GitHub release on a commit in main builds the Docker image and pushes it to ghcr.io/yacs-app/yacs with semver tags (and latest for non-prereleases).