Skip to content

AI-powered book recommendation chatbot using Gemini API. Sign in with Google, chat naturally, and discover books tailored to your interests. Built with Next.js, Tailwind, and NextAuth.

License

Notifications You must be signed in to change notification settings

sofiahernandes/gemini-book-chatbot

Repository files navigation

📚 Gemini Book Chatbot

AI-powered chatbot that recommends books using Gemini API, with Google authentication
Report Bug | Request Feature



🚀 Tech Stack

  • Gemini API – AI book recommendation chatbot agent (Bookie <3)
  • Next.js, TypeScript & Tailwind CSS
  • NextAuth – Auth with Google OAuth

✨ Features

📚 Smart book recommendations using Gemini
🔐 Google login with NextAuth
🧠 Personalized chatbot responses
📄 Environment variable support
💻 Fully responsive (mobile + desktop)

🛠️ Getting Started

Prerequisites


  1. Clone the Repository
git clone https://github.com/sofiahernandes/gemini-book-chatbot.git
cd gemini-book-chatbot
  1. Install Dependencies
npm install
# or
yarn install
  1. Set Up Environment Variables Create a .env.local file 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=

🔑 How to Get Your Google OAuth Credentials

  1. Go to Google Cloud Console

  2. Create a new project or select an existing one

  3. Navigate to APIs & Services > Credentials

  4. Click Create Credentials > OAuth 2.0 Client IDs

  5. Set the application type to Web Application

  6. Under “Authorized redirect URIs”, add: http://localhost:3000/api/auth/callback/google

  7. Copy the Client ID and Client Secret into your .env.local file as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET

  8. For NEXTAUTH_SECRET, generate a secret running in your Git Bash:
    openssl rand -base64 32


  1. Start the Development Server
npm run dev
# or
yarn dev

🤝 Contributing

Contributions are what make the open-source community amazing. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/my-feature)
  3. Commit your Changes (git commit -m 'Add some feature')
  4. Push to the Branch (git push origin feature/my-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License.
You are free to use, modify, and share this project — just give proper credit!



📩 Let's connect!

About

AI-powered book recommendation chatbot using Gemini API. Sign in with Google, chat naturally, and discover books tailored to your interests. Built with Next.js, Tailwind, and NextAuth.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published