# Contribution Guideline

> Here's an easy enough guide to making contributions to the project

## Setup Locally

First create a fork of the project from the original `https://github.com/MartinsOnuoha/countriesNowAPI.git`

### Clone the fork

```
git clone https://github.com/YourName/countriesNowAPI.git
```

### Change directory

```
cd countriesNowAPI
```

### Install packages

```
npm i
```

### Start Project

```
npm start
```

### Run test

```
npm run integration:test
```

now visit the site on port 3000 (default) or whatever port was set as the `PORT` environment variable

## Making Changes

> * Create a new branch for each change prefixing branch name with the type of change
> * e.g feat/get-houses, chore/update-readme

## Adding New Endpoints

> * Add new endpoints in the `./routes/countries.js` file
> * The `./controllers` folder holds the `countryController.js` file where each endpoint method lives
> * Create a method for every new endpoint within this file
> * Add a test suite for each endpoint within the `./test/`
> * Update the openApi Documentation in `./swagger` to reflect the new endpoints

## Commit Messages

> * Currently the project uses [commitizen](https://github.com/commitizen/cz-cli) style for making Commits.
> * Since you already ran the `npm i` command, you should have everything setup to use commitizen.
> * Once you're ready to make that awesome change, do:
>
> ```
> git add .
> ```
>
> Then run the commitizen npm script with:
>
> ```
> npm run make:commit
> ```
>
> * You can now make a push to your branch


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://martins-victor.gitbook.io/country-and-cities/docs/contributing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
