2023-04-02 18:53:54 +02:00
_Read this in another language: [Spanish ](/docs/CONTRIBUTING.es.md ), [English ](/CONTRIBUTING.md ), [Simplified Chinese ](/docs/CONTRIBUTING.zh-cn.md )_
2023-04-01 20:15:47 +02:00
---
2022-10-16 22:54:39 +02:00
# Contributing
We would ❤️ for you to contribute to Pingvin Share and help make it better! All contributions are welcome, including issues, suggestions, pull requests and more.
## Getting started
2022-12-02 20:33:17 +01:00
2022-10-16 22:54:39 +02:00
You've found a bug, have suggestion or something else, just create an issue on GitHub and we can get in touch 😊.
2022-12-02 20:33:17 +01:00
## Submit a Pull Request
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
Before you submit the pull request for review please ensure that
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
- The pull request naming follows the [Conventional Commits specification ](https://www.conventionalcommits.org ):
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
`<type>[optional scope]: <description>`
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
example:
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
```
feat(share): add password protection
```
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
When `TYPE` can be:
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
- **feat** - is a new feature
- **doc** - documentation only changes
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
- Your pull request has a detailed description
- You run `npm run format` to format the code
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
< details >
< summary > Don't know how to create a pull request? Learn how to create a pull request< / summary >
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
1. Create a fork of the repository by clicking on the `Fork` button in the Pingvin Share repository
2022-10-16 22:54:39 +02:00
2023-02-10 14:22:32 +01:00
2. Clone your fork to your machine with `git clone`
2022-10-16 22:54:39 +02:00
```
2023-02-10 14:22:32 +01:00
$ git clone https://github.com/[your_username]/pingvin-share
2022-10-16 22:54:39 +02:00
```
3. Work - commit - repeat
2023-02-10 14:22:32 +01:00
4. Push changes to GitHub
2022-10-16 22:54:39 +02:00
```
$ git push origin [name_of_your_new_branch]
```
2023-02-10 14:22:32 +01:00
5. Submit your changes for review
2022-10-16 22:54:39 +02:00
If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
2023-02-10 14:22:32 +01:00
6. Start a Pull Request
7. Now submit the pull request and click on `Create pull request` .
2022-10-16 22:54:39 +02:00
8. Get a code review approval/reject
2023-02-10 14:22:32 +01:00
< / details >
2022-10-16 22:54:39 +02:00
## Setup project
Pingvin Share consists of a frontend and a backend.
### Backend
The backend is built with [Nest.js ](https://nestjs.com ) and uses Typescript.
#### Setup
1. Open the `backend` folder
2022-12-02 20:33:17 +01:00
2. Install the dependencies with `npm install`
3. Push the database schema to the database by running `npx prisma db push`
4. Seed the database with `npx prisma db seed`
2022-10-16 22:54:39 +02:00
5. Start the backend with `npm run dev`
### Frontend
2022-12-02 20:33:17 +01:00
2022-10-16 22:54:39 +02:00
The frontend is built with [Next.js ](https://nextjs.org ) and uses Typescript.
#### Setup
2022-12-02 20:33:17 +01:00
2022-10-16 22:54:39 +02:00
1. Start the backend first
2. Open the `frontend` folder
2022-12-02 20:33:17 +01:00
3. Install the dependencies with `npm install`
4. Start the frontend with `npm run dev`
2022-10-16 22:54:39 +02:00
You're all set!
### Testing
At the moment we only have system tests for the backend. To run these tests, run `npm run test:system` in the backend folder.