OrcaCD LogoOrcaCD

Contributing

Learn how to contribute to the OrcaCD project

Any contribution is greatly appreciated. You don't need to be a developer to contribute. You can help by translating the app, reporting issues, or simply sharing your ideas for new features.

If you have any questions, please do not hesitate to contact us.

Read our Code of Conduct to keep our community approachable and respectable.

Security

If you would like to report a security vulnerability, please take a look at SECURITY.md

Code contributions

We welcome code contributions and encourage clear, well-documented changes that include appropriate tests. When introducing a new feature, please ensure you add relevant tests. For breaking changes or major new features, open an issue beforehand to discuss your proposal with the team.

Required tools

We use Go and Node.js for the development of the backend and frontend respectively. For a detailed list of required tools and their versions, please refer to the CONTRIBUTING.md file in the repository.

Setting up the development environment

  1. Install all required tools listed above.

  2. Clone the repository and navigate to the project directory.

  3. Install the frontend dependencies:

    cd frontend
    pnpm i --frozen-lockfile
  4. Copy backend/.env.dev.example to backend/.env and set APP_SECRET to a random value with at least 32 characters. The Justfile loads this file automatically.

    cp backend/.env.dev.example backend/.env
  5. Start the Hub and the frontend development server from the repository root:

    just dev
  6. Open the app at http://localhost:3000. The Hub API runs on http://localhost:8080, and the Vite dev server proxies /api requests to it.

To run an Agent locally, register an agent in the UI, set AUTH_TOKEN in backend/.env and start it with just run-agent (or use just dev-all to start the Hub, Agent and frontend together).

Just commands

The Justfile in the repository root includes all backend commands, so they can be run from the root or from the backend/ directory. To list all available commands with a short description, run:

just -l

Backend tests need CGO_ENABLED=1. The just recipes set it for you. If you run go test directly, set it yourself:

CGO_ENABLED=1 go test -v -race -run TestName ./internal/hub/routes/

Linting, formatting and type checking

Run these commands from the frontend/ directory (and from e2e/ if you changed the E2E tests):

node --run lint                 # oxlint
node --run format               # oxfmt (use format:check to only verify)
node --run typecheck            # TypeScript type check
node --run translations:check   # check for unused and missing message keys (frontend only)

For the backend, use just lint, just fmt and just test.

Translations

The frontend uses Paraglide (inlang) for translations. Messages are stored in frontend/messages/<locale>.json, with en.json as the source file. When you add a new message key, add it to every locale file. Remove messages you no longer use, because node --run translations:check fails on unused messages and on keys that are missing in en.json. All other translations are managed on Crowdin, see Translating.

End-to-end tests

The E2E tests use Playwright and live in the e2e/ directory. Install the dependencies and browsers first:

cd e2e
pnpm i --frozen-lockfile && pnpm run install:browsers

Then run the tests:

pnpm test       # run all tests headless
pnpm test:ui    # run the tests in the interactive Playwright UI
  • Playwright builds the Hub and Agent images and starts the Hub with docker-compose.e2e.yml on http://127.0.0.1:8090. Set E2E_SKIP_BUILD=1 to skip the image build if the images are already built.
  • External services are mocked by small Node.js servers in e2e/mock/: gitea (Git provider), oidc (OIDC provider) and receiver (notification targets). The certs folder contains the self-signed certificate of the Gitea mock, which the Hub is configured to trust.
  • The agent, application and image tests start an Agent container through Docker Compose and run after all other tests. They need access to the Docker socket.

Running locally with Docker

A Docker Compose file is provided for running the full stack locally:

docker compose -f docker-compose.dev.yml up --build

The Hub will be available at http://localhost:8080. The Agent needs an AUTH_TOKEN, so register an agent in the UI and set it in docker-compose.dev.yml. To test OIDC login, start a local Pocket ID instance on http://localhost:1411 with --profile pocket-id.

Submitting a Pull Request

Before you submit the pull request for review please ensure that

  • The pull request naming follows the Conventional Commits specification:

    <type>[optional scope]: <description>

    example:

    fix: hide global audit log switch for non admin users

    Where type can be:

    • feat - a new feature
    • fix - a bug fix
    • docs - documentation only changes
    • refactor - a code change that neither fixes a bug nor adds a feature
    • test - adding or updating tests
    • ci - changes to the CI workflows
    • chore - maintenance such as dependency updates
  • Your pull request has a detailed description

  • You have added tests for any new features or bug fixes

  • Linting, formatting, type checks and tests pass

Last updated on

On this page