> For the complete documentation index, see [llms.txt](https://opn-1.gitbook.io/gcp-v2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://opn-1.gitbook.io/gcp-v2/...md).

# Welcome!

## Getting started

### Guides

We have several guides to help you get started with any of the gcp-v2 projects:

* The [getting-started](https://opn-ooo.atlassian.net/wiki/spaces/ENG/pages/283672760/Getting+started) guide will help you setup your computer, install the software needed to work on the gcp-v2 projects, add SSH and GPG keys to github, and setup git to sign commits by default.
* The [elixir-guide](https://opn-ooo.atlassian.net/wiki/spaces/ENG/pages/283705592/Elixir+guide) guide provides a style guide.
* The [git-workflow](https://opn-ooo.atlassian.net/wiki/spaces/ENG/pages/283640100/Git+workflow) guide gives an overview of how we use git at OPN and includes a few tips for when you encounter problems using git.

### Adding git hooks (commit-msg and pre-commit)

It is **very important** that you install the commit-msg hook, as the commit message is used in the deployment process.

Add the commit-msg hook by running the following command:

```
cp ./hooks/* ./.git/hooks/
```

The commit-msg hook checks that the type is correct and that the opening line of the commit message is not too long. For more details about formatting the commit message, see [git-workflow - Commit your changes](https://github.com/opn-ooo/gcp-v2/blob/master/guides/git-workflow.md#commit-your-changes).

As for pre-commit hooks, they are optional, but we recommend you use [pre-commit](https://pre-commit.com/), which will add pre-commit hooks that you are free to customize.

Install pre-commit:

```bash
pip3 install pre-commit
```

In this directory, run the following command:

```bash
pre-commit install
```

Copy the sample pre-commit config file (at `.pre-commit-config.yaml.sample`) to `.pre-commit-config.yaml`. Then edit `.pre-commit-config.yaml` to just enable the checks that you want to run.

Once installed, the various checks (testing, formatting, etc.) defined in `.pre-commit-config.yaml` will be run every time you make a commit.

There may be times when you want to skip the pre-commit checks. You can do so by running `git commit` with the `--no-verify` option.

If you need to remove the pre-commit hooks, just run `pre-commit uninstall`.

### Working on gcp-v2-log-service

Run `mix deps.get` to install dependencies.

Some useful aliases are:

* `mix lint` - check formatting and analyze code using credo
* `mix coverage` - check test coverage and analyze code for vulnerabilities using sobelow
* `mix test` - run tests
