A decentralized music tracking and discovery platform built on AT Protocol 馃幍
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
1import dotenv from "dotenv";
2import { cleanEnv, str } from "envalid";
3import crypto from "node:crypto";
4import { v4 as uuid } from "uuid";
5
6dotenv.config();
7
8export const env = cleanEnv(process.env, {
9 ROCKSKY_IDENTIFIER: str({ default: "" }),
10 ROCKSKY_HANDLE: str({ default: "" }),
11 ROCKSKY_PASSWORD: str({ default: "" }),
12 JETSTREAM_SERVER: str({
13 default: "wss://jetstream1.us-west.bsky.network/subscribe",
14 }),
15 ROCKSKY_API_KEY: str({ default: crypto.randomBytes(16).toString("hex") }),
16 ROCKSKY_SHARED_SECRET: str({
17 default: crypto.randomBytes(16).toString("hex"),
18 }),
19 ROCKSKY_SESSION_KEY: str({
20 default: crypto.randomBytes(16).toString("hex"),
21 }),
22 ROCKSKY_WEBSCROBBLER_KEY: str({
23 default: uuid(),
24 }),
25});