relay filter/appview bootstrap
Files
README.md
# Prism Prism是一个用于gmstn的[ATProto](https://atproto.com/) AppView服务。它通过[Hydrant](https://tangled.org/ptr.pet/hydrant)消费事件,并将其存储/缓存以供将来检索,这样查询就不会对其他PDS造成太大负担。 <a href="https://docs.bsky.app/docs/advanced-guides/federation-architecture#app-views"> <img src="./assets/prism-appview-concept.png" width="400" alt="appview-prism-pinkfloyd"/> </a> Prism实现了用于访问缓存feed的XRPC端点。Lexicon定义可以在`lexicons/`目录中找到。 ## 本地运行 ### 前置条件 Rust, docker/podman ### 快速开始 ```bash cargo run ``` 服务将在 http://localhost:3000 上可用。数据库在首次启动时自动创建和迁移。 ### Docker ```bash 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`。 ## 开发 ```bash cargo check cargo test ```