Myntenance is a welcoming project and we're really happy to build it together. All kind of contributions are welcome: suggestions and bug reports are as valuable as code contributions!
You can find in this document the steps to run the project locally and get ready to contribute.
Something is wrong or missing? Feel free to open an issue or a pull request.
Install the dependencies with pnpm:
pnpm install
Duplicate the file .env.example
and rename it to .env.local
to set up the environment variables.
Start the development server:
pnpm run dev
That's it! You can now access the project at http://localhost:3000.
For changes not affecting the database schema there's nothing to setup, you can connect to the production Supabase instance with the provided anon key in the .env.example
file.
However, you must follow the steps below if you need to make changes to the database schema or if you want to run e2e tests.
We will enable login through GitHub OAuth App and setup a local supabase instance.
In order to enable login through GitHub you need to create a GitHub App. You can get from there the two keys needed to enable the authentication.
You can learn more on the official GitHub documentation or follow the steps below:
-
On GitHub go to
Settings
->Developer Settings
->GitHub Apps
and click theNew GitHub App
button. -
Fill in the values as shown in the image below.
- Make sure
http://localhost:54321/auth/v1/callback
is set as theCallback URL
as this will be your local supabase URL. - You can also disable
Expire user authorization tokens
for development purposes.
- Make sure
-
Disable
Webhook
(make sureActive
is unchecked) -
Setup Repository permissions (scroll down in the same page)
- Set
Read-only
for: Actions, Contents, Metadata, Pull requests - Set
Read & Write
for: Issues
- Set
-
Setup User permissions (scroll down in the same page)
- Set
Read-only
for: Email addresses
- Set
-
Optional: You can keep
Where can this GitHub App be installed?
asOnly on this account
for development purposes. -
Click on
Create GitHub App
button. -
Click on
Generate a new client secret
. -
Copy the
Client ID
andClient Secret
and paste them in the.env.local
file, respectively into theREACT_APP_GITHUB_CLIENT_ID
andREACT_APP_GITHUB_CLIENT_SECRET
variables.
During development you will use a local Supabase instance. Make sure to have Docker installed on your machine and running.
- Run
pnpm run supabase:start
to start the database container (the first time it will take a while to download the image). - Copy the following values into your
.env.local
file:
- Fork the repository
- Clone the repository to your local machine
- Create a new branch
git checkout -b <branch-name>
- Make your changes
- Commit and push your changes
git add .
git commit -m "commit message"
git push origin <branch-name>
- Create a pull request
- Wait for the pull request to be reviewed and merged