Architecture Overview
The following picture depicts a high level architecture overview of the components that make up the HOLI runtime.
loading...To edit this diagram, import the source file in draw.io, edit and export as xml again.
Frontends
- Mobile: the mobile application is based on React Native and contains HOLI clients for both Android and iOS.
- Web (SPA) & Web (SSR): the web version of HOLI is based on Next.JS / React
- Both mobile and web use a high degree of code sharing by leveraging react-native-web which allows React components to be written using the React Native way (i.e. using its library) but also to be run on Web. The rough idea is that every screen and business logic is written in a cross-platform way that will run on both web and mobile. Only platform-specific stuff (e.g. Navigation) has to be written in a platform-specific way. Both mobile and web applications live in the holi-frontends monorepo.
Identity and Access Proxy (Ory Oathkeeper)
HOLI uses Ory Cloud as an identity provider. Oathkeeper is an API gateway (aka reverse proxy) that can enforce authentication and optionally authorization for backend services. See Authentication & Authorization for more details. The deployment and configuration code is contained in the holi-unified-api repository (also see below).
Unified API (GraphQL Mesh)
holi-unified-api is (another) API gateway that provides HOLIs GraphQL API towards frontend and internal clients. The GraphQL API itself is a federated API that stitches together multiple (GraphQL / REST / ...) APIs to offer a single well-defined and -typed entrypoint.
Social Core (okuna)
holi-okuna is a fork of the social network called "Okuna" (earlier: "Openbook") which started as a Facebook clone/competitor. Okunas development has recently been discontinued but its sources still provide the HOLI project with a good starting point to develop its "social features" upon. Examples: user profiles, connections, posts.
Chat
Matrix Chat Server (Synapse)
holi-chat-server contains the Synapse homeserver provided by Matrix, a decentralised and real-time communication server. It uses the same Postgres instance that we are using for Okuna. The users are created using a unique identity created during the account creation and stored in Ory (owner of the identities) and Okuna (to be able to synchronize the data between the chat users and their profiles stored in Okuna), see Registration & Login and Integrations for details.
Matrix Push Gateway (Sygnal)
Also to be found in holi-chat-server is Sygnal, the reference implementation of the Matrix Push Gateway API. The Matrix homeserver forwards message events to the push gateway which will then take care of the delivery to Apple Push Notification Server (APNs, iOS) and Firebase Cloud Messaging (FCM, Android). Push Notifications are directly delivered to the device, and either directly displayed (app closed) or passed through to the app via expo-notifications.
App Integrations
HOLI is planning to integrate a larger number of third party services in the future. The expectation is that each of those integrations will have zero, one or more backend services within HOLIs runtime architecture itself. Current integrations are:
Donations
holi-app-donations contains the backend for the integration of Betterplace.org. The frontend is part of the holi-frontends monorepo.
GoodNews
holi-app-goodnews contains the backend for the integration of GoodNews. The frontend is part of the holi-frontends monorepo.
Volunteering
holi-app-volunteering contains the backend for the integration of Voltastics. The frontend is part of the holi-frontends monorepo.
Shared Services
Some services are of such a generic nature that they can be sensibly shared between core and integration services or even frontend applications.
- holi-geo-api provides geo-coordinate resolution and places auto-completion
- shared-image-proxy is an proxy server that allows to transform images from 3rd party sites on-the-fly (e.g. to use sensible image resolutions within the holi mobile/browser app). Currently, it is barely a deployment of imgproxy.
Pub/Sub
HOLIs chosen integration technology is a pub/sub network. Currently this is Google Cloud Pub/Sub. Events are defined in Integration Events. All services may publish and/or consume events.
Postgres / PostGIS
Any service may use Postgres / PostGIS databases for data persistence. Currently, all services share one Google Cloud SQL Postgres instance, but databases are to be separated per service.
OwnCloud / OwnCloud Integration
holi includes a hosted version of OwnCloud as part of the Spaces feature. The runtime is separated into two components:
- holi-ocis (OwnCloud): the original OwnCloud binary, serving the original OwnCloud frontend, accessible via Spaces using the users Browser / Mobile Apps.
- holi-ocis-integration (OwnCloud Integration): integration code that ensures that users, their names and attributes and their rights and roles are in sync between holi (Okuna / Ory) and OwnCloud.
Novu Notifications
We use a EU-hosted variant of Novu to deliver in-app notifications, mobile push notifications and emails to our users.
To forward the required data, our social core (Okuna) subscribes user emails and push tokens to novu as a side effect of handling users and their social interactions. The mobile clients receive push messages via platform-specific providers. All clients connect to novu cloud securely to fetch and acknowledge In-App notifications and allow users to manage their notification preferences.
Translation / LibreTranslate
holi integrates LibreTranslate, an open-source machine translation API, to handle translation tasks within the app.
- holi-translation-api: Manages requests and interactions with the translation service, enabling users to request translations of posts, comments, and other text content.
- holi-libretranslate: Deploys and maintains the self-hosted LibreTranslate service.