# Spurtcommerce Microservices Deployment

This article provides detailed instructions on how to setup Spurtcommerce Ecommerce Microservices solution along with Backend APIs and all associated frontend panels, including the Store Panel, Vendor Panel, and Admin Panel.

### Infrastructure pre-requisites

Before diving into the installation process, ensure that your local or server environment meets the necessary infrastructure prerequisites as detailed in this  [<mark style="color:blue;">Link</mark>](https://www.spurtcommerce.dev/getting-started/prerequisites/set-up-development-environment)&#x20;

**Note:** You can choose to ignore "React Installation" step if you have purchased Angular store.

### **Frontend Setup**

Please follow steps and guidelines detailed in the below links to setup Angular storefront, Vendor Panel & Admin Panel.

**Angular Store:** [<mark style="color:blue;">Steps to deploy Angular storefront</mark>](https://www.spurtcommerce.dev/getting-started/development-and-setup/store-front-setup/angular-store-front)

**Angular Admin:** [<mark style="color:blue;">Steps to deploy Admin Panel</mark>](< https://www.spurtcommerce.dev/getting-started/development-and-setup/angular-admin-setup>)

**Angular vendor:** [Steps to deploy Vendor Panel](https://www.spurtcommerce.dev/getting-started/development-and-setup/angular-vendor-setup)&#x20;

### Backend Setup

1. Setup RabbitMQ:

* Ensure latest version of RabbitMQ is installed, running, and accessible.&#x20;
* Necessary exchanges, queues, and bindings etc required for the services will be handled by backend application logic during runtime..

2. Extract the zip file of the backend source-code that you purchased and you should see the below folder structure.

<figure><img src="/files/WLEcUMkwXl8rZJN3fhsa" alt=""><figcaption></figcaption></figure>

3. Navigate to each service directory (including /api-gateway folder) and perform the following:

&#x20; 3.1 Install the required dependencies using the following command.&#x20;

```
npm install
```

Above step shall install gRPC modules along with other relvant/applicable node modules as well.

&#x20;3.2 Import the corresponding SQL database for each service.&#x20;

&#x20;3.3 Configure a .env file of each service with the necessary environment variables and this includes:

* Database credentials (host, port, username, password, database name)
* RabbitMQ URL (protocol, host, port, username, password)
* gRPC URL (host, port)
* API Gateway settings (host, port, routes)

**Note:** If all services are on the same machine, ensure the gRPC URLs and API Gateway settings in the .env files are set to localhost (i.e retain the default config provided by Spurtcommerce team initially) whereas if you prefer to deploy services on different machines, then update the corresponding .env file with the correct IP addresses or domain names for gRPC and API Gateway and ensure network security groups and firewall rules allow communication between services.

3.4 Start the service using the following command.

```
npm start serve
```

After all the above steps are executed, check if the api-gateway is up by running <http://localhost:8000>

<figure><img src="/files/4KFT6DMrX46YONgzwCpJ" alt="" width="563"><figcaption></figcaption></figure>

Specific configuration:

"Chat" module related configuration should be done in "Customer Service" .env file. Please check the chat server setup guidelines here[ <mark style="color:blue;">Link</mark>](https://www.spurtcommerce.dev/v/addons/vendor-and-customer-support-addon/admin-and-vendor-chat-addon)&#x20;

Above steps concludes successful installation and setup of Spurtcommerce Microservices based Marketplace solution and "Your Own Marketplace" will be ready-to-use.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spurtcommerce.com/how-to-guides/spurtcommerce-microservices-deployment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
