Yashmerino / online-shop

Online Shop made using Spring Boot and React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java CI with Maven Node.js CI Quality Gate Status

Online Shop

sms logo

Online Shop Youtube Video

Youtube Showcase Video of the project

Online Shop is a pet project made using Spring Boot and React. It uses a MySQL database to store the user, seller and products data. Online shop uses JWT for the authorization system and supports 3 languages:

  • English
  • Romanian
  • Russian

Prerequisites:

  • Java 17+
  • Node.js 21+
  • Maven
  • MySQL Database

To run the Spring server application:

  • Execute the mvn clean install command in the online-shop\online-shop-server directory.
  • Modify the online-shop-server\src\main\resources\application.properties file.
# Database properties
spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:mysql://localhost:3306/online_shop
spring.datasource.username=root
spring.datasource.password=1234

# JWT
jwt.secret=640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316

# Algolia
algolia.usage=true
algolia.app.id=KLFWXPOEHY
algolia.api.key=87c939ac9269c88a17beeaacca28567a
algolia.index.name=online-shop-dev
  • Execute the mvn spring-boot:run command in the online-shop\online-shop-server directory.

To run the React client application:

  • Execute the npm install command in the online-shop\online-shop-ui directory.
  • Modify the online-shop-ui\src\env-config.ts file.
export const API_BASE_URL = "http://localhost:8080";
export const JWT_SECRET = "640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316640762F165320F52408DAFED313C106346575273C66013DE94B8D13E9ED20316";
export const ALGOLIA_APP_ID = "KLFWXPOEHY";
export const ALGOLIA_API_KEY = "87c939ac9269c88a17beeaacca28567a";
export const ALGOLIA_INDEX_NAME = "online-shop-dev";
export const ALGOLIA_USAGE = true;
  • Execute the npm start command in the online-shop\online-shop-ui directory.

NOTE: If you don't want to use the Algolia search and therefore to not display the search page, you don't have to define any Algolia properties.


Selenium Integration Tests

  • Online Shop also has a separate module for Selenium integration tests. It resides here: online-shop/online-shop-it
  • Modify the online-shop-it\src\test\resources\it-test.properties file.
db.url=jdbc:mysql://localhost:3306/online_shop
db.username=root
db.password=1234
  • Make sure to turn on the Spring server and React client to run the integration tests.

NOTE: If you run any integration test, it will dump all the existing data from your database.


Feel free to create issues and pull requests :)

About

Online Shop made using Spring Boot and React

License:MIT License


Languages

Language:Java 60.4%Language:TypeScript 37.4%Language:JavaScript 1.5%Language:SCSS 0.4%Language:HTML 0.3%