This project is a Full Stack Next.js-based chat gpt clone using modern technologies and APIs for a seamless chat experience.
- Next.js 14: React framework for building server-rendered applications.
- Shadcn: Custom CSS framework for styling components.
- Tailwind CSS: Utility-first CSS framework for rapid UI development.
- GROQ: Query language for accessing data from Sanity.io API.
- Vercel AI SDK: SDK for integrating AI-powered chat streaming from Vercel.
- Auth.js v5: Library for Google Authentication.
- Prisma: Database toolkit for Node.js and TypeScript.
- Zustand: Minimalistic state management for React.
- Node.js version 20.9.0+ required.
To clone the repository, run the following command:
git clone https://github.com/himanshu064/ai-chatbot.git
cd ai-chatbot
-
Generate Environment Keys:
- Generate necessary keys and tokens for the
.env
file.
- Generate necessary keys and tokens for the
-
Set up Database URI:
- Obtain a database URI (e.g., from https://neon.tech/) and set it as
DATABASE_URL
in.env
.
- Obtain a database URI (e.g., from https://neon.tech/) and set it as
-
Configure Google Authentication:
- Create a project on https://console.cloud.google.com/.
- Generate
GOOGLE_CLIENT_ID
andGOOGLE_CLIENT_SECRET
and add them to.env
.
-
Set up GROQ API Key:
- Create a GROQ keyand set it as
GROQ_CLOUD_API_KEY
in.env
.
- Create a GROQ keyand set it as
-
Install Dependencies:
-
Install project dependencies using npm:
npm install
-
-
Generate Prisma Client:
-
Generate Prisma client using:
npm run prisma-generate
-
-
Run Development Server:
-
Start the development server:
npm run dev
-
This project aims to demonstrate the integration of AI-powered chat capabilities, Google Authentication, and modern state management and UI frameworks within a Next.js application.