A simple template for getting started with writing code using atrium to interact with atproto repos. This is the minimal setup, but we're using the Statusphere lexicon to create some examples that can be used as studs to create your own application.
Holds your rust types created from lexicon json schema files using esquema-cli
- Setup and put your lexicon schema files in ./atproto_api/lexicons
- Install with
cargo install esquema-cli --locked --git https://github.com/fatfingers23/esquema.git
- Run with from root repo
esquema-cli generate local -l atproto_api/lexicons/ -o atproto_api/src/
- You now have Rust types for your lexicon schema in /atproto_api/src
This crate holds all your logic for interacting with the atmosphere (jetstream, repos, etc). Can import it into a backend, WASM, or in our case a CLI.
This is a binary showcasing how it can run on the backend
cargo run --bin cli -- --help
for a list of commands. You can also copy .env.template and change it
to .env
to save your handle and app password there.
#wasm This is a simple WASM project showcasing the same logic crate as used in the cli binary.
To run make sure you have Trunk setup and then run trunk serve
in the directory
All of these features are implemented in the Logic crate and share a lot of code. JetStream is a bit of an exception and has 2 different implementations. Rocketman for the cli and just a quick and dirty web_sys websocket connection for the WASM one
- Create a new Statusphere status
- Get your current Statusphere status
- Look up someone's status via handle to show did resolver
- Start a JetStream listener to listen for updates (Includes atrium did resolver via http)