All Projects → yugabyte → yugastore-java

yugabyte / yugastore-java

Licence: Apache-2.0 license
An implementation of a sample E-Commerce app. This online retail marketplace app uses Spring Boot (Java), React and YugabyteDB.

Programming Languages

java
68154 projects - #9 most used programming language
CSS
56736 projects
python
139335 projects - #7 most used programming language
shell
77523 projects
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to yugastore-java

golden-bag-backend
上海容大实习的考核项目,基于 SpringBoot 开发的员工的季度绩效考核系统
Stars: ✭ 14 (-86.67%)
Mutual labels:  spring-data-jpa
Spring
Personal notes of preparation to Spring 5 Professional Certification
Stars: ✭ 35 (-66.67%)
Mutual labels:  spring-data-jpa
react-hooks-library
A collection of hooks and utilities for modern React
Stars: ✭ 236 (+124.76%)
Mutual labels:  demos
awesome-threejs
搜集并学习threejs的相关知识总结、Demo、站点、书籍等。
Stars: ✭ 96 (-8.57%)
Mutual labels:  demos
vogon-java
Vogon - A simple personal finance tracker using Spring Boot and AngularJS
Stars: ✭ 16 (-84.76%)
Mutual labels:  spring-data-jpa
uwp-demos
This repository contains the samples for Syncfusion Universal Windows Platform UI Controls and File Format libraries and the guide to use them.
Stars: ✭ 20 (-80.95%)
Mutual labels:  demos
spring-boot-cities-service
A Spring Boot + Spring Data + Spring Cloud Connectors demo app
Stars: ✭ 13 (-87.62%)
Mutual labels:  spring-data-jpa
kotlin-postgres
A Simple CRUD API using Spring Boot Application using PostgreSQL Database
Stars: ✭ 20 (-80.95%)
Mutual labels:  spring-data-jpa
spring-discord-bot
Discord all-purpose bot, made using Spring Boot, JPA, Hibernate, REST, HikariCP. Written for fun, do not take this serious.
Stars: ✭ 26 (-75.24%)
Mutual labels:  spring-data-jpa
javascript
Basic Primitives Diagrams for JavaScript - data visualization components library that implements organizational chart and multi-parent dependency diagrams, contains implementations of JavaScript Controls and PDF rendering plugins.
Stars: ✭ 46 (-56.19%)
Mutual labels:  demos
Library
Online Library Management. User can search, check in, checkout book. System adds fines automatically if the book is not checked in by due date
Stars: ✭ 27 (-74.29%)
Mutual labels:  spring-data-jpa
Spring-Boot-2
Spring Boot 2.x examples
Stars: ✭ 33 (-68.57%)
Mutual labels:  spring-data-jpa
API
API for SQLMatches.
Stars: ✭ 48 (-54.29%)
Mutual labels:  demos
spring-boot-blueprint
Spring Boot blueprint with Keycloak and Vue.js
Stars: ✭ 36 (-65.71%)
Mutual labels:  spring-data-jpa
hibernate-springcache
Hibernate cache implementation that backs to the Spring Cache abstraction
Stars: ✭ 19 (-81.9%)
Mutual labels:  spring-data-jpa
seamonster
Solutions engineering assets for demonstration
Stars: ✭ 19 (-81.9%)
Mutual labels:  demos
spring-boot-shop-sample
My first web application using Spring Boot framework.
Stars: ✭ 66 (-37.14%)
Mutual labels:  spring-data-jpa
demos
ebidel.github.io/demos/
Stars: ✭ 140 (+33.33%)
Mutual labels:  demos
study
✏️ What I Studied
Stars: ✭ 14 (-86.67%)
Mutual labels:  spring-data-jpa
zig-gamedev
Building game development ecosystem for @ziglang!
Stars: ✭ 1,059 (+908.57%)
Mutual labels:  demos

Yugastore in Java

Homepage This is an implementation of a sample ecommerce app. This microservices-based retail marketplace or eCommerce app is composed of microservices written in Spring (Java), a UI based on React and YugabyteDB as the distributed SQL database.

If you're using this demo app, please this repository! We appreciate your support.

Trying it out

This repo contains all the instructions you need to run the app on your laptop.

You can also try the app out online, it is hosted on Pivotal Web Services.

Versions

  • Java 17
  • Spring Boot 2.6.3
  • Spring Cloud 2021.0.0
  • Yugabyte Java Driver 4.6.0-yb-10
  • Python 3 (Data Loading)

Features

  • Written fully in Spring Framework
  • Desgined for multi-region and Kubernetes-native deployments
  • Features 6 Spring Boot microservices
  • Uses a discovery service that the microservices register with
  • Sample data has over 6K products in the store

Architecture

The architecture diagram of Yugastore is shown below.

Architecture of microservices based retail marketplace app

Microservice YugabyteDB API Default host:port Description
service discovery - localhost:8761 Uses Eureka for localhost. All microservices register with the Eureka service. This registration information is used to discover dynamic properties of any microservice. Examples of discovery include finding the hostnames or ip addresses, the load balancer and the port on which the microservice is currently running.
react-ui - localhost:8080 A react-based UI for the eCommerce online marketplace app.
api-gateway - localhost:8081 This microservice handles all the external API requests. The UI only communicates with this microservice.
products YCQL localhost:8082 This microservice contains the entire product catalog. It can list products by categories, return the most popular products as measured by sales rank, etc.
cart YSQL localhost:8083 This microservice deals with users adding items to the shopping cart. It has to be necessarily highly available, low latency and often multi-region.
checkout YCQL localhost:8086 This deals with the checkout process and the placed order. It also manages the inventory of all the products because it needs to ensure the product the user is about to order is still in stock.
login YSQL localhost:8085 Handles login and authentication of the users. Note that this is still a work in progress.

Build and run

To build, simply run the following from the base directory:

$ mvn -DskipTests package

To run the app on host machine, you need to first install YugabyteDB, create the necessary tables, start each of the microservices and finally the React UI.

Running the app on host

Make sure you have built the app as described above. Now do the following steps.

Step 1: Install and initialize YugabyteDB

You can install YugabyteDB by following these instructions.

Now create the necessary tables as shown below. Note that these steps would take a few seconds.

$ cd resources
$ cqlsh -f schema.cql

Next, load some sample data.

$ cd resources
$ ./dataload.sh

Create the postgres tables in resources/schema.sql for the YSQL tables.

Step 2: Start the Eureka service discovery (local)

You can do this as follows:

$ cd eureka-server-local/
$ mvn spring-boot:run

Verify this is running by browsing to the Spring Eureka Service Discovery dashboard.

Step 2: Start the api gateway microservice

To run the products microservice, do the following in a separate shell:

$ cd api-gateway-microservice/
$ mvn spring-boot:run

Step 3: Start the products microservice

To run the products microservice, do the following in a separate shell:

$ cd products-microservice/
$ mvn spring-boot:run

Step 4: Start the checkout microservice

To run the products microservice, do the following in a separate shell:

$ cd checkout-microservice/
$ mvn spring-boot:run

Step 5: Start the checkout microservice

To run the cart microservice, do the following in a separate shell:

$ cd cart-microservice/
$ mvn spring-boot:run

Step 6: Start the UI

To do this, simply run npm start from the frontend directory in a separate shell:

$ cd react-ui
$ mvn spring-boot:run

Now browse to the marketplace app at http://localhost:8080/.

Running the app in docker containers

The dockers images are built along with the binaries when mvn -DskipTests package was run. To run the docker containers, run the following script, after you have Installed and initialized YugabyteDB:

$ ./docker-run.sh

Check all the services are registered on the eureka-server. Once all services are registered, you can browse the marketplace app at http://localhost:8080/.

Screenshots

Home

Home Page

Product Category Page

Product Category

Product Detail Page

Product Page

Car

Cart

Checkout

Checkout

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].