Leemons is developed in a modular way, composed of Plugins, so our technology stack is divided into 4 big layers:
1. Presentation layer
The frameworks used to implement this are described below.
Static bundling & serving
- Webpack. We use webpack as a tool for transpiling, packaging and optimising the final files generated for development and production. It also serves as a frontend development server.
2. Application Layer & APIs
It is the layer for processing business logic with persistent data, as well as for orchestration between the different plugins that compose Leemons.
The technologies used in this layer are described below.
Core & API Gateway
- KoaJS. Web framework that allows us to develop the API gateway between plugins, making the most of asynchronous functions and improving error handling.
- Haproxy. Used in deployments, it is a reverse proxy that allows us to map the different ports used by Leemons.
- LetsEncrypt. Used in deployments, it is a free SSL certificate generation service.
3. Data layer
Due to the modularity of Leemons, we understand that different plugins may have different needs for persisting data.
This layer has the flexibility of connectivity to different database engines.
- KnexJS. It allows us to map models, from relational SQL databases, to schemas to work with, thus supporting the most widely used databases: PostgreSQL, MySQL, and SQLite3.
- BookshelfJS. It facilitates work on KnexJS, providing transaction support, relationship loading, polymorphic associations and support for
many-to-manyrelationships on relational databases.
- Mongoose. It allows us to map NoSQL MongoDB database models to support this non-relational database.
- Redis. High-performance in-memory data storage, which we use to cache endpoint responses.
4. Communication layer
To facilitate communication between plugins, Leemons not only provides communication between plugins via APIs, but also provides the possibility to connect via a message queue.
In addition, this gives us the possibility to implement plugins that interconnect users at different points in real time.
For this, we used the following:
- SocketIO. It allows the establishment of a bidirectional channel between the server Application Layer and the client Application Layer or Presentation Layer with a WebSocket connection whenever possible, or alternatively HTTP long-polling.