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.
https://www.loom.com/share/65a800b20b584cada072705f110ebcb9?sid=60d6cb73-ef0c-4ad2-ad1d-cd9a4e54a6bf
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- Redux Toolkit (state management)
- MongoDB + Prisma
- LangGraph + CopilotKit (AI integration)
- Clerk (Authentication)
- 🔍 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)
-
Clone the repository
git clone https://github.com/devdignesh/ai-book-explorer cd ai-book-explorer -
Install dependencies
npm install
-
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"
-
Generate Prisma Client
npx prisma generate
-
Run migrations and seed the database
npx prisma migrate dev --name init npm run db:seed
-
Start the development server
npm run dev
Visit http://localhost:3000
/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