AI-powered chatbot that recommends books using Gemini API, with Google authentication
Report Bug
|
Request Feature
- Gemini API – AI book recommendation chatbot agent (Bookie <3)
- Next.js, TypeScript & Tailwind CSS
- NextAuth – Auth with Google OAuth
📚 Smart book recommendations using Gemini
🔐 Google login with NextAuth
🧠 Personalized chatbot responses
📄 Environment variable support
💻 Fully responsive (mobile + desktop)
- Clone the Repository
git clone https://github.com/sofiahernandes/gemini-book-chatbot.git
cd gemini-book-chatbot- Install Dependencies
npm install
# or
yarn install- Set Up Environment Variables
Create a
.env.localfile at the root of your project:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
NEXTAUTH_SECRET=
NEXTAUTH_URL=http://localhost:3000
NODE_TLS_REJECT_UNAUTHORIZED=0 # For local testing only!!
GEMINI_API_KEY=-
Go to Google Cloud Console
-
Create a new project or select an existing one
-
Navigate to APIs & Services > Credentials
-
Click Create Credentials > OAuth 2.0 Client IDs
-
Set the application type to Web Application
-
Under “Authorized redirect URIs”, add: http://localhost:3000/api/auth/callback/google
-
Copy the Client ID and Client Secret into your
.env.localfile asGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET -
For
NEXTAUTH_SECRET, generate a secret running in your Git Bash:
openssl rand -base64 32
- Start the Development Server
npm run dev
# or
yarn devContributions are what make the open-source community amazing. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/my-feature) - Commit your Changes (
git commit -m 'Add some feature') - Push to the Branch (
git push origin feature/my-feature) - Open a Pull Request
This project is licensed under the MIT License.
You are free to use, modify, and share this project — just give proper credit!