Giter VIP home page Giter VIP logo

online-shop's Introduction

Building a Online Shop App with Spring Boot, Spring Security, JWT, React and Ant Design

App Screenshot

Tutorials

Steps to Setup the Spring Boot Back end app (websiteBackend)

  1. Clone the application

    git clone https://github.com/goodFancier/Shop.git
    cd polling-app-server
  2. Create MySQL database

    create database onlineShop

    Also, I prepared a data backup for faster testing onlineShop.sql

  3. Change MySQL username and password as per your MySQL installation

    • open src/main/resources/application.properties file.

    • change spring.datasource.username and spring.datasource.password properties as per your mysql installation

  4. Run the app

    You can run the spring boot app by typing the following command -

    mvn spring-boot:run

    The server will start on port 8080.

  5. Default Roles

    The spring boot app uses role based authorization powered by spring security. You need to execute this script.

    INSERT IGNORE INTO roles(name) VALUES('ROLE_USER');
    INSERT IGNORE INTO roles(name) VALUES('ROLE_ADMIN');

    Any new user who signs up to the app is assigned the ROLE_USER by default.

Steps to Setup the React Front end app (websiteFrontend)

First go to the websiteFrontend folder -

cd websiteFrontend

Then type the following command to install the dependencies and start the application -

Before you can start the server you need to install some dependencies. You can do this in automatically just by running a few commands.

  • npm install -g create-react-app
  • npm install antd react-router-dom --save
  • npm install react-app-rewired babel-plugin-import react-app-rewire-less --save-dev
  • npm install --save react-autocomplete
  • npm install react-burger-menu --save
  • npm install --save @ant-design/icons
  • npm install react-infinite-scroller --save

Finally, by executing the following commands you can start the server

npm install && npm start

The front-end server will start on port 3000.

online-shop's People

Contributors

goodfancier avatar

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.