WIP! A BB-style forum, on the ATmosphere!
We're still working... we'll be back soon when we have something to show off!
node
typescript
hono
htmx
atproto
1meta {
2 name: Create Theme
3 type: http
4 seq: 1
5}
6
7post {
8 url: {{appview_url}}/api/admin/themes
9}
10
11body:json {
12 {
13 "name": "Neobrutal Light",
14 "colorScheme": "light",
15 "tokens": {
16 "color-bg": "#f5f0e8",
17 "color-text": "#1a1a1a",
18 "color-primary": "#ff5c00"
19 },
20 "fontUrls": ["https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700"]
21 }
22}
23
24assert {
25 res.status: eq 201
26 res.body.uri: isDefined
27 res.body.cid: isDefined
28}
29
30docs {
31 Create a new theme record on the Forum DID's PDS.
32 The firehose indexer creates the DB row asynchronously.
33
34 **Requires:** space.atbb.permission.manageThemes
35
36 Body:
37 - name (required): Theme display name, non-empty
38 - colorScheme (required): "light" or "dark"
39 - tokens (required): Plain object of CSS design token key-value pairs. Values must be strings.
40 - cssOverrides (optional): Raw CSS string for structural overrides (not rendered until ATB-62 sanitization ships)
41 - fontUrls (optional): Array of HTTPS URLs for font stylesheets
42
43 Returns (201):
44 {
45 "uri": "at://did:plc:.../space.atbb.forum.theme/abc123",
46 "cid": "bafyrei..."
47 }
48
49 Error codes:
50 - 400: Missing name/colorScheme/tokens, invalid colorScheme, non-HTTPS fontUrl, token value not a string, malformed JSON
51 - 401: Not authenticated
52 - 403: Missing manageThemes permission
53 - 500: ForumAgent not configured (server configuration issue)
54 - 503: ForumAgent not authenticated or PDS network error
55}