Version
Google Translate

Microservice Solution: The Structure

You must have an VCP Business or a higher license to be able to create a microservice solution.

This document explains the solution and folder structure of VCP Studio's microservice solution template.

This document assumes that you've created a new microservice solution by following the Quick Start: Creating a Microservice Solution with VCP Studio guide.

Understanding the VCP Solution Structure

When you create a new microservice solution, you will see a tree structure similar to the one below in the Solution Explorer panel:

microservice-solution-in-explorer

Each leaf item (e.g. Acme.CloudCrm.IdentityService, Acme.CloudCrm.Web, Acme.CloudCrm.WebGateway...) in the tree above is an VCP Studio module. An VCP Studio module can be a web application, an API gateway, a microservice, a console application or whatever .NET allows you to build. They are grouped into folders (apps, gateways and services) in that solution.

Each VCP Studio module has a separate .NET solution; this allows your team to develop them individually, in keeping with the nature of the microservices architecture.

Refer to the Concepts document for a full definition of VCP Studio solution, module and package terms.

Exploring the Folder Structure

You can right-click the root item in the solution explorer (Acme.CloudCrm for this example) and select the Open with -> Explorer command to open the folder containing the solution in your file system:

open-solution-with-explorer

The root folder of the solution will be similar to the following:

solution-folders

The folder structure basically matches to the solution in VCP Studio's Solution Explorer:

  • .vcpstudio folder contains your personal preferences for this solution and it is not added to your source control system (Git ignored). It is created and used by VCP Studio.
  • app folder contains the applications that has a UI and typically used by the end users of your system.
  • etc folder contains some additional files for the solution. It has the following sub-folders:
    • vcp-studio folder contains settings that are managed by VCP Studio. This folder is added to your source control system and shared between developers.
    • docker folder contains docker-compose configuration to easily run infrastructure dependencies (e.g. RabbitMQ, Redis) of the solution on your local computer.
    • helm folder contains all the Helm charts and related scripts to deploy the solution to Kubernetes.
    • k8s folder contains some additional files to setup Kubernetes Dashboard on your local machine.
  • gateways folder contains one or more API Gateways (the count depends on if you've selected mobile application or other applications if available). This solution implements the BFF (Backend for frontend pattern), that means it has a dedicated API Gateway for each different UI application.
  • services folder contains the microservices. The microservice count varies based on the options you've selected during the solution creation. However, the following microservices are always included:
    • administration microservice is used to manage permissions, languages and other fundamental settings of the system.
    • identity microservice is used to manage users, roles and their permissions. It basically serves to the Identity module's UI (and OpenIddict module's UI, if selected).

In this document