Giter Site home page Giter Site logo

scholarx's Introduction

ScholarX - backend application and auth server

Backend of the ScholarX project

Setting up the project for development

Prerequisites

  • Java
  • Maven
  • PostgreSQL
  • Linkedin Social Login App
  • Gmail Account with an App Password

Setup Linkedin Social Login App

  1. Create a new Linkedin App (help?)
  2. Click on Auth tab and add http://localhost:8080/login/oauth2/code/linkedin as an authorised redirect URL
  3. Make Sure you have properly added the Sign in with Linkedin product under products tab

Setup a gmail account with an app password

  1. Create a new gmail account if you don't have one already
  2. Enable Two Factor Authorisation
  3. Generate a new App Password (help?)

Run Locally

  1. Fork and clone the repository
git clone https://github.com/<your profile name>/scholarx
  1. Open the cloned repo, Find and open the application.yml file
  2. Replace the ${client-id} and ${client-secret} with the values from the above linkedin social app
    example:
          linkedin:
            client-id: 324780jdsfg2u4
            client-secret: MsdfsdfggsqPFh
            client-authentication-method: post
            authorization-grant-type: authorization_code
  1. Replace the mail username and password values with the generated App Password and the corresponding gmail address
    example:
  mail:
    host: smtp.gmail.com
    port: 587
    username: [email protected]
    password: jhdfklsdjjadskt
    properties:
  1. Replace the datasource dummy values with your local mysql server instance credentials
    example:
  datasource:
    url: jdbc:postgresql://localhost:5432/scholarx_DB?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
    username: rootuser
    password: rootpassword
    platform: postgres
  1. Run the application
mvn spring-boot:run

Configuring a MySQL Database (Optional)

  1. Add the mysql-connector-java dependency to the pom.xml file.
<dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <scope>runtime</scope>
</dependency>
  1. Replace the spring.jpa and spring.datasource configurations in application.yml with the following configuration.
  jpa:
    database: postgresql
    hibernate:
      ddl-auto: update
  datasource:
    url: jdbc:postgresql://${DB_URL}/${DB_NAME}?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
    username: ${DB_USER_NAME}
    password: ${DB_USER_PASSWORD}
    platform: postgres

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.