This is a Next.js starter project featuring:
- Prisma: Prisma ORM is an open source Node.js and TypeScript ORM with a readable data model, automated migrations, type-safety, and auto-completion.
- Xata: Xata is a serverless data platform, built on PostgreSQL which provides a full-text and vector search engine, record-level file attachments, table-level aggregations and an optional ask endpoint to engage with with OpenAI's ChatGPT API.
- Clerk: Clerk is a User Management Platform, offering a complete suite of embeddable UIs, flexible APIs, and admin dashboards to authenticate and manage your users.
- Inngest: Inngest is an event-driven durable execution engine that enables you to run reliable code on any platform, including serverless.
How the app works:
- The app features sign in/sign out functionality using Clerk and the avatar of the currently logged user is shown in the top-right corner
- A Clerk protected dashboard route, leading to the messaging UI after successful authentication
- User's messages are sent to/read from Xata using Prisma ORM
- Finally, an Inngest function is responsible for reliably generating an answer to the user's message using OpenAI