Skip to content

Latest commit

 

History

History
104 lines (68 loc) · 3 KB

CONTRIBUTING.md

File metadata and controls

104 lines (68 loc) · 3 KB

Contributing to Supernova

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  • Before jumping into a PR be sure to search existing PRs or issues for an open or closed item that relates to your submission.

Developing

The development branch is main. This is the branch that all pull requests should be made against. The changes on the main branch are tagged into a release monthly.

To develop locally:

  1. Fork this repository to your own GitHub account and then clone it to your local device.

  2. Create a new branch:

    git checkout -b MY_BRANCH_NAME
  3. Install pnpm and turbo globally:

    npm install -g pnpm
    npm install -g turbo
  4. Install the dependencies with:

    pnpm i
  5. Create environment files

    • For the API, you need to configure the .env file. You can copy the example file and edit it. Mostly you need to configure the database connection. Default values of those are in apps/api/docker-compose.yml:

      cp apps/api-v2/.env.example apps/api-v2/.env
      // then edit .env for the database connection variables as specified
      // see docker-compose.yml
  6. Start developing and watch for code changes:

    • For the API, you need to run infra pieces that the project depends locally (e.g the main MySQL database), then run the migrations on the database. Make sure you have Docker installed and running, then at the project root, run:

      pnpm db:setup

      Then run the API:

      pnpm dev:api
    • For the desktop, just do:

      pnpm dev:desktop
    • or if you like both:

Building

You can build the entire project with:

pnpm build

If you want to build a specific package, you can do so with:

turbo build --scope=<package name>

Please be sure that you can make a full production build before pushing code.

Testing

More info on how to add new tests coming soon.

Linting

To check the formatting of your code:

pnpm lint

If you get errors, be sure to fix them before committing.

Making a Pull Request