A developer oriented, headless ecommerce framework based on Spring + GraphQL + Angular.

Overview

GeekStore

A developer oriented, headless ecommerce framework based on Spring + GraphQL + Angular.

Headless means GeekStore only focus on the backend, it does not care which frontend stack you use. GeekStore is built for developers, it only exposes a group of ecommerce admin&shop APIs(in GraphQL), by calling these APIs, developers can query data(such as query product data), or mutate data(such as add item with id '123' to the current order). So, if you want to develop ecommerce application based on GeekStore, you just need to implement the shopping frontend based on your specific business needs. For example, you can leverage Angular/React/Vue, whatever frontend stack you like to build your shopping UI. There is no need to re-build the backend, since GeekStore is an ecommerce backend without a 'head'.

GeekStore is licensed with MIT license, you can change/extend as you need.

Note, GeekStore is only for POC & learning purpose now..

Features

  • Products & Variants
  • Stock management
  • Product facets & faceted search
  • Product categories / collections
  • Product Search
  • Payment provider integrations
  • Shipping provider integrations
  • Discounts and promotions
  • Multiple administrators with fine-grained permissions
  • Built-in admin interface(Angular based)
  • Guest checkouts
  • Multiple Authentication Methods

Tech Stack

  1. Backend framework:Spring Boot 2.x
  2. Frontend(Admin interface) framework:Angular 10.x
  3. GraphQL framework:graphql-java-kickstart
  4. Persistence layer framework:Mybatis-Plus
  5. Async Task:Guava EventBus
  6. Security framework:customized,centralized token validation + AOP
  7. DB:H2(local test) & MySQL(prod)

How To Run

1. How To Run Test

Run unit + component tests via maven:

mvn clean test

527 test cases have been written, cover most framework & biz logic, all test cases pass when run locally. Use embedded H2 DB by default in local test mode.

[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.42 s - in io.geekstore.e2e.StockControlTest
[INFO] Running io.geekstore.common.utils.TimeSpanUtilTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 s - in io.geekstore.common.utils.TimeSpanUtilTest
[INFO] Running io.geekstore.data_import.ImportParserTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 s - in io.geekstore.data_import.ImportParserTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 527, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:22 min
[INFO] Finished at: 2021-01-11T18:08:32+08:00
[INFO] ------------------------------------------------------------------------

2. How To Run The Application

Run app via maven:

mvn spring-boot:run

Or run it in Intellij IDE, the main driver class is GeekStoreApplication. It will use embedded H2 DB by default.

Then you can play the Store Admin & Shop API via the GraphQL Playground

http://127.0.0.1:8080/playground

Or you can access the GraphQL endpoint via Postman(latest version supporting GraphQL)

http://127.0.0.1:8080/graphql

To access GraphQL Voyager for interactive graph:

http://localhost:8080/voyager

TODO List

  • Replace graphql-java-kickstart with Netflix DGS framework
  • Support admin interface(based on Angular)
  • Support shopping Web App(based on Angular) for store frontend showcase
  • Support MySQL, now only H2 tested
  • Enhance image processing
  • Docker deployment
  • Docs for developer
  • Performance test scripts and tests
  • MicroService version + GraphQL Federation
  • ElasticSearch for product search, now only support simple DB search(use like)
  • Cloud based image storage/processing, now only stores images locally with very simple processing
  • Payment provider integrations(like paypal/alipay etc), now only support mock provider
  • Shipping provider integrations, now only support mock provider

Source Code Directory

Java Source

├── java
│   └── io
│       └── geekstore
│           ├── GeekStoreApplication.java # Spring Boot main entry
│           ├── common # Common classes
│           ├── config # Spring Configuration Beans
│           ├── custom # Security/GraphQL/Mybatis customization
│           ├── data_import # Product data import
│           ├── email # Email handling
│           ├── entity # Entity beans
│           ├── eventbus # Asyn event handling
│           ├── exception # Exception classes
│           ├── mapper # MyBatis-Plus Mapper
│           ├── options # App configs
│           ├── resolver # GraphQL API resolvers(a litter like controllers)
│           ├── service # Service layer(biz logic)
│           └── types # Java types(or DTOs) mapping to GraphQL schemas

Resources source

└── resources
    ├── application-mysql.yml # Spring configuration file to support MySQL
    ├── application.yml # Default spring configration file,support h2 db by default
    ├── banner.txt # banner
    ├── db
    │   ├── h2 # H2 db schema
    │   └── mysql # MySql db schema
    ├── graphql
    │   ├── admin-api # Admin side GraphQL API schemas
    │   ├── common # Common type schemas
    │   ├── shop-api # Shop side GraphQL API schemas
    │   └── type # Admin&Shop type schemas
    └── templates
        └── email # email templates

Java Source for Test:

├── java
│   └── io
│       └── geekstore
│           ├── ApiClient.java # GraphQL API client for test, has switch to support admin or shop mode.
│           ├── ApiException.java # API call exception
│           ├── GeekShopGraphQLTest.java # Annotation for GraphQL test(base on SpringBootTest)
│           ├── MockDataService.java # A service for creating mock data via the GraphQL API
│           ├── PopulateOptions.java # Configuration options used to initialize a test server environment
│           ├── common # Tests for common classes
│           ├── config # Spring Configuration Beans for test
│           ├── data_import # Tests for product importing function
│           ├── e2e # Tests for GraphQL resolvers,mosts tests for GeekStore reside in this directory!
│           ├── event # Event handler for test
│           ├── service # A few tests for helpers in service layer
│           └── utils # A few test helpers

Resources Source for Test:

.
├── application.yml # Spring configuration file for test
├── fixtures # Product mock data for test
├── graphql # GraphQL files(query/mutation/fragments) for test,used by tests in e2e folder.
└── test_fixtures # A few mock data for testing prodct importing function

Attribution

The project is a partial clone of the vendure headless ecommerce framework. The original project is based on TypeScript/Nestjs/Angular tech stack. Thanks to the author 🙏

Copyright

Copyright © 2021-present GeekStore. All rights reserved.

You might also like...

A platform that links service providers with clients using Angular & Springboot

A platform that links service providers with clients using Angular & Springboot

Bricoly : Engineer Your Life The Way It Should Be... 📘 Description This project's aims to connect people who are able to grant services with clients

May 28, 2022

:herb: 基于springboot的快速学习示例,整合自己遇到的开源框架,如:rabbitmq(延迟队列)、Kafka、jpa、redies、oauth2、swagger、jsp、docker、spring-batch、异常处理、日志输出、多模块开发、多环境打包、缓存cache、爬虫、jwt、GraphQL、dubbo、zookeeper和Async等等:pushpin:

:herb: 基于springboot的快速学习示例,整合自己遇到的开源框架,如:rabbitmq(延迟队列)、Kafka、jpa、redies、oauth2、swagger、jsp、docker、spring-batch、异常处理、日志输出、多模块开发、多环境打包、缓存cache、爬虫、jwt、GraphQL、dubbo、zookeeper和Async等等:pushpin:

欢迎大家留言和PR~ Tip: 技术更新换代太快,本仓库仅做参考,自己的项目具体使用哪个版本还需谨慎思考~(不推荐使用最新的版本,推荐使用(最新-1|2)的版本,会比较稳定) spring-boot-quick 前言   自己很早就想搞一个总的仓库就是将自己平时遇到的和学习到的东西整合在一起,方便后

Jan 2, 2023

This project contains a full example of an application developed using Spring Boot and GraphQL within the Java.

Spring boot GraphQL Example This project contains a full example of an application developed using GraphQL within the Java. The project includes a com

Jul 20, 2022

Spring for GraphQL demo project with a Vue frontend.

Spring Books - Hello GraphQL This is a demo project that will introduce you to [https://spring.io/projects/spring-graphql](Spring for GraphQL). The Sp

Dec 2, 2022

Repo to support the Ecommerce workshop(s).

Repo to support the Ecommerce workshop(s).

🔥 Building an E-commerce Website 🔥 Materials for the Session It doesn't matter if you join our workshop live or you prefer to do at your own pace, w

Dec 17, 2022

The main goal of the project is to reproduce a Database for a Ecommerce Web Application;

The main goal of the project is to reproduce a Database for a Ecommerce Web Application;

Web-Ecommerce Springboot Web Application The main goal of the project is to reproduce a Database for a Ecommerce Web Application; We have a Category-P

Feb 2, 2022

Construction System is a Ecommerce Full stack web development project.

Construction-system- Construction System is a Ecommerce Full stack web development project. Construction System is a project to ensure that there is a

Oct 17, 2021

Ecommerce Application Tutorial (Source) - Mian Speaks

aExpress Ecommerce Application Tutorial (Source) - Mian Speaks How to setup Admin Panel Step 1: Download Source Code https://github.com/mianasadali1/a

Dec 17, 2022

Flights metasearch engine simulation using Java, GraphQL and React.js, developed for COMP30220 Distributed Systems.

Flights metasearch engine simulation using Java, GraphQL and React.js, developed for COMP30220 Distributed Systems.

Distributed Airways For the full project report, see ./report.pdf. A demonstration video is available here. Requirements Docker JDK 8 and Apache Maven

Dec 29, 2022
Owner
波波微课
跟波波学编程和架构
波波微课
A modular, high performance, headless e-commerce(ecommerce) platform built with Java,Springboot, Vue.

What is Shopfly? Shopfly is modular, high performance, headless e-commerce(ecommerce) platform built with Java,Springboot, Vue. Architecture Shopfly i

Shopfly 31 Jul 17, 2022
A modular, high performance, headless e-commerce(ecommerce) platform built with Java,Springboot, Vue.

What is Shopfly? Shopfly is modular, high performance, headless e-commerce(ecommerce) platform built with Java,Springboot, Vue. Architecture Shopfly i

Shopfly 29 Apr 25, 2022
Application for creating blog posts, developed with Java using Spring Framework for backend and Angular along with PrimeNG Library for frontend development.

Application for creating blog posts, developed with Java using Spring Framework for backend and Angular along with PrimeNG Library for frontend development.

Áureo Carmelino 10 Nov 27, 2022
A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway, resillience4j, Kafka, Redis and MySQL.

High-availability-shopping-system A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway,

LeiH 1 Oct 26, 2022
🖥 CRUD Angular + Spring demonstrating Has-Many relationship, including tests for the back-end and front-end

REST API with Spring Boot and Angular CRUD Angular + Spring demonstrating Has-Many relationship, with tests. ?? Tecnologies Java 17 Spring Boot 3 JPA

Loiane Groner 53 Dec 28, 2022
An example of how to working with paging in Spring for GraphQL / Spring Data JPA

Spring for GraphQL Paging This repo contains the code for a live coding session I did on: Spring Data JPA GraphQL Paging & Sorting The reason I put th

Dan Vega 10 Nov 28, 2022
Spring Boot ECommerce Demo

springboot-ecommerce2 Things todo list Clone this repository: git clone https://github.com/hendisantika/springboot-ecommerce2.git Navigate to the fold

Hendi Santika 5 Aug 30, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
Manages server status and gives log of status information. front end - angular js, backend- sbring boot, DB-MySQL

ServerManagerApplication / | | / | | ( ___ _ __ __ __ ___ _ __ | \ / | __ _ _ __ __ _ __ _ ___ _ __ __ \ / _ \ | '| \ \ / / / _ \ | '| | |/| | / | | '

null 1 Jan 6, 2022
Angular Final Assignment - Keep Note frontend

Angular Final Assignment - Keep Note frontend Objective The Objective of this level of Keep is to cover the following areas : Components Design Compon

Baskaran Murugesan 1 Jan 29, 2022