this repo has no description
0
fork

Configure Feed

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

TypeScript 93.9%
JavaScript 4.0%
Other 2.1%
96 3 0

Clone this repository

https://tangled.org/alice.mosphere.at/zodiacsigns https://tangled.org/did:plc:by3jhwdqgbtrcc7q4tkkv3cf/zodiacsigns
git@tangled.org:alice.mosphere.at/zodiacsigns git@tangled.org:did:plc:by3jhwdqgbtrcc7q4tkkv3cf/zodiacsigns

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Prerequisites#

Setup#

Clone the repo and run bun i to install the dependencies. This project uses Bun for package management.

Run bunx @skyware/labeler setup to convert an existing account into a labeler. You can exit after converting the account; there's no need to add the labels with the wizard. We'll do that from code.

Copy the .env.example file to .env and fill in the values:

DID=did:plc:xxx
SIGNING_KEY=xxx
BSKY_IDENTIFIER=xxx
BSKY_PASSWORD=xxx
PORT=4002
METRICS_PORT=4102
FIREHOSE_URL=wss://jetstream.atproto.tools/subscribe
CURSOR_UPDATE_INTERVAL=10000

A cursor.txt file containing the time in microseconds also needs to be present. If it doesn't exist, it will be created with the current time.

Fill out src/constants.ts with the related post rkeys (record keys), label IDs and so on, then run bunx tsx src/set-labels.ts to create/update all labels at once.

Alternatively, use bunx @skyware/labeler label add and edit src/constants.ts after.

The server connects to Jetstream, which provides a WebSocket endpoint that emits ATProto events in JSON. There is a public instance available at wss://jetstream.atproto.tools/subscribe.

The server needs to be reachable outside your local network using the URL you provided during the account setup (typically using a reverse proxy such as Caddy):

labeler.example.com {
	reverse_proxy 127.0.0.1:4002
}

Metrics are exposed on the defined METRICS_PORT for Prometheus. This dashboard can be used to visualize the metrics in Grafana.

Start the project with bun run start.