Skip to content

Commit

Permalink
Modified the documentation of contributing.md to more clear and under…
Browse files Browse the repository at this point in the history
…standable format FIXES #11
  • Loading branch information
07tAnYa committed Oct 14, 2023
1 parent 4bdda7d commit 92aa2fc
Showing 1 changed file with 65 additions and 35 deletions.
100 changes: 65 additions & 35 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Contributing to Review App API
# Contributing to the development of the Review App API

Thank you for your interest in contributing to the Review App API!
We appreciate your support and welcome your contributions to help
enhance and improve the project. Please read through the following
We welcome your contributions to help improve the Review App API.
Please read through the following
guidelines to get started.

## Table of Contents

- [Contributing to Review App API](#contributing-to-review-app-api)
- [Table of Contents](#table-of-contents)
- [Prerequisites](#prerequisites)
Expand All @@ -16,13 +17,13 @@ guidelines to get started.
- [Process](#process)
- [Code of Conduct](#code-of-conduct)
- [We appreciate your contributions and look forward to
collaborating with you to improve the Review App API!]
(#we-appreciate-your-contributions-and-look-forward-to-collaborating-with-you-to-improve-the-review-app-api)
collaborating with you to improve the Review App API!]
(#we-appreciate-your-contributions-and-look-forward-to-collaborating-with-you-to-improve-the-review-app-api)

## Prerequisites

Before you begin contributing to the backend of the Review App,
please ensure you have the following prerequisites installed and
Before you begin contributing to the backend of the Review App,
please ensure you have the following prerequisites installed and
configured on your local machine:

- Docker: To set up and manage the development environment.
Expand All @@ -41,99 +42,128 @@ We follow these guidelines for contributing:
```bash
git clone https://github.com/yourusername/review-app-api.git

```

3. Navigate to the backend project directory:
```bash

```bash
cd review-app-api

```

4. Create a new branch for your contribution:

```bash
git checkout -b feature-name

5. Make your changes and ensure your code follows our coding
standards and practices.
```

5. Make your changes and follow our coding standards and practices.

6. Test your changes locally to ensure they work as expected.

7. Commit your changes with clear and concise commit messages:

```bash
git commit -m "Add feature: your feature description"

```

8. Create a pull request (PR) to the `main` repository's `main` branch.

## Setting Up the Development Environment

To set up the development environment locally, follow these steps:

1. Clone the backend repository:

```bash
git clone https://github.com/yourusername/review-app-api.git cd review-app-api

```

2. Run Docker Compose to set up the development environment:

```bash
docker-compose up -d

```

3. Install project dependencies using Yarn:

```bash
yarn

```

4. Copy the `.env.example` file to .`env.local` and configure the
5. following environment variables in the `.env.local` file:
```env
DATABASE_URL=postgresql://postgres:password@localhost:5432/review
JWT_SECRET=superman123
```

You can replace superman123 with any secret of your choice.
You can replace superman123 with any secret of your choice.

5. Run database migrations to set up the database:

```bash
yarn migrate:latest

```

6. Start the local development server:

```bash
yarn local
* ##Database migrations
can potentially destroy your data. Back up your database before running any migrations. *

```

7. The backend will be up and running on port 8000.

## Submitting a Pull Request (PR)

When you're ready to submit your changes, create a pull request
(PR) to the `main` repository's main branch following our guidelines.
Be sure to provide a clear description of your changes in the PR, and
(PR) to the `main` repository's main branch following our guidelines.
Be sure to provide a clear description of your changes in the PR, and
one of our maintainers will review it.

## `.env Configuration`
- Instructions on how to configure the environment variables for the
Review App API.
## `.env Configuration`

-Configure the environment variables for the Review App API.

1. You need to copy the `.env.example` file to
`.env.local`
`.env.local`

2. Then configure the necessary environment variables in the `.env.local`
file.
4. In this case, the required environment variables are `DATABASE_URL` and
`JWT_SECRET`.
6. The example shows the format for these variables and provides a placeholder
value for `JWT_SECRET`.
8. You are instructed to replace this placeholder value with a secret of your choice.
file.
3. In this case, the required environment variables are `DATABASE_URL` and
`JWT_SECRET`.
4. The example shows the format for these variables and provides a placeholder
value for `JWT_SECRET`.
5. You are instructed to replace this placeholder value with a secret of your choice.

### Process

- Copy the `.env.example` file to `.env.local` and configure the following
environment variables in the `.env.local` file:
```env
DATABASE_URL=postgresql://postgres:password@localhost:5432/review
JWT_SECRET=superman123

- You can replace superman123 with any secret of your choice.
```env
DATABASE_URL=postgresql://postgres:password@localhost:5432/review
JWT_SECRET=superman123
```

- You can replace superman123 with any secret of your choice.

## Code of Conduct

Please be aware that we have a Code of Conduct (CODE_OF_CONDUCT.md) that all
contributors are expected to follow. Please read and adhere to it throughout
We have a Code of Conduct (CODE_OF_CONDUCT.md) that all contributors are expected to follow.
Please read and adhere to it throughout
your contribution journey.

## We appreciate your contributions and look forward to collaborating with you
to improve the Review App API!
## We are delighted to have you as a contributor to the Review App API.

Your contributions are invaluable, and we appreciate you taking the time to help us make the API even better.

0 comments on commit 92aa2fc

Please sign in to comment.