Skip to content

at-microcosm/microcosm-rs

Repository files navigation

microcosm HTTP APIs + rust crates

@microcosm.blue: bluesky microcosm discord: join github sponsors: support ko-fi: support

Welcome! Documentation is under active development. If you like reading API docs, you'll probably hit the ground running!

Tutorials, how-to guides, and client SDK libraries are all in the works for gentler on-ramps, but are not quite ready yet. But don't let that stop you! Hop in the microcosm discord, or post questions and tag @bad-example.com on Bluesky if you get stuck anywhere.

Tip

This repository's primary home is moving to tangled: @microcosm.blue/microcosm-rs. It will continue to be mirrored on github for the forseeable future, and it's fine to open issues or pulls in either place!

A global atproto interactions backlink index as a simple JSON API. Works with every lexicon, runs on a raspberry pi, consumes less than 2GiB of disk per day. Handles record deletion, account de/re-activation, and account deletion, ensuring accurate link counts while respecting users' data choices.

A global atproto interactions firehose. Extracts all at-uris, DIDs, and URLs from every lexicon in the firehose, and exposes them over a websocket modelled after jetstream.

  • Source: ./spacedust/
  • Public instance/API docs
  • Status: v0: the basics work and the APIs are in place! missing cursor replay, forward link storage, and delete event link hydration.

Demos:

🛰️ Slingshot

A fast, eager, production-grade edge cache for atproto records and identities. Pre-caches all records from the firehose and maintains a longer-term cache of requested records on disk.

Timeseries stats and sample records for every collection ever seen in the atproto firehose. Unique users are counted in hyperloglog sketches enabling arbitrary cardinality aggregation across time buckets and/or NSIDs.

  • Source: ./ufos/
  • Public instance/API docs
  • Status: Used in production. It has APIs and they work! Needs improvement on indexing; needs more indexes and some more APIs to the data exposed.

Tip

See also: UFOs atproto explorer built on UFOs API. (source)

💫 Links

Rust library for parsing and extracting links (at-uris, DIDs, and URLs) from atproto records.

  • Source: ./links/
  • Status: not yet published to crates.io; needs some rework

🛩️ Jetstream

A low-overhead jetstream client with cursor handling and automatic reconnect.

  • Source: ./links/
  • Status: used in multiple apps in production, but not yet published to crates.io; some rework planned

Tip

See also: Rocketman, another excellent rust jetstream client which shares some lineage and is published on crates.io.

🔭 Deprecated: Who am I

An identity bridge for microcosm demos, that kinda worked. Fixing its problems is about equivalent to reinventing a lot of OIDC, so it's being retired.

Warning

who-am-i is still in use for the Spacedust Notifications demo, but that will hopefully be migrated to use atproto oauth directly instead.

About

Rust atproto crates and services for microcosm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 7