Giter Site home page Giter Site logo

sthapa123 / ecom-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rishijatania/ecom-app

0.0 1.0 0.0 947 KB

A modern e-commerce platform that has with assumption many sets of microservices. For this exercise, you are going to focus on the order microservice using Spring Boot, Kafka, Postgres.

Java 99.48% Dockerfile 0.35% Shell 0.18%

ecom-app's Introduction

Ecom-App

Problem Statement

A modern ecommerce platform that has many sets of microservices: customer, order, product, inventory, payment, shipping/delivery etc. For this exercise, you are going to focus on the order microservice using Spring Boot. Please read the Ecom-Order-Processing-Service.pdf for details.

Requirements

  1. Use Java8 (or higher version of Java), or Kotlin for the programming language.
  2. Spring Boot, Spring Data JPA, and other Spring modules for the microservices.
  3. Design new schema keeping PostgreSQL in the mind.
  4. For the RESTful API, use Swagger to document your endpoints. Use appropriate HTTP verbs and status codes. Assume no AuthN or AuthZ is required for the API.
  5. Implement unit and/or integration tests.
  6. Containerize your services using Docker. Use docker-compose if required.
  7. If you are thinking about async communication patterns, use Apache Kafka.
  8. See, if you can follow few of the 12 Factor App Principles (https://12factor.net).

Infrastructure:

The project is deployed using Docker-compose and has the following Services:

Components:

- Order-Service:
	-  Microservice based on Spring Boot.
- Database:
	-  PostgreSQL database
- Kafa:
	-  Stream-processing software platform
- Zookeeper:
	-  Centralized service for maintaining configuration information and Kafka Cluster
- KafkaDrop:
	-  A web UI for viewing Kafka topics and browsing consumer groups.

PreReq tools that you need

  1. Docker Desktop
  2. git
  3. IDE

Assumptions

  1. Order service is being called by a valid user having a valid user ID.
  2. The User session is maintained and validated using Using OIDC by an agregator service or an API Gateway.
  3. We are assuming there are separate services for catalogue (which will handle crud operations relevant to objects such as items dealers, warehouse), Payment service (which will maintain trasanction related intricate details and card information), Shipping Services.
  4. In-place of these services we are calling json stubs for fetching neceessary data.

Steps to run the project Using Docker-compose

To run all services use the following command.

docker-compose up -d

You can run services individually by running the following command with the service name

docker-compose up -d <service-name>

Steps to run to on IDE

  1. Pre-req: To run order-service using IDE, you need to first configure PostgreSQL and Kafka locally or run these services individually using dockeer-compose command mentioned above.
  2. Insall IDE (preferrably Eclipse)
  3. Clone the repository using http or ssh
  4. Open the spring project in the IDE
  5. Run project as "Spring Boot App"

To test the api service locally

URLS

  1. Order-service
  2. Swagger
  3. KafkaDrop

Steps to run unit test cases

  1. Run the project as JUnit test cases by right click and run as "JUnit test cases"
  2. By command line use mvn test

ecom-app's People

Contributors

rishijatania avatar dependabot[bot] avatar

Watchers

James Cloos 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.