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
20 changes: 0 additions & 20 deletions docs/pages/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,26 +117,6 @@ forms, 3D files, video editors, design files, presentations, and more.
Primitives are the building blocks available inside rooms that make multiplayer
possible at scale: Presence, Broadcast, Storage, Feeds, Threads.

<ListGrid columns={2}>
<DocsCardFeature
feature="presence"
href="/docs/realtime-infrastructure/presence"
/>
<DocsCardFeature
feature="broadcast"
href="/docs/realtime-infrastructure/broadcast"
/>
<DocsCardFeature
feature="storage"
href="/docs/realtime-infrastructure/storage"
/>
<DocsCardFeature feature="feeds" href="/docs/realtime-infrastructure/feeds" />
<DocsCardFeature
feature="threads"
href="/docs/realtime-infrastructure/threads"
/>
</ListGrid>

## Collaboration features

With Liveblocks, you can build all sorts of collaboration features. Most of
Expand Down
15 changes: 15 additions & 0 deletions docs/pages/platform/management-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,21 @@ jobs:
-H "Content-Type: application/json"
```

### Filter projects by name

Use the optional `query` parameter with the `name` field to list projects whose
name exactly matches the provided value. Matching is case-sensitive, and project
names are not unique, so the response may contain multiple projects. Pagination
applies to the filtered results.

```bash
# >_ terminal
curl --get "https://api.liveblocks.io/v2/management/projects" \
-H "Authorization: Bearer lbs_*******************" \
-H "Content-Type: application/json" \
--data-urlencode 'query=name:"My Project"'
```

## Rate limiting

The Management API enforces rate limits to ensure fair usage and system
Expand Down
11 changes: 10 additions & 1 deletion docs/references/v2.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6874,9 +6874,18 @@
"get": {
"summary": "List projects",
"x-badge": "Beta",
"description": "Returns a paginated list of projects. You can limit the number of projects returned per page and use the provided `nextCursor` for pagination. This endpoint requires the `read:all` scope.",
"description": "Returns a paginated list of projects. You can filter by exact, case-sensitive project name using the `query` parameter. Project names are not unique, so multiple projects can match. You can limit the number of projects returned per page and use the provided `nextCursor` for pagination. This endpoint requires the `read:all` scope.",
"tags": ["Management"],
"parameters": [
{
"schema": {
"type": "string",
"description": "A query to filter projects by exact, case-sensitive name.",
"example": "name:\"Frimousse\""
},
"in": "query",
"name": "query"
},
{
"schema": {
"type": "integer",
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-3d-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start"
},
Expand Down
7 changes: 4 additions & 3 deletions examples/nextjs-3d-builder/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ function App({ Component, pageProps }) {
const roomId = useExampleRoomdId("nextjs-3d-builder");

return (
<LiveblocksProvider
publicApiKey={process.env.NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY}
>
<LiveblocksProvider
publicApiKey={process.env.NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY}
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
>
<RoomProvider id={roomId} initialStorage={{ colors: new LiveObject() }}>
<Head>
<title>Liveblocks</title>
Expand Down
6 changes: 3 additions & 3 deletions examples/nextjs-ai-elements-realtime/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions examples/nextjs-connection-status/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider`
- Replace `publicApiKey` in `LiveblocksProvider` with `"pk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to
[http://localhost:3000](http://localhost:3000)

This starts a local server and configures the example with
`http://localhost:1153` and `pk_localdev`.

</details>

Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-connection-status/app/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export function Providers({ children }: PropsWithChildren) {
return (
<LiveblocksProvider
publicApiKey={process.env.NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY as string}
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
throttle={16}
// Try changing the lostConnectionTimeout value to increase
// or reduct the time it takes to reconnect
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-connection-status/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start",
"lint": "next lint"
Expand Down
9 changes: 5 additions & 4 deletions examples/nextjs-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider`
- Replace `publicApiKey` in `LiveblocksProvider` with `"pk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to
[http://localhost:3000](http://localhost:3000)

This starts a local server and configures the example with
`http://localhost:1153` and `pk_localdev`.

</details>

Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start"
},
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-dashboard/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function App({ Component, pageProps }: AppProps) {
return (
<LiveblocksProvider
publicApiKey={process.env.NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY!}
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
>
<RoomProvider
id={roomId}
Expand Down
4 changes: 3 additions & 1 deletion examples/nextjs-flowchart-builder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions examples/nextjs-form/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider` and
`new Liveblocks`
- Replace `secret` in `new Liveblocks` with `"sk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to [http://localhost:3000](http://localhost:3000)

This starts a local server, configures the example with
`http://localhost:1153` and `sk_localdev`, and runs Next.js. Its data is kept
in `.liveblocks/` between runs.

</details>

Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start"
},
Expand Down
5 changes: 4 additions & 1 deletion examples/nextjs-form/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ function App({ Component, pageProps }: AppProps) {
const roomId = useExampleRoomId("liveblocks:examples:nextjs-form");

return (
<LiveblocksProvider authEndpoint="/api/liveblocks-auth">
<LiveblocksProvider
authEndpoint="/api/liveblocks-auth"
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
>
<RoomProvider
id={roomId}
initialPresence={{ focusedId: null }}
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-form/pages/api/liveblocks-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { NAMES } from "../../constants";

const liveblocks = new Liveblocks({
secret: process.env.LIVEBLOCKS_SECRET_KEY!,
baseUrl: process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL,
});

export default async function auth(req: NextApiRequest, res: NextApiResponse) {
Expand Down
9 changes: 4 additions & 5 deletions examples/nextjs-live-avatars-advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider` and
`new Liveblocks`
- Replace `secret` in `new Liveblocks` with `"sk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to [http://localhost:3000](http://localhost:3000)

This starts a local server and configures the example with
`http://localhost:1153` and `sk_localdev`.

</details>

Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-live-avatars-advanced/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start"
},
Expand Down
5 changes: 4 additions & 1 deletion examples/nextjs-live-avatars-advanced/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import Head from "next/head";

function MyApp({ Component, pageProps }: AppProps) {
return (
<LiveblocksProvider authEndpoint="/api/liveblocks-auth">
<LiveblocksProvider
authEndpoint="/api/liveblocks-auth"
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
>
<Head>
<title>Liveblocks</title>
<meta name="robots" content="noindex" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { NextApiRequest, NextApiResponse } from "next";

const liveblocks = new Liveblocks({
secret: process.env.LIVEBLOCKS_SECRET_KEY!,
baseUrl: process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL,
});

export default async function auth(req: NextApiRequest, res: NextApiResponse) {
Expand Down
9 changes: 4 additions & 5 deletions examples/nextjs-live-avatars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider` and
`new Liveblocks`
- Replace `secret` in `new Liveblocks` with `"sk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to [http://localhost:3000](http://localhost:3000)

This starts a local server and configures the example with
`http://localhost:1153` and `sk_localdev`.

</details>

Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-live-avatars/app/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export function Providers({ children }: PropsWithChildren) {
return (
<LiveblocksProvider
authEndpoint="/api/liveblocks-auth"
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
resolveUsers={async ({ userIds }) => {
const searchParams = new URLSearchParams(
userIds.map((userId) => ["userIds", userId])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { getRandomUser, getUser } from "../../../database";

const liveblocks = new Liveblocks({
secret: process.env.LIVEBLOCKS_SECRET_KEY!,
baseUrl: process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL,
});

export async function POST(request: NextRequest) {
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-live-avatars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start"
},
Expand Down
9 changes: 4 additions & 5 deletions examples/nextjs-live-cursors-advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider` and
`new Liveblocks`
- Replace `secret` in `new Liveblocks` with `"sk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to [http://localhost:3000](http://localhost:3000)

This starts a local server and configures the example with
`http://localhost:1153` and `sk_localdev`.

</details>

Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-live-cursors-advanced/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start"
},
Expand Down
5 changes: 4 additions & 1 deletion examples/nextjs-live-cursors-advanced/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import Head from "next/head";

function MyApp({ Component, pageProps }: AppProps) {
return (
<LiveblocksProvider authEndpoint="/api/liveblocks-auth">
<LiveblocksProvider
authEndpoint="/api/liveblocks-auth"
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
>
<Head>
<title>Liveblocks</title>
<meta name="robots" content="noindex" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { NextApiRequest, NextApiResponse } from "next";

const liveblocks = new Liveblocks({
secret: process.env.LIVEBLOCKS_SECRET_KEY!,
baseUrl: process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL,
});

export default async function auth(req: NextApiRequest, res: NextApiResponse) {
Expand Down
8 changes: 4 additions & 4 deletions examples/nextjs-live-cursors-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider`
- Replace `publicApiKey` in `LiveblocksProvider` with `"pk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to [http://localhost:3000](http://localhost:3000)

This starts a local server and configures the example with
`http://localhost:1153` and `pk_localdev`.

</details>

Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-live-cursors-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local": "npx liveblocks dev --persist --cmd 'next dev'",
"build": "next build",
"start": "next start"
},
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs-live-cursors-chat/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function App({ Component, pageProps }: AppProps) {
<LiveblocksProvider
throttle={16}
publicApiKey={process.env.NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY!}
baseUrl={process.env.NEXT_PUBLIC_LIVEBLOCKS_BASE_URL}
>
<Head>
<title>Liveblocks</title>
Expand Down
8 changes: 4 additions & 4 deletions examples/nextjs-live-cursors-scroll/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ You can optionally run this example locally using the
[Liveblocks dev server](https://liveblocks.io/docs/tools/dev-server).

- Install the example as detailed above
- Run `npx liveblocks dev` to start the server
- Add `baseUrl: "http://localhost:1153"` option to `LiveblocksProvider`
- Replace `publicApiKey` in `LiveblocksProvider` with `"pk_localdev"`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
- Run `npm run dev:local` and go to [http://localhost:3000](http://localhost:3000)

This starts a local server and configures the example with
`http://localhost:1153` and `pk_localdev`.

</details>

Expand Down
Loading
Loading