Skip to content

Commit 046cf1d

Browse files
authored
Moves docs to this repo (#21)
* moves docs to this repo * adds prettierignore
1 parent db01eac commit 046cf1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4389
-2
lines changed

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build
2+
coverage
3+
node_modules
4+
.turbo
5+
.next
6+
.docusaurus

bun.lockb

404 KB
Binary file not shown.

docs/.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

docs/babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
3+
};

docs/docs/developers/_category_.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "Developers",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index"
6+
}
7+
}

docs/docs/developers/configuration.md

+186
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# ⚙️ Configuration
6+
7+
Configure your curate.fun instance through the `curate.config.json` file ⚡
8+
9+
## 🏗️ Structure
10+
11+
### 🌍 Global Settings
12+
13+
```json
14+
{
15+
"global": {
16+
"botId": "curatedotfun", // @handle for twitter bot
17+
"defaultStatus": "pending",
18+
"maxDailySubmissionsPerUser": 15,
19+
"blacklist": { // ignore submissions according to inbound platform
20+
"twitter": [
21+
"blocked_id"
22+
]
23+
}
24+
}
25+
}
26+
```
27+
28+
### 🔌 Plugins
29+
30+
Plugins extend functionality with transformations and distribution capabilities. See the [Plugins](/docs/plugins) section for detailed documentation on each plugin.
31+
32+
```json
33+
{
34+
"plugins": {
35+
"@curatedotfun/telegram": {
36+
"type": "distributor",
37+
"url": "https://unpkg.com/@curatedotfun/telegram@latest/dist/remoteEntry.js"
38+
},
39+
"@curatedotfun/rss": {
40+
"type": "distributor",
41+
"url": "https://unpkg.com/@curatedotfun/rss@latest/dist/remoteEntry.js"
42+
},
43+
"@curatedotfun/ai-transform": {
44+
"type": "transformer",
45+
"url": "https://unpkg.com/@curatedotfun/ai-transform@latest/dist/remoteEntry.js"
46+
}
47+
}
48+
}
49+
```
50+
51+
### 📡 Feeds
52+
53+
Each feed represents a distinct content stream:
54+
55+
```json
56+
{
57+
"feeds": [
58+
{
59+
"id": "example", // hashtag
60+
"name": "Example Feed",
61+
"description": "Example feed description",
62+
"moderation": {
63+
"approvers": {
64+
"twitter": ["approver1", "approver2"] // twitter handles, without @
65+
}
66+
},
67+
"outputs": {
68+
"stream": {
69+
"enabled": true, // if enabled but no distribute, then will sit in queue
70+
"transform": { // Optional
71+
"plugin": "@curatedotfun/ai-transform",
72+
"config": {
73+
"prompt": "Format this update..."
74+
}
75+
},
76+
"distribute": [ // Optional (can be processed later, with /api/feed/:feedId/process)
77+
{
78+
"plugin": "@curatedotfun/telegram",
79+
"config": {
80+
"botToken": "{TELEGRAM_BOT_TOKEN}",
81+
"channelId": "{TELEGRAM_CHANNEL_ID}"
82+
}
83+
},
84+
{
85+
"plugin": "@curatedotfun/rss",
86+
"config": {
87+
"title": "Feed Title",
88+
"path": "./public/feed.xml"
89+
}
90+
}
91+
]
92+
},
93+
"recap": {
94+
"enabled": false,
95+
"schedule": "0 0 * * *",
96+
"transform": { // Required to summarize
97+
"plugin": "@curatedotfun/ai-transform",
98+
"config": {
99+
"prompt": "./prompts/recap.txt"
100+
}
101+
},
102+
"distribute": [ // Required for recap
103+
{
104+
"plugin": "@curatedotfun/telegram",
105+
"config": {
106+
"botToken": "{TELEGRAM_BOT_TOKEN}", // gets injected by .env
107+
"channelId": "{TELEGRAM_CHANNEL_ID}"
108+
}
109+
}
110+
]
111+
}
112+
}
113+
}
114+
]
115+
}
116+
```
117+
118+
## 🔄 Stream Configuration
119+
120+
Stream configuration controls real-time content distribution:
121+
122+
```typescript
123+
outputs: {
124+
stream?: {
125+
enabled: boolean;
126+
transform?: { // Optional transformation
127+
plugin: string;
128+
config: {
129+
prompt: string;
130+
};
131+
};
132+
distribute?: [ // Optional distribution, can configure multiple
133+
{
134+
plugin: string;
135+
config: Record<string, string>;
136+
}
137+
];
138+
};
139+
}
140+
```
141+
142+
When `stream` is enabled:
143+
144+
- 🔄 Without `transform`, content is distributed as-is
145+
- 📥 Without `distribute`, submissions stay in queue until:
146+
- ✅ Distribution is added later (/api/feeds/:feedId/process)
147+
- 📅 Recap schedule completes
148+
- 🗑️ Manual removal
149+
150+
This queue system helps you:
151+
152+
- 📦 Collect submissions for later
153+
- 🔌 Add distribution channels flexibly
154+
- 📝 Use content in recaps only
155+
156+
## 📅 Recap Configuration
157+
158+
Recap configuration handles periodic content summaries:
159+
160+
```typescript
161+
outputs: {
162+
recap?: {
163+
enabled: boolean;
164+
schedule: string; // Cron expression
165+
transform: { // Required
166+
plugin: string;
167+
config: {
168+
prompt: string;
169+
};
170+
};
171+
distribute: [ // Required
172+
{
173+
plugin: string;
174+
config: Record<string, string>;
175+
}
176+
];
177+
};
178+
}
179+
```
180+
181+
Key differences from stream configuration:
182+
183+
- 🔄 `transform` is required (content must be summarized)
184+
- 📢 `distribute` is required (summaries must be distributed)
185+
186+
📝 Note: Messages in a recap are removed from the queue after distribution.

0 commit comments

Comments
 (0)