Parakeet is a Rust-based Bluesky AppServer aiming to implement most of the functionality required to support the Bluesky client
appview atproto bluesky rust appserver
67
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: readme updates

Mia 158645c7 c3b4c199

+19 -15
+19 -15
README.md
··· 1 1 # Parakeet 2 2 3 - Parakeet is a [Bluesky](https://bsky.app) [AppView](https://atproto.wiki/en/wiki/reference/core-architecture/appview) 3 + Parakeet is a [Bluesky](https://bsky.app) [AppServer](https://atproto.wiki/en/wiki/reference/core-architecture/appview) 4 4 aiming to implement most of the functionality required to support the Bluesky client. Notably not implemented is a CDN. 5 5 6 6 ## Status and Roadmap 7 - Most common functionality works, with notable omissions being like/repost/follow statuses, blocks and mutes don't get 8 - applied, labels might not track CIDs properly, label redaction doesn't work at all (beware!). 9 - 10 - Future work is tracked in issues, but the highlights are below. Help would be highly appreciated. 7 + Most common functionality works. Future work is tracked in issues and on the [Skyboard](https://skyboard.dev/board/did:plc:rjo3yss3misbrdmpuc2eza6s/3meink5vuu22k), but the highlights are below. Help would be highly appreciated. 11 8 - Notifications 12 9 - Search 13 - - Pinned Posts 14 - - Monitoring: metrics, tracing, and health checks. 10 + - Control Panel 15 11 16 12 ## The Code 17 13 Parakeet is implemented in Rust, using Postgres as a database, Redis for caching and queue processing, RocksDB for 18 14 aggregation, and Diesel for migrations and querying. 19 15 20 - This repo is one big Rust workspace, containing nearly everything required to run and support the AppView. 16 + This repo is one big Rust workspace, containing nearly everything required to run and support the AppServer. 21 17 22 18 ### Packages 23 19 - consumer: Relay indexer, Label consumer, Backfiller. Takes raw records in from repos and stores them. 24 20 - dataloader-rs: a vendored fork of https://github.com/cksac/dataloader-rs, with some tweaks to fit caching requirements. 25 - - did-resolver: A did:plc and did:web resolver using hickory and reqwest. Supports custom PLC directories. 26 21 - lexica: Rust types for the relevant lexicons[sic] for Bluesky. 27 - - parakeet: The core AppView server code. Using Axum and Diesel. 22 + - parakeet: The core AppServer code. Using Axum and Diesel. 28 23 - parakeet-db: Database types and models, also the Diesel schema. 29 24 - parakeet-index: Stats aggregator based on RocksDB. Uses gRPC with tonic. 30 - - parakeet-lexgen: A WIP code generator for Lexicon in Rust. Not in use. 31 25 32 26 There is also a dependency on a fork of [jsonwebtoken](https://gitlab.com/parakeet-social/jsonwebtoken) until upstream 33 27 supports ES256K. 34 28 35 29 ## Running 30 + The "most supported" way is currently Nix - see below for more info. The Docker images may not build currently!. 31 + 36 32 Prebuilt docker images are published (semi) automatically by GitLab CI at https://gitlab.com/parakeet-social/parakeet. 37 33 Use `registry.gitlab.com/parakeet-social/parakeet/[package]:[branch]` in your docker-compose.yml. There is currently no 38 34 versioning until the project is more stable (sorry). 39 35 You can also just build with cargo. 40 36 41 37 To run, you'll need Postgres (version 16 or higher), Redis or a Redis-like, consumer, parakeet, and parakeet-index. 38 + 39 + ### Nix 40 + A Nix Flake is provided, so you can add `git+https://tangled.org/parakeet.at/parakeet` to your flake.nix inputs. 41 + 42 + Packages `parakeet-appview` (crates/parakeet), `parakeet-consumer` (crates/consumer), and `parakeet-index` (crates/parakeet-index) are provided, and also systemd services for NixOS. You can see an example in [Mia's dotfiles](https://tangled.org/mia.pds.parakeet.at/config/blob/main/hosts/keldeo/services/parakeet.nix). 43 + 44 + The flake is configured to set up a basic environment using `nix develop` (currently only cargo and friends, not postgres). 42 45 43 46 ### Configuring 44 47 There are quite a lot of environment variables, although sensible defaults are provided when possible. Variables are ··· 65 68 | PKC_BACKFILL__DOWNLOAD_WORKERS | 25 | How many workers to use to download repos for backfilling. | 66 69 | PKC_BACKFILL__DOWNLOAD_BUFFER | 25000 | How many repos to download and queue. | 67 70 | PKC_BACKFILL__DOWNLOAD_TMP_DIR | n/a | Where to download repos to. Ensure there is enough space. | 71 + | PKC_METRICS_PORT | 9000 | Port to bind to for Prometheus metrics in Consumer | 68 72 | (PK/PKI)_SERVER__BIND_ADDRESS | `0.0.0.0` | Address for the server to bind to. For index outside of docker, you probably want loopback as there is no auth. | 69 73 | (PK/PKI)_SERVER__PORT | PK: 6000, PKI: 6001 | Port for the server to bind to. | 70 74 | (PK/PKI)_DATABASE_URL | n/a | Required. URI of Postgres in format `postgres://[user]:[pass]@[host]:[port]/[db]` | 71 - | PK_SERVICE__DID | n/a | DID for the AppView in did:web. (did:plc is possible but untested) | 72 - | PK_SERVICE__PUBLIC_KEY | n/a | Public key for the AppView. Unsure if actually used, but may be required by PDS. | 73 - | PK_SERVICE__ENDPOINT | n/a | HTTPS publicly accessible endpoint for the AppView. | 75 + | PK_SERVICE__DID | n/a | DID for the AppServer in did:web. (did:plc is possible but untested) | 76 + | PK_SERVICE__PUBLIC_KEY | n/a | Public key for the AppServer. Unsure if actually used, but may be required by PDS. | 77 + | PK_SERVICE__ENDPOINT | n/a | HTTPS publicly accessible endpoint for the AppServer. | 74 78 | PK_TRUSTED_VERIFIERS | n/a | Optionally, trusted verifiers to use. For many, join with `,`. | 75 79 | PK_CDN__BASE | `https://cdn.bsky.app` | Optionally, base URL for a Bluesky compatible CDN | 76 80 | PK_CDN__VIDEO_BASE | `https://video.bsky.app` | Optionally, base URL for a Bluesky compatible video CDN | 77 - | PK_DID_ALLOWLIST | n/a | Optional. If set, controls which DIDs can access the AppView. For many, join with `,` | 81 + | PK_DID_ALLOWLIST | n/a | Optional. If set, controls which DIDs can access the AppServer. For many, join with `,` | 78 82 | PK_MIGRATE | false | Set to TRUE to run database migrations automatically on start. | 79 83 | PKI_INDEX_DB_PATH | n/a | Required. Location to store the index database. | 80 84