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 'app.bsky.feed.post?action=create',
24 'site.standard.publication',
25 'site.standard.document',
26 'xyz.statusphere.status'
27 ],
28
29 // what types of authenticated proxied requests you can make to services
30
31 // example: allow authenticated proxying to bsky appview to get a users liked posts
32 //rpc: {'did:web:api.bsky.app#bsky_appview': ['app.bsky.feed.getActorLikes']}
33 rpc: {},
34
35 // what types of blobs you can upload to a users PDS
36
37 // example: allowing video and html uploads
38 // blobs: ['video/*', 'text/html']
39 // example: allowing all blob types
40 // blobs: ['*/*']
41 blobs: ['*/*']
42} as const satisfies Permissions;
43
44// Extract base collection name (before any query params)
45type ExtractCollectionBase<T extends string> = T extends `${infer Base}?${string}` ? Base : T;
46
47export type AllowedCollection = ExtractCollectionBase<(typeof permissions.collections)[number]>;
48
49// which PDS to use for signup
50// ATTENTION: pds.rip is only for development, all accounts get deleted automatically after a week
51const devPDS = 'https://pds.rip/';
52const prodPDS = 'https://selfhosted.social/';
53export const signUpPDS = dev ? devPDS : prodPDS;
54
55// where to redirect after oauth login/signup, e.g. /oauth/callback
56export const REDIRECT_PATH = '/oauth/callback';
57
58export const DOH_RESOLVER = 'https://mozilla.cloudflare-dns.com/dns-query';