Home - mostafa-hashhash/ecommerce GitHub Wiki

Welcome to the e-commerce wiki!

Using Containerization ( Docker )

We have our express backend server should run as a standalone service and the same for the frontend server. So I decided to build a docker image for each and with docker-compose, I can spin up both of them with one command.

Multi-stage Docker File

Due to the big image size, I decided to split the docker file into multiple stages. The idea behind the multi-stage docker file is nothing but ignoring the development dependencies and the build tools in the second stage. So we just copy the binary assets from the first stage to the second stage with the minimal required based image.

should we have one Repo containing all the services? ( e.g server, web client, mobile app)

Actually, we don't, as we may follow the service-oriented architecture and we may separate the authentication service or any other service out of the monolithic server. So we can use multiple repositories.

Everything is Separated module

  • module for the input which will be the database records ( frontend post requests / CSV reader / ... )
  • module for storing and retrieving from the database ( connections and basic CRUD operations )
  • module for sending the data to the clients ( the API end points )