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
- Java 17+
- Node.js 21+
- Maven
- MySQL Database
- Execute the
mvn clean install
command in theonline-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 theonline-shop\online-shop-server
directory.
- Execute the
npm install
command in theonline-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 theonline-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.
- 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.