Git Product home page Git Product logo

spring-boot-ecommerce's Introduction

Simple eCommerce Application with SpringBoot and React

This example app shows a simple eCommerce Application with Spring Boot API and CRUD (create, read, update, and delete) its data with a React app.

Tools: For this project it was necessary to use tools such as those shown below.

  • Language: Java
  • Framework backend: SpringBoot with Maven
  • Framework frontend: React with Semantic UI

Objective: Make an application for a product catalog with the front end separated from the backend applying micro service patterns.

Prerequisites: Java 8, Node.js 8+ and Mysql Server 5.7.

Getting Started

To install this application, run the following commands:

git clone https://github.com/devRobots/spring-boot-ecommerce.git spring-boot-ecommerce
cd spring-boot-ecommerce

This will get a copy of the project installed locally. To configure all of its dependencies and start each app, follow the instructions below.

Configure Database

Once MySQL is installed you must configure a username and password. By default the user and password should be root . If not, you must configure in the file application.configure located in the path src/main/resources/.

In the file application.configure you must edit the parameters spring.datasource.username and spring.datasource.password with the values you defined.

Create Database & Tables

Now you just need to create the database where the project will store the information. To create it, just follow the steps below.

mysql -u {username} -p

This command will ask for your MySQL password. Once inside the MySQL monitor you can create the database with the following command.

CREATE DATABASE ecommerce;

Now you can run the server which generates the database tables. To run the server, run:

./mvnw spring-boot:run

Create admin user

Before continuing you must create the user admin, in order to perform administrator operations in the application. For this you must create a user on the MySQL monitor with the following command.

USE ecommerce;
INSERT INTO user (username, email, is_admin, password) values ('{admin.username}', '{admin.email}', true, '{admin.password}');

Run Frontend Client

Now you can run the frondent client to use the web application. To run the client, run:

cd ecommerce-frontend
npm start

Links

This example uses the following open source libraries:

License

Apache 2.0, see LICENSE.

spring-boot-ecommerce's People

Contributors

devrobots avatar dependabot[bot] 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.