diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..64ad46ce54 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,74 @@ +# How to Contribute + +Thank you for looking at this. We, at Tracetest, are really excited to have you contribute on the project with us. + +The main lines of communication with our team are through [Github issues](https://github.com/kubeshop/tracetest/issues/new/choose) or [Discord](https://discord.gg/eBvEQRVyKX). Feel free to ask any questions! + +## Developing + +Development can be conducted using any GoLang and Typescript compatible IDE/editor (e.g., Jetbrains GoLand, VSCode). + +There are four places where you develop new things on Tracetest: on the CLI, on the API Server, on the Web UI and on the Documentation website. + +### CLI + +Written in Golang, the CLI code is stored in the folder `./cli`. You can see what options you have to test and build the application by typing `make help` inside the folder. + +To test its integration with our API, you can run a local API server on your machine by running one of our [examples](./examples/) with `docker compose`. For instance: +```sh +cd ./examples/tracetest-jaeger +docker compose up -d +``` + +Remember that you need a file pointing to that server by configuring the CLI using the `tracetest configure` command or using the flag `-c` with a valid config file location, like `config.yaml` with the following content: +```yaml +scheme: http +endpoint: localhost:11633 +analyticsEnabled: false +``` + +### API Server + +Written in Golang, the API Server code is stored in `./server`. You can see what options you have to test and build the application by typing `make help` inside the folder. + +To run the server along the database and the Open Telemetry collector, you can run `docker compose` at the root folder of Tracetest, by executing: +```sh +docker compose up postgres otel-collector +``` + +### Web UI + +Written in Typescript and using Node.js tools, the Web UI code is stored in the folder `./web`. You can see what options you have to test and build the application by seeing the `package.json` scripts [here](./web/package.json). + +Like the CLI, to connect to the API, you can run a local API server on your machine by running one of our [examples](./examples/) with `docker compose`. For instance: +```sh +cd ./examples/tracetest-jaeger +docker compose up -d +``` + +### Documentation Website + +Our docs are written in Markdown and the website is generated by `docusaurus`, the documentation is stored in the folder `./docs`. You can see what options you have to test and build the application by seeing the `package.json` scripts [here](./docs/package.json). + +## Testing + +We strive to have tests verify every important corner of our code-base. It will be greatly appreciated if your PR's include tests for the changes you propose. + +## Submitting Changes + +Please create a Github Pull-Request with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). When you send a pull request, we would appreciate included use-case examples. Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit). + +Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: + + $ git commit -m "A brief summary of the commit + > + > A paragraph describing what changed and its impact." + +## Coding Conventions + +Start reading our code and you'll get the hang of it. We use code formatting tools like [eslint](https://eslint.org/) and [go vet](https://pkg.go.dev/cmd/vet) to help maintain peace in the galaxy. + +If you have any doubts about coding standards you can follow [Effective Go](https://go.dev/doc/effective_go) or [Go styleguide](https://google.github.io/styleguide/go/) for Golang and [Typescript styleguide](https://google.github.io/styleguide/tsguide.html) for Typescript. + +Many thanks, +Kubeshop diff --git a/README.md b/README.md index 72adce86e3..4ccb20acd5 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,10 @@ Is available at [https://docs.tracetest.io/](https://docs.tracetest.io/) We strive to produce quality code and improve Tracetest rapidly and safely. Therefore, we have a full suite of both frontend and backend tests. We are using Cypress to test our frontend code and (surprise, surprise) Tracetest for our backend code. You can see the [test runs here](https://github.com/kubeshop/tracetest/actions/workflows/pull-request.yaml), and a blog post describing our [testing pipelines here](https://tracetest.io/blog/integrating-tracetest-with-github-actions-in-a-ci-pipeline). +# Contributing + +Want to contribute with Tracetest? See our contributing guidelines [here](./CONTRIBUTING.md). + # License [MIT License](/LICENSE)