Skip to content

Commit 99ee6be

Browse files
committed
nextjs starter
1 parent 8befcff commit 99ee6be

File tree

6 files changed

+43
-23
lines changed

6 files changed

+43
-23
lines changed

examples/nextjs/.env.Example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Restack
2+
3+
RESTACK_ENGINE_ID=
4+
RESTACK_ENGINE_ADDRESS=
5+
RESTACK_ENGINE_API_KEY=
6+
7+
RESTACK_CLOUD_TOKEN=

examples/nextjs/README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,30 @@ You can start editing the page by modifying `app/page.tsx`. The page auto-update
2020

2121
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.
2222

23-
## Learn More
23+
# Install Restack Web UI
2424

25-
To learn more about Next.js, take a look at the following resources:
25+
To install the Restack Web UI, you can use Docker.
26+
```
27+
docker run -d --pull always --name studio -p 5233:5233 -p 6233:6233 -p 7233:7233 ghcr.io/restackio/restack:main
28+
```
29+
# Schedule Restack workflow from NextJS frontend
30+
31+
The example is a NextJS application with front and backend. You can schedule the workflow example from the user interface.
32+
33+
![Example UI](./restack-examples-ts-nextjs.png)
34+
35+
When the client successfully schedules the workflow, you can see the started workflow in the Restack Web UI. You should see the following screen:
36+
37+
![Success Web UI](./restack-examples-ts-nextjs-web-ui.png)
38+
39+
Now you can add a backend to the example. In other examples, you can see how to ideally structure the backend app with workflows, functions and services.
40+
41+
## Deploy on Restack
2642

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.
43+
To deploy this Next.js application on Restack, you can use the provided `restack_up.mjs` script. This script utilizes the Restack Cloud SDK to define and deploy your application stack. It sets up the necessary environment variables and configures the Next.js application for deployment.
2944

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
45+
To get started, ensure you have the required Restack Cloud credentials and environment variables set up. Then, run the script to initiate the deployment process.
3146

32-
## Deploy on Vercel
47+
For more detailed information on deploying your repository to Restack, refer to the [Restack Cloud deployment documentation](https://docs.restack.io/restack-cloud/deployrepo).
3348

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.
3549

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

examples/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"clean": "rm -rf node_modules"
1111
},
1212
"dependencies": {
13-
"@restackio/ai": "^0.0.75",
13+
"@restackio/ai": "^0.0.80",
1414
"next": "14.2.13",
1515
"react": "^18",
1616
"react-dom": "^18"

examples/nextjs/pnpm-lock.yaml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
206 KB
Loading
154 KB
Loading

0 commit comments

Comments
 (0)