Skip to content
Open
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
6 changes: 6 additions & 0 deletions examples/nextjs-blog-cms/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
INNGEST_EVENT_KEY=<https://www.inngest.com/docs/events/creating-an-event-key>
INNGEST_SIGNING_KEY=<https://www.inngest.com/docs/platform/signing-keys>
OPENAI_API_KEY=
OPENAI_MODEL=gpt-3.5-turbo
4 changes: 2 additions & 2 deletions examples/nextjs-blog-cms/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NEXT_PUBLIC_SUPABASE_URL=<SUBSTITUTE_SUPABASE_URL>
NEXT_PUBLIC_SUPABASE_ANON_KEY=<SUBSTITUTE_SUPABASE_ANON_KEY>
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
INNGEST_EVENT_KEY=<https://www.inngest.com/docs/events/creating-an-event-key>
INNGEST_SIGNING_KEY=<https://www.inngest.com/docs/platform/signing-keys>
OPENAI_API_KEY=
Expand Down
20 changes: 13 additions & 7 deletions examples/nextjs-blog-cms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,23 @@ pnpm --ignore-workspace i

### 2. Database setup

This project needs a database to store the blog posts and workflows.
This project needs a database to store the blog posts and workflows using Supabase.

Follow the below steps to get a database up and running with Supabase:

1. Go to [your Supabase Dashboard](https://supabase.com/dashboard/projects) and create a new project
1. While your database is being created, update your `.env.local` and fill the `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY`
1. Open the SQL Editor from the left side navigation, and copy the content of the `examples/nextjs-blog-cms/supabase/schema.sql` file
1. Still in the SQL Editor, create a new snippet and do the same with the `examples/nextjs-blog-cms/supabase/seed.sql` file
1. Navigate to the Table Editor, you should see two tables: `blog_posts` and `workflows`
1. Install Supabase CLI

You are all set, your database is ready to be used!
```
npm install -g supabase
```

2. Create a new project

```
supabase start
```

3. Copy the `.env.example` file to `.env` and fill the `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` with the values given by Supabase.

### 3. Starting the application

Expand Down
Loading