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
-
Install all required tools listed above.
-
Clone the repository and navigate to the project directory.
-
Install the frontend dependencies:
cd frontend pnpm i --frozen-lockfile -
Copy
backend/.env.dev.exampletobackend/.envand setAPP_SECRETto a random value with at least 32 characters. TheJustfileloads this file automatically.cp backend/.env.dev.example backend/.env -
Start the Hub and the frontend development server from the repository root:
just dev -
Open the app at
http://localhost:3000. The Hub API runs onhttp://localhost:8080, and the Vite dev server proxies/apirequests 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 -lBackend 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:browsersThen 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.ymlonhttp://127.0.0.1:8090. SetE2E_SKIP_BUILD=1to 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) andreceiver(notification targets). Thecertsfolder 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 --buildThe 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 usersWhere
typecan 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