Coder Social home page Coder Social logo

e-commerce-federation's Introduction

e-commerce-federation

GraphQL Microservice Architecture implementation for basic e-commerce store using Apollo Federation. This project is just meant to serve as a PoC ( Proof of Concept ).

Note

You cannot use the buyProduct mutation without having a frontend, which has integrated stripe, as it involves payment intent creation. And required Frontend app is not included in this repo!

Rover Configuration

Install Rover CLI

npm i -g @apollo/rover

Follow these two steps: #1 and #2

Reference

Rover CLI

Rover CLI for Subgraph

Setup

Clone the project from Github.

Run following command in every service directory, namely "auth", "cart", "rest-api".

rover subgraph publish ${Graph id}@${variant} --schema "./src/${service name}-schema.graphql" --name ${service name} --routing-url "http://localhost:${service port}/graphql"

Install Dev dependencies in the root directory of project by running:

npm i -D

Install the dependencies of all the components by running:

npm run load-dependencies

Install and login into Stripe CLI by following this guide.

To start listening for webhook on localhost run following command:

stripe listen --forward-to http://localhost:${Router Port}/rest/api/v1/webhook/stripe

Run following command in every component's directory, namely "router", "auth", "cart", "rest-api".

npm run copy-env

Fill up the created .env files in all the components with appropriate values.

Migrate back to root directory of the project, and run:

npm run dev

e-commerce-federation's People

Contributors

preetamsing avatar preetamsolulab avatar

Watchers

 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.