Skip to content

Getting Started

Ben Myers edited this page Oct 3, 2021 · 2 revisions

This guide will show you how to set up your own version of this codebase, run the project locally, and how to request your changes be merged into the main code to be deployed for all to use.

showmy.chat uses a fork → clone → edit → pull request workflow that is common to many open source projects across GitHub. This workflow ensures you have the flexibility to make changes you need on your end and, when you're ready, request that those changes be merged in. This workflow also makes open source contributions easier for project maintainers, as they can review code when they're ready, and they don't have to extend powerful project permissions to all would-be contributors.

Prerequisites

To contribute to this project, you'll need the following pieces of software:

Git is our version control system. In other words, Git is software that we use to keep track of changes to our code. Check out DigitalOcean's introduction to Git if you're unfamiliar!

Node.js is a runtime for JavaScript. It lets you run JavaScript in your terminal, and manages any dependencies your project has.

One-Time Repository Setup

These steps for setting up your own local copy of the codebase should only be necessary once.

In this section, we'll go through how to fork the showmy.chat codebase, so you have a version of the code that you own, making contribution permissions flexible as you work. Then, we'll go through how to clone the codebase, so you have a version of the code on your device that you can edit.

Forking the Codebase

The canonical version of the showmy.chat codebase is hosted at BenDMyers/showmy.chat. This means that Ben is responsible for assigning contributor permissions and approving contributions.

Typically, project maintainers don't give would-be contributors direct access to modifying the canonical codebase. These permissions can be dangerous if misused, and many would-be contributors are unknown strangers. Instead, project maintainers expect that would-be contributors fork the code, creating a version of the code that they own. This forked version is tethered to the original, so when the contributor is ready, they can request changes be merged from their fork into the original.

To fork the repository, find the Fork button in the top-right corner of the repository, next to the Watch and Star buttons, and click it. GitHub will walk you through creating the fork on your own GitHub account.

Cloning Your Fork

Now you have a version of the code that you own and can do whatever you need with. There's a problem though — your fork still only exists in GitHub. It would be much nicer to have the code locally, on your device, that you could pull up with your editor of choice.

Local Development Workflow

Providing Your Changes Upstream