your personal website on atproto - mirror blento.app
at polijn/main 56 lines 1.8 kB view raw
1import { dev } from '$app/environment'; 2 3export const SITE = 'https://blento.app'; 4 5type Permissions = { 6 collections: readonly string[]; 7 rpc: Record<string, string | string[]>; 8 blobs: readonly string[]; 9}; 10 11export const permissions = { 12 // collections you can create/delete/update 13 14 // example: only allow create and delete 15 // collections: ['xyz.statusphere.status?action=create&action=update'], 16 collections: [ 17 'app.blento.card', 18 'app.blento.page', 19 'app.blento.settings', 20 'app.blento.comment', 21 'app.blento.guestbook.entry', 22 'site.standard.publication', 23 'site.standard.document', 24 'xyz.statusphere.status' 25 ], 26 27 // what types of authenticated proxied requests you can make to services 28 29 // example: allow authenticated proxying to bsky appview to get a users liked posts 30 //rpc: {'did:web:api.bsky.app#bsky_appview': ['app.bsky.feed.getActorLikes']} 31 rpc: {}, 32 33 // what types of blobs you can upload to a users PDS 34 35 // example: allowing video and html uploads 36 // blobs: ['video/*', 'text/html'] 37 // example: allowing all blob types 38 // blobs: ['*/*'] 39 blobs: ['*/*'] 40} as const satisfies Permissions; 41 42// Extract base collection name (before any query params) 43type ExtractCollectionBase<T extends string> = T extends `${infer Base}?${string}` ? Base : T; 44 45export type AllowedCollection = ExtractCollectionBase<(typeof permissions.collections)[number]>; 46 47// which PDS to use for signup 48// ATTENTION: pds.rip is only for development, all accounts get deleted automatically after a week 49const devPDS = 'https://pds.rip/'; 50const prodPDS = 'https://selfhosted.social/'; 51export const signUpPDS = dev ? devPDS : prodPDS; 52 53// where to redirect after oauth login/signup, e.g. /oauth/callback 54export const REDIRECT_PATH = '/oauth/callback'; 55 56export const DOH_RESOLVER = 'https://mozilla.cloudflare-dns.com/dns-query';