Learn how to add a Semantic Search UI to your Next.js application with Inngest and Neon
Add a semantic search in our Next.js CRM application using Neon and Inngest.
Inngest will generate and store embeddings every time a contact is created.
Before you begin, ensure you have:
If you do not have one already, create a Neon project:
To create the database and tables, first, clone the repository:
git clone git@github.com:inngest/nextjs-inngest-neon-auto-embeddings.git
Then, install the dependencies:
cd nextjs-inngest-neon-auto-embeddings
npm install
Create a .env.local file with the following variables:
DATABASE_URL=<your-neon-database-url>
Finally, run the drizzle migrations:
npx drizzle-kit generate
npx drizzle-kit migrate
You Neon database is now ready to work with your application.
The Inngest Integration relies on Neon’s Logical Replication feature to get notified upon database changes.
Navigate to your Neon Project using the Neon Console and open the Settings > Logical Replication page. From here, follow the instructions to enable Logical Replication:

Your Neon database is now ready to work with Inngest.
To configure the Inngest Neon Integration, navigate to the Inngest Platform, open the Integrations page, and follow the instructions of the Neon Integration installation wizard:

The Inngest Integration requires Postgres admin credentials to complete its setup. These credentials are not stored and are only used during the installation process.

You can find your admin Postgres credentials in your Neon project dashboard’s Connection Details section:

Using the following button to create a new Vercel project using this repository:
Once your Vercel project is deployed, navigate to the Inngest Vercel Integration page and click Connect Account.
Once your Vercel project is connected, navigate to your Environment Variables page and add the following variables:
OPENAI_API_KEY - Your OpenAI API keyDATABASE_URL - Your Neon database URLYou application is now deployed on Vercel, properly linked to Neon and Inngest!
Licensed under the Apache License.