Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions docs/references/v2.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6394,7 +6394,8 @@
"examples": {
"example": {
"value": {
"expirationIn": "3 days"
"expirationIn": "3 days",
"newKeyExpirationIn": "30 days"
}
}
}
Expand Down Expand Up @@ -11174,11 +11175,37 @@
"7 days"
],
"default": "now"
},
"newKeyExpirationIn": {
"type": "string",
"enum": [
"now",
"1h",
"1hour",
"1 hour",
"24hrs",
"24hours",
"24 hours",
"3d",
"3days",
"3 days",
"7d",
"7days",
"7 days",
"30d",
"30days",
"30 days",
"1y",
"1year",
"1 year",
"one year"
]
}
},
"additionalProperties": false,
"example": {
"expirationIn": "3 days"
"expirationIn": "3 days",
"newKeyExpirationIn": "30 days"
}
},
"RollProjectSecretApiKeyResponse": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ async function createPlaceholderComment({
content: [
{
type: "paragraph",
children: [{ text: "Placeholder for a feed" }],
children: [{ text: "Thinking…" }],
},
],
},
Expand Down
10 changes: 9 additions & 1 deletion examples/nextjs-linear-like-issue-tracker/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# Liveblocks secret key retrieved here: https://liveblocks.io/dashboard/apikeys
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=

# https://liveblocks.io/dashboard/webhooks — one endpoint: /api/liveblocks-webhook
# (storageUpdated + commentCreated). Secret must match that endpoint.
LIVEBLOCKS_WEBHOOK_SECRET_KEY=

# https://platform.claude.com/settings/keys
ANTHROPIC_API_KEY=

30 changes: 28 additions & 2 deletions examples/nextjs-linear-like-issue-tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Users can create issues with a rich-text editor, giving them priorities,
progress state, and labels. Comments can be left on issues and users receive
notifications if they've been mentioned.

You can optionally enable an AI assistant that you can mention it comments and
will stream in replies. The assistant can create new issues, and edit the
current issue, showing AI presence as it works.

<img src="https://raw.githubusercontent.com/liveblocks/liveblocks/main/.github/assets/examples/linear-like-issue-tracker.png" width="536" alt="Issue tracker" />

## Getting started
Expand All @@ -40,6 +44,30 @@ This will download the example and ask permission to open your browser, enabling
you to automatically get your API key from your
[liveblocks.io](https://liveblocks.io) account.

### Setting up webhooks

You need to set up webhooks to use all features in this example.

- Follow our guide on
[testing webhooks locally](https://liveblocks.io/docs/guides/how-to-test-webhooks-on-localhost),
making sure to
[check the “**commentCreated**” and “**storageUpdated**” events](https://liveblocks.io/docs/platform/webhooks#edit-endpoint-events)
when creating the webhook
- In the webhooks dashboard, point to the `/api/liveblocks-webhook` path
- Copy your **webhook secret key** from the webhooks dashboard
- Add your webhook secret key to `.env.local` as the
`LIVEBLOCKS_WEBHOOK_SECRET_KEY` environment variable

### Setting up Anthropic

You need your own Anthropic API key to run the AI agent.

- Create an account on [Anthropic](https://anthropic.com)
- Create a new API key from the
[Anthropic Dashboard](https://platform.claude.com/settings/keys)
- Add your Anthropic API key to `.env.local` as the `ANTHROPIC_API_KEY`
environment variable

### Manual setup

<details><summary>Read more</summary>
Expand All @@ -56,8 +84,6 @@ Alternatively, you can set up your project manually:
`LIVEBLOCKS_SECRET_KEY` environment variable
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)

</details>

### Dev server setup

<details><summary>Read more</summary>
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-linear-like-issue-tracker/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { NextConfig } from "next";

const nextConfig: NextConfig = {
turbopack: { root: __dirname },
allowedDevOrigins: ["*.ngrok-free.app", "*.ngrok.io", "*.loca.lt"],
};

export default nextConfig;
Loading
Loading