- Homebrew (If you're using macOS)
- Maven (version 3.9.6 or higher)
- Java (version 17)
- IntelliJ Community or Ultimate Edition
- Docker Desktop
- To install maven type the following command in your terminal:
brew install maven
- Verify your installation using the following command:
If maven is installed correctly you should see the maven version in the terminal:
mvn -version
Apache Maven 3.9.7
- To install Maven on Windows, we head over to the Apache Maven site to download the latest version and select the Maven zip file, for example, apache-maven-3.9.6-bin.zip.
- Adding Maven to the Environment Path We add both M2_HOME and MAVEN_HOME variables to the Windows environment using system properties and point them to our Maven folder.
- Verify the Maven installation by typing: mvn -version
- Then, we update the PATH variable by appending the Maven bin folder — %M2_HOME%\bin — so that we can run the Maven command everywhere.
- To setup the database & create a
.env
file run the following command in your terminal:make setup
- To edit your environment variables edit the
.env
file.
- To edit your environment variables edit the
- If you do not have
make
installed, run thedocker-run
andcopy-env
commands from theMakefile
manually.
- To read the values from your
.env
you will need install theEnvFile
plugin. - To Install the plugin to go
settings
>Plugins
>Marketplace
> EnvFile.
- Press the Edit configurations button on the top right of your screen
- Create a new application
- Select
Java version 17
,Skill tree
andSkillTreeApplication
- Check
EnvFile
andSubstitute Environment Variables
- Add path to the
.env
file you created above
- Run RDS backend on your local machine
- Copy the
public key
fromlocal.js
(if not inlocal.js
copy it fromdevelopment.js
) and add it in your.env
file. - Run skill tree frontend, click on
signin with github
button- Once authenticated you will be redirected to
localhost:4000
(skill tree frontend homepage) and ards-session-v2-development
cookie will be set in the browser which will be used for authentication when making API calls. - NOTE:
- make sure that
incompleteUserDetails
is false for the user in firestore, else the redirect will not work as intended.
- make sure that
- Once authenticated you will be redirected to
Using Website - backend
On Local - http://localhost:3000/auth/github/login?redirectURL=https://staging-skilltree.realdevsquad.com/tasks?v2=true
This will create a cookie in your browser rds-session-v2-development
On Staging - https://staging-api.realdevsquad.com/auth/github/login?redirectURL=https://staging-skilltree.realdevsquad.com/tasks?v2=true
This will create a cookie in your browser named rds-session-v2-staging
This repo uses https://github.com/diffplug/spotless/tree/main/plugin-maven#java for formatting files.
Please build using mvn compile
in local or run mvn spotless:apply
before pushing the code to fix any formatting errors.
To check if the codebase is formatted, you can explicitly use mvn spotless:check
The Continuous Integration build for pushed commits may fail when a Pull Request is created if your code doesn't follow project's formatting guideline.