Real-Dev-Squad / skill-tree-backend

6 stars 15 forks source link

Skill Tree Backend

Required Tools

Development Setup

Install Maven

macOS

  1. To install maven type the following command in your terminal:
    brew install maven
  2. Verify your installation using the following command:
    mvn -version

    If maven is installed correctly you should see the maven version in the terminal:

    Apache Maven 3.9.7

Windows

  1. 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.
  2. 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.
  3. Verify the Maven installation by typing: mvn -version
  4. Then, we update the PATH variable by appending the Maven bin folder — %M2_HOME%\bin — so that we can run the Maven command everywhere.

Setup database and configure env

NOTE:

Install EnvFile Plugin in IntelliJ

Create a configuration in IntelliJ

Running your application

Steps to authenticate a user during development

To Authenticate Yourself

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

Contributing

Code Formatting

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.