# Technologies Used in Macro Microservices: Complete 2024 Stack Breakdown

> Explore the technologies powering Macro microservices in 2024. Discover the Rust stack including Axum, async-graphql, PostgreSQL, Redis, OpenSearch, AWS, Pulumi, SolidJS, and Tauri.

- Repository: [Macro/macro](https://github.com/macro-inc/macro)
- Tags: architecture
- Published: 2026-08-21

---

**Macro’s microservices architecture is built entirely on Rust using Axum and async-graphql, backed by PostgreSQL, Redis, and OpenSearch, deployed on AWS via Pulumi Infrastructure-as-Code, and fronted by a SolidJS desktop application wrapped in Tauri.**

Macro is a modern, polyglot microservices platform designed for AI-driven document collaboration and automation. According to the macro-inc/macro repository, the stack combines roughly 42 independent Rust services with AWS-native serverless components, creating a high-performance ecosystem capable of real-time editing and intelligent agent workflows. The following sections break down the specific technologies used in Macro microservices, drawn directly from the source code and configuration files.

## Core Backend: Rust, Axum, and GraphQL

Every microservice in Macro is written in **Rust**, chosen for its safety guarantees and async performance characteristics. The workspace root [`Cargo.toml`](https://github.com/macro-inc/macro/blob/main/Cargo.toml) declares the entire language ecosystem, pinning dependencies across the monorepo.

**Axum v0.8** serves as the primary web framework. Found in [`services/authentication_service/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/services/authentication_service/Cargo.toml), it handles HTTP routing, middleware, and WebSocket support. Services expose REST endpoints alongside **async-graphql** and **async-graphql-axum** (visible in [`services/document_storage_service/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/services/document_storage_service/Cargo.toml)) to provide type-safe GraphQL APIs for real-time data fetching.

```rust
use axum::{routing::get, Router};

async fn health() -> &'static str {
    "OK"
}

pub fn app() -> Router {
    Router::new().route("/healthz", get(health))
}

```

This pattern appears across services like `worker_trigger`, demonstrating the consistent Axum-based HTTP layer that underpins the architecture.

## Data Persistence: PostgreSQL, SQLx, and Object Storage

The microservices share a **single PostgreSQL MacroDB** instance managed through the `macro_db_client` crate. **SQLx** provides compile-time checked queries, ensuring type safety at the database boundary. Migration files in `crates/macro_db_client/migrations` define the schema supporting the bidirectional graph linking emails, documents, tasks, and agents.

For object storage, **AWS S3** (accessed via `aws-sdk-s3` in [`services/document_storage_service/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/services/document_storage_service/Cargo.toml)) persists binary blobs including email attachments and uploaded documents.

## Caching, Search, and Pub/Sub

**Redis** powers fast caches and message queues throughout the stack. The `redis` crate enables session storage, rate-limiting, and real-time notifications across services.

Full-text search operates through **OpenSearch**, implemented via the `opensearch_client` crate declared in [`crates/opensearch_client/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/crates/opensearch_client/Cargo.toml). This indexes PDF attachments and document bodies for instant retrieval.

**Apache Kafka** and **AWS SQS** handle asynchronous messaging between services. The [`services/agent_harness_service/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/services/agent_harness_service/Cargo.toml) references these technologies for event-driven pipelines that coordinate AI agent actions.

## Serverless and Cloud Infrastructure

Macro leverages **AWS Lambda** for background processing tasks. The `lambda_runtime` crate (found in [`services/email_service/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/services/email_service/Cargo.toml)) powers serverless functions handling PDF conversion, email ingestion, and scheduled agent triggers. These integrate with **SQS** queues for reliable async processing.

The entire cloud stack is declared using **Pulumi (TypeScript)**. The [`infra/stacks/web-app/README.md`](https://github.com/macro-inc/macro/blob/main/infra/stacks/web-app/README.md) describes Infrastructure-as-Code definitions for S3 buckets, CloudFront CDN, DynamoDB tables, and Lambda functions, enabling one-click AWS deployments.

## Frontend: SolidJS, Tauri, and CRDTs

The desktop application uses **SolidJS** with TypeScript, delivering a reactive UI that mirrors the backend’s bidirectional graph structure. This is wrapped in **Tauri** for native desktop performance, as documented in [`apps/web/README.md`](https://github.com/macro-inc/macro/blob/main/apps/web/README.md).

Real-time collaborative editing relies on **Loro-Mirror**, a CRDT (Conflict-free Replicated Data Type) library detailed in [`packages/loro-mirror/README.md`](https://github.com/macro-inc/macro/blob/main/packages/loro-mirror/README.md). This enables live, conflict-free document and canvas editing across clients.

## AI Integration and Automation

Macro integrates multiple LLM providers through Rust SDK crates. **Anthropic**, **OpenAI**, and **Azure** SDKs (`anthropic` and `async-openai` crates) power agents capable of reading documents, suggesting tasks, and executing automated actions. The [`crates/anthropic/README.md`](https://github.com/macro-inc/macro/blob/main/crates/anthropic/README.md) details the integration point for these AI capabilities.

The **Agent Harness** service ([`services/agent_harness_service/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/services/agent_harness_service/Cargo.toml)) coordinates these bots, allowing them to interact with the MCP (Macro Control Plane) API and write results back to the shared graph.

## Developer Experience and Observability

Build reproducibility is enforced through **Nix**, configured in `nix/flake.nix` to pin toolchains and dependencies. The `just` command-runner orchestrates build tasks, while **Docker Compose** (configured in [`docker/docker-compose.yml`](https://github.com/macro-inc/macro/blob/main/docker/docker-compose.yml)) provides local development environments spinning up Postgres, Redis, and OpenSearch.

Authentication uses **FusionAuth** for centralized SSO, with JWT validation handled by the `macro_authorization` crate. Observability is implemented via **OpenTelemetry** using the `worker-rs-otel` crate ([`crates/worker-rs-otel/Cargo.toml`](https://github.com/macro-inc/macro/blob/main/crates/worker-rs-otel/Cargo.toml)), shipping traces and metrics to **Jaeger** on AWS.

```bash

# Local development workflow

just build          # builds all services

just create_networks
just run_dbs -d     # spin up Postgres, Redis, OpenSearch

just setup_test_envs
cargo test -p document_storage_service

```

## Summary

- **Rust and Axum v0.8** form the complete backend foundation for all 42+ microservices, with **async-graphql** exposing type-safe APIs.
- **PostgreSQL** with **SQLx** provides the primary persistent store for the bidirectional graph, while **Redis** and **OpenSearch** handle caching and search.
- **AWS Lambda, S3, and SQS** power serverless background processing and object storage, orchestrated via **Pulumi** TypeScript.
- **SolidJS** and **Tauri** deliver the desktop frontend, enhanced by **Loro-Mirror** CRDTs for real-time collaboration.
- **Anthropic and OpenAI** SDKs enable AI agents, coordinated through the **Agent Harness** service using **Kafka** and **SQS** messaging.
- **Nix, Docker Compose, and OpenTelemetry** ensure reproducible builds, local development parity, and production observability.

## Frequently Asked Questions

### Is Macro entirely built with Rust?

Yes. Every backend microservice in the Macro architecture is implemented in Rust, from the Axum-based HTTP handlers to the Lambda worker functions. The workspace [`Cargo.toml`](https://github.com/macro-inc/macro/blob/main/Cargo.toml) centralizes dependency management for the entire Rust ecosystem, including SQLx, AWS SDKs, and async-graphql.

### How does Macro handle real-time collaboration?

Macro uses **Loro-Mirror**, a CRDT library that enables conflict-free concurrent editing. This operates alongside WebSocket connections handled by Axum, allowing multiple users to edit documents simultaneously without server-side locking conflicts, as detailed in [`packages/loro-mirror/README.md`](https://github.com/macro-inc/macro/blob/main/packages/loro-mirror/README.md).

### What database technology does Macro use for microservices?

Macro uses **PostgreSQL** as the primary database for all microservices, accessed via **SQLx** for compile-time query validation. The `macro_db_client` crate manages migrations and connection pooling. **Redis** provides caching and session storage, while **OpenSearch** handles full-text search indexing.

### How is Macro's infrastructure deployed?

The infrastructure is provisioned through **Pulumi** using TypeScript definitions located in [`infra/stacks/web-app/README.md`](https://github.com/macro-inc/macro/blob/main/infra/stacks/web-app/README.md). This Infrastructure-as-Code approach declares AWS resources including S3, CloudFront, DynamoDB, and Lambda functions, allowing reproducible deployments across environments.