AI Booking Assistant with EdgeDB and Vercel AI SDK
You can clone the repository by running the following command:
git clone https://github.com/beerose/edgedb-ai-booking-assistant.git
After cloning the repository, you can navigate to the project directory:
cd edgedb-ai-booking-assistant
This project uses EdgeDB as a database. You can install it by following the instructions:
After installing the CLI, you can initialize the project by running the following command:
edgedb project init
Next, you can apply the schema migrations by running the following command:
edgedb migration apply
This project uses pnpm as a package manager, but you can use npm
or yarn
if you prefer.
You can install the dependencies by running the following command:
pnpm install
To seed the database with some initial data, you can run the following command:
pnpm seed
This project uses OpenAI GPT-4 to generate the responses. You can create an account and get the API key from the OpenAI website. After getting the API key, you can create a .env.local
file in the root of the project and add the following environment variable:
OPENAI_API_KEY=your-api-key
To generate the types for the EdgeDB schema, you can run the following command:
pnpm generate:all
It runs npx @edgedb/generate interfaces
and npx @edgedb/generate edgeql-js
to generate the types. You can also run these commands separately if you want.
You will find the generated types in the dbschema
directory.
First, run the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
To learn more about the stack used in this project, take a look at the following resources: