Skip to content

Latest commit

 

History

History
133 lines (79 loc) · 4.49 KB

contributing.md

File metadata and controls

133 lines (79 loc) · 4.49 KB

Contributing

Contributions are welcome and will be fully credited.

Please read and understand the contribution guide before creating an issue or pull request.

How to get started

Hey there! You're probably here because you want to help out. Thanks for joining us!

In this document we'll try to outline how to get started contributing to Onramp, and how to perform common tasks, like keeping your local fork of Onramp up to date.

Set up your own fork of the repository

In order to contribute you'll want to make a "fork" of this repository.

Click the fork button at https://github.com/tighten/onramp and wait for it to complete.

Once the fork is done, clone your fork to your computer by navigating to a folder you'd like to put the site in, and then replacing [username] in this snippet with your GitHub username and running it from the terminal:

git clone [email protected]:[username]/onramp.git

In order to keep your fork up-to-date with the original repository, you'll also want to add an extra git "remote" that points to the original repo.

Your fork will already be connected to your local repo as the remote named origin.

Let's add your link to the original Tighten repo by running the following command after navigating to the onramp folder in your local repo:

git remote add upstream [email protected]:tighten/onramp

This added a remote named upstream that points to Tighten's repo.

You can fetch the upstream branches by running the following command:

git fetch upstream --prune

Now you have this set up, run the following commands to install the dependencies:

Vite requires node ^14.18.0 || >=16.0.0 to run

composer install
npm install
npm run dev

Check that the .env file exists; if not, copy the .env.example to .env:

cp .env.example .env

Each Laravel application needs an unique application key, which can be generated by running the following command:

php artisan key:generate

Set up the database, and run the migrations and seeders

Next, edit the .env file and fill the DB_ variables with your correct database configuration details.

If you haven't yet created a database, create a new MySQL database (likely named onramp, but you can customize this in .env).

Now, migrate and seed the database:

php artisan migrate:fresh --seed

If prompted, choose that it's a new install.

How to perform common tasks

Keep your fork up to date

Using the git remote we set up earlier, we first need to fetch changes that were made upstream:

git fetch upstream --prune

Next, change to your local main branch:

git checkout main

And merge the changes that were made upstream into your local branch.

git merge upstream/main --no-ff

Prepare your pull request

Before actually creating a pull request, you have the chance to clean up your code. Remove debug statements, clean up commented code and refactor if needed.

Look to this blog post for how to write a good git commit message.

Create a pull request

When you have your changes ready in your own branch on your fork, it's time to create a pull request. Try to describe what kind of changes you have made and why you have made them. This helps us in understanding why you are suggesting this change and what your reasoning behind it is.

Onramp utilizes laravel nova in production, but the package and its dependencies are optional when working on Onramp locally. If you install nova locally, please ensure that the nova package and any packages that utilize nova are missing from the require and require-dev keys in package.json when creating commits.

Look to this blog post for how to create a great pull request.

How to contribute to Onramp

Do you have content you can add?

  • You can add an issue referencing the content you'd like to add

Do you want to code on the app itself?

  • Open or comment on an issue before starting to code to ensure @mattstauffer (or someone else) isn't already working on it and that you fully understand the goals and scope
  • Once ready to code, fork the repo, and PR your changes in, referencing the original issue number

Do you want to help translate Onramp?

Do you have questions about the plans for Onramp?

  • Ask any question about how to contribute to or use Onramp in the issues here