Skip to content

AI book explorer : Chat with an AI Agent to get book recommendations or summaries and add books using LangGraph + CopilotKit

Notifications You must be signed in to change notification settings

devdignesh/ai-book-explorer

Repository files navigation

AI Book Explorer

A smart book explorer app where users can ask AI to recommend and automatically save books, or manually add them to database. Built to manage large data with client-side and Redux-powered state management.


🎥 Demo Video

https://www.loom.com/share/65a800b20b584cada072705f110ebcb9?sid=60d6cb73-ef0c-4ad2-ad1d-cd9a4e54a6bf


🔧 Tech Stack

  • Next.js 14 (App Router)
  • TypeScript
  • Tailwind CSS
  • Redux Toolkit (state management)
  • MongoDB + Prisma
  • LangGraph + CopilotKit (AI integration)
  • Clerk (Authentication)

✨ Features

  • 🔍 AI-powered book recommendations
  • 📚 Save books automatically through chat
  • 📝 Manually add books via a simple form
  • 🔁 Real-time updates on new entries
  • 💾 Data stored securely in MongoDB with prisma
  • 🔐 Authentication with Clerk (optional, not required to use the app)

🚀 Setup & Installation

  1. Clone the repository

    git clone https://github.com/devdignesh/ai-book-explorer
    cd ai-book-explorer
    
  2. Install dependencies

     npm install
    
  3. Configure environment variables

    Create a .env file in the root directory and add:

      DATABASE_URL="your-mongodb-uri"
      OPENAI_API_KEY="your-openai-api-key"
      NEXT_PUBLIC_COPILOT_CLOUD_PUBLIC_API_KEY="your-copilotkit-public-api-key"
    
  4. Generate Prisma Client

    npx prisma generate
  5. Run migrations and seed the database

    npx prisma migrate dev --name init
    npm run db:seed
  6. Start the development server

    npm run dev

    Visit http://localhost:3000


API Endpoints

/api/book

  • GET: Fetch all books
  • POST: Adds a new book ( title, author, genre, year, etc.)

/api/copilotkit

  • POST: Handles AI chat via CopilotKit + OpenAI

About

AI book explorer : Chat with an AI Agent to get book recommendations or summaries and add books using LangGraph + CopilotKit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published