You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
Closes KIT-178, KIT-115
### TL;DR
Add Next.js framework support with a working example and update documentation links.
### What changed?
- Added a new `@rivetkit/next-js` package with Next.js integration
- Created a complete Next.js example application in `examples/next-js`
- Updated the GitHub workflow to include templates from examples directory
- Fixed the basePath handling in the core router to support custom API paths
- Updated documentation links throughout the README to point to rivet.gg domain
- Added a pkg.pr.new badge to the README for easy testing
### How to test?
1. Run the Next.js example:
```bash
cd examples/next-js
pnpm install
pnpm dev
```
2. Open http://localhost:3000 to see the counter example
3. Try incrementing the counter and changing the counter name
4. Verify the API routes work correctly at `/api/registry`
### Why make this change?
Next.js is one of the most popular React frameworks, and this integration allows RivetKit to be easily used in Next.js applications. The example demonstrates how to set up actors, create API routes, and use the React hooks in a Next.js environment. This expands RivetKit's framework support and makes it more accessible to developers using Next.js.
Read more about [state](https://www.rivet.gg/docs/actors/state/), [actions](https://www.rivet.gg/docs/actors/actions/), and [events](https://www.rivet.gg/docs/actors/events/).
95
+
Read more about [state](https://rivet.gg/docs/actors/state/), [actions](https://rivet.gg/docs/actors/actions/), and [events](https://rivet.gg/docs/actors/events/).
91
96
92
97
**Step 2**: Setup server
93
98
94
-
_Alternatively, see the [React](https://www.rivet.gg/docs/actors/quickstart/react/) guide which does not require a server._
99
+
_Alternatively, see the [React](https://rivet.gg/docs/actors/quickstart/react/) guide which does not require a server._
@@ -171,63 +176,61 @@ RivetKit provides everything you need to build fast, scalable, and real-time app
171
176
172
177
## Runs Anywhere
173
178
174
-
Deploy RivetKit anywhere - from serverless platforms to your own infrastructure with RivetKit's flexible runtime options. Don't see the runtime you want? [Add your own](https://rivetkit.org/drivers/build).
179
+
Deploy RivetKit anywhere - from serverless platforms to your own infrastructure with RivetKit's flexible runtime options. Don't see the runtime you want? [Add your own](https://rivet.gg/docs/drivers/build-your-own/).
- <imgsrc=".github/media/platforms/vercel.svg"height="16"alt="Vercel" /> [Vercel](https://github.com/rivet-gg/rivetkit/issues/897)*(On The Roadmap)*
182
187
- <imgsrc=".github/media/platforms/aws-lambda.svg"height="16"alt="AWS Lambda" /> [AWS Lambda](https://github.com/rivet-gg/rivetkit/issues/898)*(On The Roadmap)*
Seamlessly integrate RivetKit with your favorite frameworks, languages, and tools. Don't see what you need? [Request an integration](https://github.com/rivet-gg/rivetkit/issues/new).
- <imgsrc=".github/media/platforms/vercel.svg"height="16"alt="AI SDK" /> [AI SDK](https://github.com/rivet-gg/rivetkit/issues/907)*(On The Roadmap)*
213
218
214
219
### Local-First Sync
215
-
- <imgsrc=".github/media/integrations/livestore.svg"height="16"alt="LiveStore" /> [LiveStore](https://github.com/rivet-gg/rivetkit/issues/908)*(Available In July)*
220
+
- <imgsrc=".github/media/integrations/livestore.svg"height="16"alt="LiveStore" /> [LiveStore](https://github.com/rivet-gg/rivetkit/issues/908)*(Available In August)*
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2
+
3
+
## Getting Started
4
+
5
+
First, run the development server:
6
+
7
+
```bash
8
+
npm run dev
9
+
# or
10
+
yarn dev
11
+
# or
12
+
pnpm dev
13
+
# or
14
+
bun dev
15
+
```
16
+
17
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
+
21
+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22
+
23
+
## Learn More
24
+
25
+
To learn more about Next.js, take a look at the following resources:
26
+
27
+
-[Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
+
-[Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
+
30
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31
+
32
+
## Deploy on Vercel
33
+
34
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
+
36
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
0 commit comments