relay filter/appview bootstrap

Files
README.md

Prism #

Prism是一个用于gmstn的ATProto AppView服务。它通过Hydrant消费事件,并将其存储/缓存以供将来检索,这样查询就不会对其他PDS造成太大负担。

appview-prism-pinkfloyd

Prism实现了用于访问缓存feed的XRPC端点。Lexicon定义可以在lexicons/目录中找到。

本地运行 #

前置条件 #

Rust, docker/podman

快速开始 #

cargo run

服务将在 http://localhost:3000 上可用。数据库在首次启动时自动创建和迁移。

Docker #

docker compose up

这将启动 Prism 端口 3000。

API端点 #

端点 描述
GET /xrpc/systems.gmstn.development.channel.listChannels?author=<did> 按作者列出频道
GET /xrpc/systems.gmstn.development.channel.listInvites?recipient=<did> 按接收者列出邀请
GET /xrpc/systems.gmstn.development.channel.listMemberships?recipient=<did> 按接收者列出成员资格
GET /xrpc/systems.gmstn.development.lattice.listLattices?author=<did> 按作者列出晶格
GET /xrpc/systems.gmstn.development.shard.listShards?author=<did> 按作者列出碎片
WS /ws 用于实时记录更新的WebSocket

所有列表端点都支持limit(1-100,默认50)和cursor(TID)参数。

配置 #

参见 .env.example。

开发 #

cargo check
cargo test