This document describes guidelines to follow when choosing a tech stack for new frontend service.
Most of the services deployed on PCloud, be it core infrastructure service or a regular application, will need frontend so users can interact with it.
Core PCloud infrastructure consists of number of services responsible for:
All of these services have different complexity and security threat levels. One solution will not be suitable for all of them. Whenever possible, simpler solution must be chosen. Especially services with high security threat must limit their dependencies to the minimum, to make auditing of the service as seamless as possible. Nowdays a lot can be achieved by using server-side rendered pure HTML5 and modern CSS. And that must be the first go-to approach to consider when implementing a new service. For services with traditional GUI (Graphical User Interface) application like behaviour more complex SPA (Single Page Application) solutions can be considered.
Above mentioned services are listed below in increasing order of their rough complexity:
These services can be split into two categories:
Server-side rendered HTML5 and CSS (Pico.css) with little to no Javascript will be sufficient for first category of applications. Authentication and User Management services belong to that category. Application Manager can also be put into the first category. While it may benefit from SPA like behaviour, downsides of extra dependency on NodeJS/NPM like ecosystem and or on any specific web framework outweigh the benefits they bring. Personalized homepage on the other hand must work as an SPA, and it will benefit from adopting expansive set of libraries from NPM ecosystem.
There is always new cool kid/framework (React, Vue, Svelte, ...) everyone is using in JS ecosystem to build frontend applications. On the other hand Lit is very close to the web standards and if needed can be utilised with above mentioned frameworks. We should consider Lit as a way to implement core PCloud components.