Skip to content

Commit 5419672

Browse files
committed
feat: enhance installation and AI features documentation
- Updated installation documentation with new sections for deploying to Vercel and setting up Upstash for rate limiting. - Revised environment variable setup instructions for clarity and added optional variables. - Introduced new AI features documentation, including text endpoints for AI tools and improved page actions for easier integration. - Renamed sections and files for better organization and clarity, including changing "LLMs" to "AI Features" in the documentation structure.
1 parent 522ab2e commit 5419672

14 files changed

Lines changed: 250 additions & 192 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Deploy to Vercel
3+
description: Deploy the Vercord relay service to Vercel
4+
icon: Rocket
5+
---
6+
7+
import { Step, Steps } from 'fumadocs-ui/components/steps';
8+
9+
# Deploy to Vercel
10+
11+
<Steps>
12+
<Step>
13+
14+
### Deploy the Repository
15+
16+
[Click here to deploy Vercord to your Vercel account](https://vercel.com/new/clone?repository-url=https://github.com/vercord/core/tree/master/apps/web)
17+
18+
</Step>
19+
<Step>
20+
21+
### Note Your Domain
22+
23+
After deployment, note your project's domain (e.g., `your-project.vercel.app`).
24+
25+
<Callout>
26+
You'll need this domain later when configuring the Vercel webhook endpoint.
27+
</Callout>
28+
29+
</Step>
30+
</Steps>
31+
32+
The deployment will initially fail because environment variables aren't set yet.
33+
That's expected — continue with the next steps.
34+
Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,82 @@
11
---
2-
title: Environment
3-
description: How to setup environment variables for Vercord
2+
title: Environment Variables
3+
description: Configure environment variables and finish setup
44
icon: Settings
55
---
66

7+
import { Step, Steps } from 'fumadocs-ui/components/steps';
78
import { TypeTable } from 'fumadocs-ui/components/type-table';
89

910
# Environment Variables
1011

11-
These are the environment variables you need to set at your Vercord instance in
12-
Vercel for it to work
12+
<Steps>
13+
<Step>
14+
15+
### Open Your Vercord Project Settings
16+
17+
Go to your Vercord deployment in Vercel → **Settings****Environment Variables**.
18+
19+
</Step>
20+
<Step>
21+
22+
### Add the Required Variables
1323

1424
<TypeTable
1525
type={{
16-
WEBHOOK_INTEGRATION_SECRET: {
17-
description: 'The secret for the Vercel webhook integration',
26+
DISCORD_WEBHOOK_URL: {
27+
description: 'The Discord webhook URL you copied earlier',
1828
type: 'string',
19-
default: 'your-secret',
20-
required: true
29+
required: true,
2130
},
22-
DISCORD_WEBHOOK_URL: {
23-
description: 'The URL for the Discord webhook integration',
31+
UPSTASH_REDIS_REST_URL: {
32+
description: 'Upstash Redis REST URL',
33+
type: 'string',
34+
required: true,
35+
},
36+
UPSTASH_REDIS_REST_TOKEN: {
37+
description: 'Upstash Redis REST token',
38+
type: 'string',
39+
required: true,
40+
},
41+
WEBHOOK_INTEGRATION_SECRET: {
42+
description: 'The signing secret from Vercel webhook',
2443
type: 'string',
25-
default: 'https://discord.com/api/webhooks/<id>/<token>',
26-
required: true
44+
required: true,
2745
},
46+
}}
47+
/>
48+
49+
</Step>
50+
<Step>
51+
52+
### Add Optional Variables (if desired)
53+
54+
<TypeTable
55+
type={{
2856
DISCORD_WEBHOOK_USERNAME: {
29-
description: 'The username for the Discord webhook',
57+
description: 'Custom username for the webhook bot',
3058
type: 'string',
3159
default: 'Vercord',
32-
required: false
3360
},
3461
DISCORD_WEBHOOK_AVATAR_URL: {
35-
description: 'The avatar URL for the Discord webhook',
62+
description: 'Custom avatar URL for the webhook bot',
3663
type: 'string',
37-
default: 'https://vercord.dev/logo.jpg',
38-
required: false
39-
}
64+
},
4065
}}
4166
/>
4267

43-
## Security Considerations
68+
</Step>
69+
<Step>
70+
71+
### Redeploy
72+
73+
Go to **Deployments** and click the three dots on the latest deployment →
74+
**Redeploy**.
75+
76+
</Step>
77+
</Steps>
4478

45-
- Store your webhook secret securely with a unique value for each integration
46-
- All incoming webhooks are validated using HMAC-SHA1 signatures
47-
- Webhook payloads are validated against a strict schema to ensure data
48-
integrity
79+
## Done!
4980

50-
Then just redeploy your Vercord instance and you're done!
81+
Your Vercord instance is now ready. Trigger a deployment on any monitored
82+
project to test the integration.
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2-
"title": "installation",
3-
"pages": ["requirements", "setup-vercel", "setup-discord", "environment"]
2+
"title": "Installation",
3+
"pages": [
4+
"requirements",
5+
"deploy",
6+
"setup-discord",
7+
"setup-upstash",
8+
"setup-vercel",
9+
"environment"
10+
]
411
}
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
title: Requirements
3-
description: Requirements for Vercord installation
3+
description: What you need before setting up Vercord
44
icon: ListCheck
55
---
66

7-
# Prerequisites
7+
# Requirements
88

9-
To set up Vercord, you will need the following:
9+
Before setting up Vercord, make sure you have:
1010

11-
1. A Vercel account with project(s).
12-
2. A Discord server with the "Manage Webhooks" permission.
13-
3. Your own Vercord instance:
14-
[Click here to deploy](https://vercel.com/new/clone?repository-url=https://github.com/vercord/vercord)
11+
1. A **Vercel account** with at least one project you want to monitor
12+
2. A **Discord server** where you have "Manage Webhooks" permission
13+
3. An **Upstash account** for rate limiting (free tier works fine)
Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,46 @@
11
---
22
title: Setup Discord
3-
description: How to setup Discord for Vercord
4-
icon: CheckCheck
3+
description: Create a Discord webhook to receive notifications
4+
icon: MessageSquare
55
---
66

77
import { Step, Steps } from 'fumadocs-ui/components/steps';
88

9-
# Setup Discord
9+
# Setup Discord Webhook
1010

1111
<Steps>
1212
<Step>
1313

14-
### Open Discord and Go to Your Server
14+
### Open Channel Settings
1515

16-
Open Discord and navigate to the server where you want to receive Vercord
17-
messages.
16+
In your Discord server, right-click the channel where you want deployment
17+
notifications and select **Edit Channel**.
1818

1919
</Step>
2020
<Step>
2121

22-
### Edit the Target Channel
22+
### Navigate to Webhooks
2323

24-
Right-click the channel you want to use and select **Edit Channel**.
24+
Go to **Integrations****Webhooks**.
2525

2626
</Step>
2727
<Step>
2828

29-
### Go to Integrations > Webhooks
29+
### Create a Webhook
3030

31-
In the channel settings, go to the **Integrations** tab, then click
32-
**Webhooks**.
33-
34-
</Step>
35-
<Step>
36-
37-
### Create or Select a Webhook
38-
39-
Click **New Webhook** (or select an existing one). Name it (e.g., `Vercord`).
31+
Click **New Webhook** and give it a name (e.g., `Vercord`).
4032

4133
</Step>
4234
<Step>
4335

4436
### Copy the Webhook URL
4537

46-
Copy the **Webhook URL** provided by Discord.
38+
Click **Copy Webhook URL**.
4739

48-
<Callout>Save the webhook URL, you will need it for later.</Callout>
40+
<Callout type="warn">
41+
Save this URL securely — you'll need it for the `DISCORD_WEBHOOK_URL`
42+
environment variable.
43+
</Callout>
4944

5045
</Step>
5146
</Steps>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Setup Upstash
3+
description: Configure Upstash Redis for rate limiting
4+
icon: Database
5+
---
6+
7+
import { Step, Steps } from 'fumadocs-ui/components/steps';
8+
9+
# Setup Upstash Redis
10+
11+
Vercord uses Upstash Redis for rate limiting to prevent abuse.
12+
13+
<Steps>
14+
<Step>
15+
16+
### Create an Upstash Account
17+
18+
Go to [console.upstash.com](https://console.upstash.com/) and sign up or log in.
19+
20+
</Step>
21+
<Step>
22+
23+
### Create a Redis Database
24+
25+
Click **Create Database** and configure:
26+
27+
- **Name**: Anything (e.g., `vercord`)
28+
- **Region**: Choose the region closest to your Vercel deployment (usually `us-east-1` for Vercel)
29+
- **Type**: Regional is fine
30+
31+
</Step>
32+
<Step>
33+
34+
### Copy the Credentials
35+
36+
In your database dashboard, find the **REST API** section and copy:
37+
38+
- `UPSTASH_REDIS_REST_URL`
39+
- `UPSTASH_REDIS_REST_TOKEN`
40+
41+
<Callout type="warn">
42+
Save these values — you'll need them for the environment variables.
43+
</Callout>
44+
45+
</Step>
46+
</Steps>
47+

apps/fumadocs/content/docs/installation/setup-vercel.mdx

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,45 @@
11
---
2-
title: Setup Vercel
3-
description: How to setup Vercel for Vercord
4-
icon: Check
2+
title: Setup Vercel Webhook
3+
description: Configure a Vercel webhook to send deployment events to Vercord
4+
icon: Webhook
55
---
66

77
import { Step, Steps } from 'fumadocs-ui/components/steps';
88

9-
# Setup Vercel
9+
# Setup Vercel Webhook
1010

11-
<Steps>
12-
<Step>
13-
14-
### Access Vercel Dashboard
15-
16-
Sign in to your account and navigate to the
17-
[Vercel Dashboard](https://vercel.com/dashboard) to manage your projects.
18-
19-
</Step>
11+
Now configure Vercel to send deployment events to your Vercord instance.
2012

13+
<Steps>
2114
<Step>
2215

23-
### Navigate to Project Settings
16+
### Open Webhook Settings
2417

25-
Click on the **Settings** tab in the navigation menu.
18+
Go to your Vercel Dashboard → **Settings****Webhooks** (at the account,
19+
team, or project level depending on what you want to monitor).
2620

2721
</Step>
28-
2922
<Step>
3023

31-
### Access Webhooks Section
32-
33-
In the left sidebar of your project settings, locate and click on the
34-
**Webhooks** option.
24+
### Create a New Webhook
3525

36-
</Step>
26+
Click **Create Webhook** and configure:
3727

38-
<Step>
28+
- **Endpoint URL**: `https://your-domain.vercel.app/api/hook`
29+
- **Events**: Select the deployment events you want to receive
3930

40-
### Configure New Webhook
41-
42-
Click the **Create Webhook** button and configure your webhook with:
43-
44-
- **URL**: `https://<your-deployed-url>/api/vercel-webhook`
45-
- Choose which events should trigger the webhook.
31+
Replace `your-domain.vercel.app` with your actual Vercord deployment domain.
4632

4733
</Step>
48-
4934
<Step>
5035

51-
### Save Your Secret
36+
### Save the Secret
5237

53-
Click **Create Webhook** to save your webhook configuration.
38+
After creating the webhook, Vercel will show you a **signing secret**.
5439

55-
<Callout>
56-
Save the secret that Vercel provides you, you will need it for later.
40+
<Callout type="warn">
41+
Copy this secret immediately — you'll need it for the
42+
`WEBHOOK_INTEGRATION_SECRET` environment variable.
5743
</Callout>
5844

5945
</Step>

0 commit comments

Comments
 (0)