Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| software:monolith [2025/12/21 05:42] – created diamond | software:monolith [2025/12/31 13:36] (current) – update services diamond | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | # monolith | + | # Monolith |
| + | |||
| + | This document provides an overview of the dma.space | ||
| + | |||
| + | ## What is the Monolith? | ||
| + | |||
| + | The monolith is the primary backend application for dma.space' | ||
| + | |||
| + | ## Architecture | ||
| + | |||
| + | The monolith is designed to be a central hub for all of dma.space' | ||
| + | |||
| + | ### Dependency Injection | ||
| + | |||
| + | The monolith uses [uber/ | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ### Dependencies | ||
| + | |||
| + | To run the monolith, the following external services are required: | ||
| + | |||
| + | - **PostgreSQL**: | ||
| + | - **Authentik**: | ||
| + | |||
| + | The monolith can also integrate with the following optional services: | ||
| + | |||
| + | - **Stripe**: For processing membership dues and other payments. | ||
| + | - **Home Assistant**: | ||
| + | - **Zulip**: For synchronizing profile information. **It is not in charge of user role synchronization; | ||
| + | - **SpaceAPI**: | ||
| + | |||
| + | ### Responsibilities | ||
| + | |||
| + | The monolith is in charge of the following services: | ||
| + | |||
| + | - **Member Portal**: Provides a web interface for members to manage their accounts, memberships, | ||
| + | - **Membership Dues & Billing**: Handles membership payments, billing cycles, and payment processing through Stripe. | ||
| + | - **Member Inviting & Onboarding**: | ||
| + | - **Notification System**: Sends out notifications to members regarding important events, announcements, | ||
| + | - **Authentication**: | ||
| + | - **API**: Exposes a set of APIs for various frontend applications and services to interact with. | ||
| + | - **Home Assistant Integration**: | ||
| + | - **Space API**: Implements the Space API protocol to provide information about the makerspace' | ||
| + | |||
| + | ### Jobs | ||
| + | |||
| + | 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: | ||
| + | |||
| + | - **Syncing Member Billings**: Regularly syncs billing information for all members to ensure that their membership status is up-to-date. | ||
| + | - **Processing Notifications**: | ||
| + | - **Data Synchronization**: | ||
| + | |||
| + | ### HTTP Routes | ||
| + | |||
| + | 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, | ||
| + | - `/login`: Begins the authentication process. | ||
| + | - `/logout`: Logs the user out. | ||
| + | - `/portal`: Renders the portal dashboard, which contains links to all member-only pages. | ||
| + | - `/ | ||
| + | |||
| + | ## Contributing | ||
| + | |||
| + | We welcome contributions to the monolith! Here’s how you can get started: | ||
| + | |||
| + | ### Where to Contribute | ||
| + | |||
| + | The monolith codebase is located in this repository. The main application entry point is at `cmd/ | ||
| + | |||
| + | ### How to Contribute | ||
| + | |||
| + | 1. **Set up your development environment**: | ||
| + | 2. **Find an issue to work on**: Look for open issues in the issue tracker. If you have an idea for a new feature or a bug fix, you can create a new issue to discuss it with the team. | ||
| + | 3. **Create a new branch**: Create a new branch for your changes. | ||
| + | 4. **Write your code**: Make your changes to the codebase, following the existing coding style and conventions. | ||
| + | 5. **Test your changes**: Make sure to add or update tests for your changes. | ||
| + | 6. **Submit a pull request**: Once you are happy with your changes, submit a pull request for review. | ||
| + | |||
| + | ## Point of Contact | ||
| + | |||
| + | If you have any questions or need help with the monolith, please reach out to **@diamond**. | ||
| - | The DMA Monolith. | ||