Skip to content

Latest commit

 

History

History
118 lines (87 loc) · 2.67 KB

SETUP-CONTRIBUTING.md

File metadata and controls

118 lines (87 loc) · 2.67 KB

Project set up / Git & Github Workflow

You can request access to the repository in our discord

Once you have access you can start contributing.

Project Setup

First, clone the repository to your machine

Now, we need to setup the server with the database

To setup the database locally we will be using Docker, so make sure first you have it installed on your machine.

Let's install the database, run :

docker run --name monettodb -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql:latest

Don't forget to replace password with your password

Now we are gonna install a database management tool called adminer, run :

docker run -d --name adminer --link monettodb:db -p 8080:8080 adminer

After installing them you'll need to start the database and adminer either from the GUI or the terminal.

If you are using the terminal, you can run :

docker start monettodb
docker start adminer

To make sure they are running, you can run :

docker ps

Now let's go back to our backend setup.

First go into the /backend and install the dependencies :

npm i

Also before we continue you need to create a .env file inside the /backend with the follow variable :

DATABASE_URL="mysql://root:password@localhost:3306/monetto"

Don't forget to replace the password with your password.

Now, run :

npx prisma migrate dev
npx prisma generate

And the backend is ready!
To start the development server just run :

npm run start:dev

Let's setup the frontend now

Move into the /front and install the dependencies :

npm i

Create a .env file with the following variable which is the port that it'll be running the frontend for the development.

PORT=4000

And done! You can start the frontend by running :

npm run start

Git & Github Workflow

Here is a reference image on how we are working on the project :

Workflow

  • First thing you need to do is to fork the repository.

From there clone the project to your machine, with

git clone your-forked-repository

Then create a new branch :

git branch your-branch-name

Now switch to your newly created branch :

git checkout your-branch-name

Now you can start developing!

To push changes on your repository to the specific branch you are working :

git push origin your-branch-name

When your branch is ready, you need to open a Pull Request to the original repository. The PR should be at the dev branch and not on the main directly.