We're so excited you're interested in helping with SuperTokens! We are happy to help you get started, even if you don't have any previous open-source experience 😊
- Take a look at How to Contribute to an Open Source Project on GitHub
- Go through the SuperTokens Code of Conduct
- Check our Github Issues to see if someone has already answered your question.
- Join our community on Discord and feel free to ask us your questions
As you gain experience with SuperTokens, please help answer other people's questions! 🙏
You can get started by taking a look at our Github issues
If you find one that looks interesting and no one else is already working on it, comment in the issue that you are going
to work on it.
Please ask as many questions as you need, either directly in the issue or on Discord. We're happy to help!:raised_hands:
- More tests
- Contributing to discussions that can be found here
- Improved error messages
- Educational content like blogs, videos, courses
- Navigate to the supertokens-root repository
- Click on the
Open in Gitpod
button
- OS: Linux or macOS. Or if using Windows, you need to use wsl2.
- JDK: openjdk 15.0.1. Installation instructions for Mac and Linux can be found in our wiki
- IDE: IntelliJ(recommended) or equivalent IDE
-
Fork the supertokens-core repository (Skip this step if you are NOT modifying supertokens-core)
-
git clone https://github.com/supertokens/supertokens-root.git
-
cd supertokens-root
-
Open the
modules.txt
file in an editor (Skip this step if you are NOT modifying supertokens-core):- The
modules.txt
file contains the core, plugin-interface, the type of plugin and their branches(versions) - By default the
master
branch is used but you can change the branch depending on which version you want to modify - The
sqlite-plugin
is used as the default plugin as it is an in-memory database and requires no setup- core
- plugin-interface
- Check the repository branches by clicking on the links listed above, click the branch tab and check for all the available versions
- Add your github
username
separated by a ',' aftercore,master
inmodules.txt
- If, for example, your github
username
ishelloworld
then modules.txt should look like...// put module name like module name,branch name,github username(if contributing with a forked repository) and then call ./loadModules script core,master,helloworld plugin-interface,master sqlite-plugin,master
- The
-
Run loadModules to clone the required repositories
./loadModules
- Open
supetokens-root
in your IDE - After gradle has imported all the dependencies you can start modifying the code
- Navigate to the
supertokens-root
repository - Run all tests
./startTestEnv
- If all tests pass the terminal should display
- Go to the supertokens-core repo on github (or your forked version of it).
- Navigate to the Actions tab.
- Find the action named "Run tests" and navigate to it.
- Click on the "Run workflow" button.
- Set the config variables in the drop down:
- supertokens-plugin-interface repo owner name: If you have forked the supertokens-plugin-interface repo, then set the value of this to your github username.
- supertokens-plugin-interface repos branch name: If the core version you are working on is compatible with a plugin-interface version that is not in the master branch, then set the correct branch name in this value.
- Click on "Run workflow".
- Run
startTestEnv --wait
in a terminal, and keep it running - Then open
supertokens-root
in another terminal and runcp ./temp/config.yaml .
- Then run
java -classpath "./core/*:./plugin-interface/*:./ee/*" io.supertokens.Main ./ DEV
. This will start the core to listen onhttp://localhost:3567
- Before submitting a pull request make sure all tests have passed
- Reference the relevant issue or pull request and give a clear description of changes/features added when submitting a pull request
- Make sure the PR title follows conventional commits specification
- Setup test env and keep it running
- In
supertokens-root
, runcp temp/config.yaml .
- On a different terminal, go to
supertokens-root
folder and runjava -classpath "./cli/*" io.supertokens.cli.Main true install
SuperTokens is made possible by a passionate team and a strong community of developers. If you have any questions or would like to get more involved in the SuperTokens community you can check out:
Additional resources you might find useful: