/cs545project

online market project

Primary LanguageJavaScript

Web Application Architecture

Project Name: CORONA Online Market

Duration: 4 working days

Professor: Muhyieddin Al-Tarawneh

Team: 2
Member:
  • Chi Cuong Nguyen - 611.111
  • Tien Khanh Nguyen - 611.068
  • Eman Mohamed - 611.113
  • Elsabeth Assefa - 610.829

Project Technology

Name version
Spring Boot 2.3.1.RELEASE
Thymeleaf 2.3.1.RELEASE
Bootstrap 4.5.0
Spring Security 2.3.1.RELEASE
Auth0 with JWT 3.10.3
Spring Data JPA 2.3.1.RELEASE
Hibernate 5.4.17.Final
Java Functional Programming with Stream, Optional 8
H2 DB 1.4.200
Maven 3.6.3

Requirements

Before you get started, the following needs to be installed on your machine:

  • Git
  • Maven 3.6.3
  • Java 8
  • IDE such as (Intellij, Eclipse, ...) to enjoy coding ## Optional

How to installation project

1. Pull project package

    $ git clone https://github.com/chicuongit913/cs545project.git

2. Deploy project

2.1 Deploy using IDE such as Intellij

  • Import to Intellij
  • Right click pom.xml and add maven project
  • Right clik src/main/java/cs545_project/online_market/OnlineMarketApplication.java and Run the project
  • Enjoy

2.2 Deploy using command line

  • Travel to the project folder
    cd [project location]
  • Using Maven to package the project into standalone Jar file
    mvn package
  • Run project using java -jar command
    java -jar target/online_market-0.0.1-SNAPSHOT.jar

3. Access to project

    http://127.0.0.1:8082

User login to project

username password role
admin 123456 ADMIN
seller 123456 SELLER
buyer 123456 BUYER

Rest APIs

1. Claim token

URL: http://localhost:8082/auth/claim-token
Payload:

{   
 "username": "[user_name]", 
 "password": "[password]"   
 }

2. Access APIs resources

Get the generated Token in the response Header which has key-value pair looks like below:
Authorization →Bearer eyxxxxx

Put that key-value pair in every request Header to be able to access the resources from APIs.

to get more user for login you can go to /resources/data.sql and table user