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