Notice: you're looking at a read-only mirror of our Dokuwiki.
This document provides an overview of the dma.space monolith, its responsibilities, and how to contribute to its development.
The monolith is the primary backend application for dma.space's portal. It is a single, unified codebase that provides a wide range of services and functionalities for members and staff. The monolith is written in Go and utilizes the go.uber.org/fx framework for dependency injection, which helps in organizing the different components of the application.
The monolith is designed to be a central hub for all of dma.space's services. For more detailed information, you can refer to the source code and the README.md file in the repository.
The monolith uses uber/fx for dependency injection. This allows each service to be designed in a modular way, where each service grabs only the dependencies it needs. This design promotes loose coupling and allows services to seamlessly interoperate with each other.
For example, the homeassistant service exists independently of other API-related services, but the spaceapi service can optionally depend on it to fetch sensor information from Home Assistant for its JSON output.
To run the monolith, the following external services are required:
The monolith can also integrate with the following optional services:
/spaceapi.json endpoint that exposes an API about the state of the physical space, with Home Assistant integration as needed.The monolith is in charge of the following services:
The monolith runs a background job worker that is responsible for executing various automated tasks. These jobs are managed using a PostgreSQL-based job queue. Some of the key jobs include:
The following is a list of all the top-level pages available in the monolith.
/: Renders the home page. This is currently a placeholder and will eventually be in charge of rendering the entire dma.space frontpage so that no JavaScript is needed for rendering important information, such as calendar, event agenda, etc./login: Begins the authentication process./logout: Logs the user out./portal: Renders the portal dashboard, which contains links to all member-only pages./spaceapi.json: Returns the SpaceAPI JSON.We welcome contributions to the monolith! Here’s how you can get started:
The monolith codebase is located in this repository. The main application entry point is at cmd/dma-monolith/main.go, and the various services are organized under the services/ directory.
README.md file to set up your local development environment. This includes installing the necessary tools like Go, Nix, and Docker.If you have any questions or need help with the monolith, please reach out to @diamond.