Skip to main content

Technologies used

In this document, we will look at the differents technologies that makes voca. This will gives you a rough overview of the project, and hopefully an idea of the learning curve.

Infrastructure with Jelastic Virtuozzo

For now, voca uses Jelastic to mount and run. Jelastic offers two kind of APIs:

  • Rest API: to have one action per call, like mounting a volume, stopping an instance, etc.
  • Jelastic Cloud Scripting: YML script to orchestrate more than one action.

Routing with Traefik

We use Traefik to route our primary service voca, and all the different Decidim that he mounts.

Traefik uses two providers: a file provider (yaml), and a http provider.

  • File provider: For traefik dashboard and routing to the voca frontend and admin
  • HTTP Provider: For all the decidim instances. Traefik will ping a voca route every given seconds to check changes in the current state of our infrastructure

Front end with NextJS

The frontend is made with react, using a material design library. It is served by a next server to handle nicely authentication. The components are carefully craft to respect our design system. This frontend will consume a graphql api, served by our backend.

In the frontend, we do (almost) no next magics, it is made of plain react component that represents the state of the API and are designed to have a fluid experience.

Front-end → Backend proxy with NextJS

The react front end uses only next endpoints, who will proxy requests to our backend. Thus, it is possible to hide the backend in a private network.

Graphql API with Strapi

Strapi generates a standard and navigable graphql API from it’s model. To this API, we add several resolvers in order to ask status and manipulate Decidim instances through a secure and private gRPC interface - private as in a private network, not private as closed source ;)

You will find most of our graphql custom resolver in Decidim endpoints: there you can retrieve informations directly from the Decidim Instances (Rails).

The Graphql API offers as well some endpoints to get the status of the infrastructure, in order to know if the instance is running (you can interact with), or stopped.

Queues with Strapi, BullMQ, Redis

Together with our strapi backend, we implement a BullMQ worker that will tackles time consuming tasks, like deploying a decidim instance. These queues are visible in a queue dashboard, where you can look at the different queues states.

We use two queues, installQueue for really big tasks (like deploying a new Decidim Instance), and main for short-lived tasks.

Manipulate Decidim with GRPC

All the Decidim instance powered by voca comes with a decidim module voca. This ruby gem do two things:

  • Exposes a gRPC interface, to retrieve and update settings (like organization smtps)
  • Add a middleware to depends on Redis dynamic configuration over environment variables, to be able to set currency, timezones or languages without restarting the servers.