When contributing to this repository, please first discuss the change you wish to make via issues, discord.
Please note if you are working on a certain issue then make sure to stay active with development.
When you are working with git, please be sure to follow the conventions below on your pull requests, branches, and commits:
PR: [#ISSUE ID] Title of the PR
Branch: [ISSUE ID]-title-of-the-pr (shorter)
Commit: [[ISSUE ID]] [ACTION]: what was done
Examples:
PR: #2 Add Docker container for Postgres
Branch: 2-add-container-postgres
Commit: [2] feat: add docker container for postgres
You will need to install docker on your local machine.
If you do not have docker, go here to download and install: https://www.docker.com/get-started/
If you see error starting db on M1 mac, you may need to update your docker config file at ~/.docker/config.json
Your file should look like something like this:
{
"auths": {},
"currentContext": "desktop-linux"
}
If you are getting WSL error when you launch your desktop docker application, go here and follow these steps for windows: https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package.
To get started with Code Racer locally, follow these steps
-
Make sure you have installed Docker locally (See above Prerequisites)
-
Fork the repository as your own repo
-
Clone forked repo to your local machine
git clone https://github.com/<YOUR_GITHUB_ACCOUNT_NAME>/code-racer.git
-
Navigate to the project directory
cd code-racer
-
Create a .env file inside the project's packages/app directory.
-
Copy and paste variables from
packages/app/.env.example
intopackages/app/.env
-
Install NPM packages
npm i
-
Start the Database If you are using Docker don't forget to run
docker-compose up
to start the database. (Optional if using Docker for managing the database): Start the Database.npm run dev:db
-
Start the app dev server
npm run dev:app
-
Start the web socket server
npm run dev:wss
Open your browser and visit http://localhost:3000 to see the application running.
If you're new to Github and working with open source repositories, I made a video a while back which walks you through the process:
There is also a new video explaining how you can contribute to this project:
How to contribute to open source projects (our community project walkthrough)
If you want to work on a new feature, follow these steps.
- Fork the repository
- Clone your fork
- Checkout a new branch
- Do your work
- Commit
- Push your branch to your fork
- Go into github UI and create a PR from your fork & branch, and merge it into upstream MAIN
You should pull in the changes that we add in daily, preferably before you checkout a new branch to do new work.
git checkout main
git pull upstream main
Before submitting a Pull Request, you should
- Check your code safety with Linter and TypeScript, and make sure your code can build successfully.
npm run pr:precheck
- (Optional) Do an E2E test to ensure application functions properly
npm run e2e -w @code-racer/app
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a friendly experience for everyone, regardless of any experience to give everyone an opportunity to contribute in this project.
The primary responsibility of contributors is to provide high-quality code contributions to the project. This involves writing, reviewing, and submitting code changes that improve the project's functionality, fix bugs, or implement new features.
Contributors should actively participate in project discussions and communicate effectively with other contributors, maintainers, and users. This includes joining discord server solely created for this project.
Contributors can play a role in the long-term maintenance of the project by actively monitoring the project's issue tracker, addressing bug reports and feature requests, and collaborating with other contributors to ensure the project remains healthy and sustainable.
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.