Minds Developer Documentation

website·Indexed 41 days ago

https://developers.minds.com/docs/

Developer guides and technical documentation for the Minds platform, covering frontend development with Angular 8, GraphQL, backend testing with phpspec, E2E testing with Cypress, and infrastructure management using Kubernetes, Argo CD, and Terraform. Includes documentation on the ETL data pipeline with dbt, A/B testing via Growthbook, and plugins for embedding boosts and comments.

Tokens
36.6K
Snippets
179
Records
312
Agent score
65%

What's inside Minds

  1. Overview of Event Streams with Apache Pulsar

    Event Streams allow events (such as ActionEvents triggered by votes, comments, or reminders) to be produced and consumed by multiple services, such as notifications, analytics, and recommendation engines. The system is powered by Apache Pulsar, which manages message positions via subscription cursors.
  2. Implement newsfeed loading and hydration

    The newsfeed is designed to load 150 items initially, which are then hydrated on the client side. This architecture is used because pagination indexes for dynamic feeds (like 'top feeds' based on user votes) cannot be maintained on the server side. This approach also enables client-side caching for improved load performance.
  3. Understand the Minds dbt transformation pipeline

    The Minds dbt project transforms raw data into business analytics and product features through a series of sequential layers: Data sources 🡒 Data staging 🡒 Intermediate processing 🡒 Domain models 🡒 KPI models and presentation models.
  4. Understand the Minds backend architecture

    The Minds backend follows an abstraction design pattern to separate complex processes into standalone chunks. It is divided into two primary areas:

    • Core: Contains heavy-lifting modules and internal APIs.
    • Controllers: Publicly exposed interfaces that support both CLI and REST APIs.

    Directory structure overview:

    • engine/Core: Core modules and managers.
    • engine/Controllers/Cli: CLI command implementations.
    • engine/Controllers/api: REST API versions (v1, v2).
    • engine/Common: Shared common utilities.
  5. Monitor Kubernetes infrastructure with Prometheus

    Prometheus is used to monitor infrastructure components running in Kubernetes and is managed via the Prometheus Operator. Prometheus resources are deployed within the monitoring namespace on the stateful-monitoring node group. While rarely necessary, Prometheus can be accessed via port-forwarding.
  6. Understand the Minds backend email dispatch process

    The Minds backend uses an event-driven queue system to send emails. The workflow follows these steps:

    1. An event occurs (e.g., a new user joins) and dispatches a message to the queue.
    2. The queue dispatches an internal event.
    3. The internal event compiles and dispatches the email.
    4. The Mailer.php class handles the actual transmission of the email.
  7. Select tools for application monitoring and dashboards

    For general application monitoring, Sentry is the primary tool. For visualization of infrastructure metrics, logs, and traces, Grafana is the preferred 'single pane of glass' for dashboards, while OpenSearch is used specifically for logging dashboards.
  8. Automate node scaling with Kubernetes Cluster Autoscaler

    The Kubernetes Cluster Autoscaler automates the addition and removal of nodes from a cluster to ensure sufficient compute capacity for workloads. When pods are stuck in a Pending state because no available nodes have enough capacity to satisfy the pod's requested resources, the autoscaler triggers the addition of a new node. Conversely, when nodes are underutilized, the autoscaler reduces the node count by gracefully draining pods and removing the instance.
  9. Understand the Minds vote synchronization process

    Minds runs a background job every 5 minutes that identifies all entities (activities, images, videos, and blogs) that received any vote during that interval. The system then updates the total vote counts in the ElasticSearch documents used for feeds and search results.