Giter VIP home page Giter VIP logo

e-commerce-app's Introduction

E-Commerce Application

** e-commerce sample application using powered by Spring, Angular 4, MongoDB, Redis and more._**

This sample e-commerce application demonstrates how to build an application using microservices architecture paradigm with Polyglot Languages (Java, JavaScript) & Polyglot Persistance software (MongoDB, Redis). This sample application includes following functional microservices & infrastructure microservices. All of these microservices are independently deployable applications and are organized around business capabilities.

###Functional Microservices

  • Product Catalog Microservice
  • Cart Microservice

The application is setup as multi-level gradle project where each microservice is arranged as a sub-module under single parent project. It enables to run each microservice individually.

##Prerequisites

##Installation

Clone Repository

Clone respository source code by executing following instruction to any folder on your machine,

git clone https://github.com/damit619/e-commerce-app.git
cd e-commerce-app

###Building Application

Building Microservices

Gradle has been used as a build tool to build Spring Boot based Microservices applications. Issue following command on your terminal/console window,

gradlew clean build

cd product-catalog-service
gradlew bootRun

cd cart-service
gradlew bootRun

This command might take a while for first time as it needs to download serveral dependency libraries from Maven repository. This command will build & package all microservice applications.

Building Frontend App (Angular 4)

Frontend application is a Single Page Appliction built using Angular 4. The source code of this application is available under, 'ecomm-webapp' folder. Issue following commands in sequence to build & run frontend app,

cd ecomm-webapp
npm install
ng serve

Note: 'npm install' command may take a while, as it needs to download all dependent npm modules used by frontend app.

Once above instructions successfully executed, you can view e-commerce application by browsing below URL, http://localhost:4200

##Prodcut Catalog Microservice

Overview

Product Catalog Microservice manages e-commerce application's products. This microservice is built as Spring Boot application with MongoDB as persistance store for product information.

REST API

Product Catalog REST API supports following opertations,

Method URI Description Parameters Request JSON Response JSON
GET product-api/api/v1/products/recomendations List of recommended products None
GET product-api/api/v1/products/{id} Fetch product information based on id None
PUT product-api/api/v1/products Adds new product
POST product-api/api/v1/products/{id} Updates existing product

##Cart Microservice

Overview

Cart Microservice provides e-commerce application's shopping cart functionality. This microservice is built as Spring Boot application with Redis as InMemory persistance store for cart information.

REST API

Cart REST API supports following opertations,

Method URI Description Parameters Request JSON Response JSON
GET cart-api/api/v1/cart/{id} Fetches cart by id None
POST cart-api/api/v1/cart/{id} Creates or updates cart

e-commerce-app's People

Contributors

adblinfo avatar damit619 avatar

Watchers

James Cloos avatar Per-Erik Eriksson avatar  avatar  avatar Håkan Lidén avatar MR. Jorawar Singh avatar  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.