-
Fork this repository to your own GitHub account and then clone it to your local device.
-
Create a new branch where you'll do your work.
git checkout -b my-new-feature
-
Install the dependencies with:
pnpm i
-
Set up your
.env
file.
-
Start by copying the
.env.example
file to a new file named.env
. This file will store your local environment settings. -
Use
openssl rand -base64 32
to generate a key and add it underNEXTAUTH_SECRET
in the .env file. -
Database setup
-
Create a local
MySQL
instance and replace<user>
,<pass>
,<db-host>
, and<db-port>
with their applicable values.LOCAL_DATABASE_URL='mysql://<user>:<pass>@<db-host>:<db-port>'
-
If you don't want to create a local DB, then you can also consider using services like railway.app or render.
-
Generate prisma migrations & client.
npx prisma migrate dev --name init && npx prisma generate
-
-
You have to set up resend to run the app:
- Resend: To obtain your
RESEND_API_KEY
, visit the Resend dashboard. This credential is essential for setting up Email Auth.
- Resend: To obtain your
- Start Developing
pnpm dev
- Be sure to check the "Allow edits from maintainers" option while creating your PR as we may suggest some changes or request improvements.
- Set the base branch as
staging
when opening a pull request. - If your PR refers to or fixes an issue, be sure to add
refs #XXX
orfixes #XXX
to the PR description. ReplacingXXX
with the respective issue number. See more about Linking a pull request to an issue. - Be sure to fill the PR Template accordingly.
Do not commit your pnpm-lock.yaml
unless you've made changes to the package.json
. If you've already committed pnpm-lock.yaml
unintentionally, follow these steps to undo:
If your last commit has the pnpm-lock.yaml
file alongside other files and you only wish to uncommit the pnpm-lock.yaml
:
git checkout HEAD~1 pnpm-lock.yaml
git commit -m "Revert pnpm-lock.yaml changes"
If you've pushed the commit with the pnpm-lock.yaml
:
- Correct the commit locally using the above method.
- Carefully force push:
git push origin <your-branch-name> --force
If pnpm-lock.yaml
was committed a while ago and there have been several commits since, you can use the following steps to revert just the pnpm-lock.yaml
changes without impacting the subsequent changes:
-
Checkout a Previous Version:
- Find the commit hash before the
pnpm-lock.yaml
was unintentionally committed. You can do this by viewing the Git log:git log pnpm-lock.yaml
- Once you have identified the commit hash, use it to checkout the previous version of
pnpm-lock.yaml
:git checkout <commit_hash> pnpm-lock.yaml
- Find the commit hash before the
-
Commit the Reverted Version:
- After checking out the previous version of the
pnpm-lock.yaml
, commit this change:git commit -m "Revert pnpm-lock.yaml to its state before unintended changes"
- After checking out the previous version of the
-
Proceed with Caution:
- If you need to push this change, first pull the latest changes from your remote branch to ensure you're not overwriting other recent changes:
git pull origin <your-branch-name>
- Then push the updated branch:
git push origin <your-branch-name>
- If you need to push this change, first pull the latest changes from your remote branch to ensure you're not overwriting other recent changes: