A modern, personalized book discovery application built with the MERN stack (MongoDB, Express.js, React.js, Node.js). Features include book searching, saving, personal notes, and an AI-powered chatbot assistant for recommendations. Features
- Advanced book search using OpenLibrary API
- User authentication and account management
- Personal book collection management
- Note-taking functionality for saved books
- book recommendation chatbot
Responsive, user-friendly interface
- Frontend: React.js, Apollo Client, React Bootstrap
- Backend: Node.js, Express.js, GraphQL, Apollo Server
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- APIs: OpenLibrary API
- Chatbot: FastAPI, Python
Clone the repository:
git clone [repository-url]
cd book-search
Install dependencies:
npm install
cd client
npm install
cd ../server
npm install
Create a .env file in the server directory:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
cd server/chatbot
python -m venv venv
source venv/bin/activate
Please check requirements.txt
venv\Scripts\activate
pip install <requirements.txt>
Start the development servers:
Start main application (from root directory)
npm run develop
cd server/chatbot python -m uvicorn main:app --reload --port 8000
- Main application: http://localhost:3000
- GraphQL playground: http://localhost:3001/graphql
- Chatbot API: http://localhost:8000
Book Search
- Search by title, author, or keywords
- View detailed book information
- Save books to personal collection
- Personal Notes
mutation AddBookNote($bookId: String!, $note: String!) {
addBookNote(bookId: $bookId, note: $note) {
savedBooks {
bookId
notes {
content
createdAt
}
}
}
}
Get book recommendations Ask about specific books Receive personalized suggestions
OpenLibrary API The application uses OpenLibrary's search API: https://openlibrary.org/search.json?q={searchTerm}
GraphQL Endpoints
Search books
query SearchBooks($searchTerm: String!) {
searchBooks(searchTerm: $searchTerm) {
books {
bookId
title
authors
description
}
}
}
mutation SaveBook($bookInput: SaveBookInput!) {
saveBook(book: $bookInput) {
_id
savedBooks {
bookId
title
}
}
}
Fork the repository Create a feature branch Commit your changes Push to the branch Submit a pull request
- OpenLibrary API for book data
- Original MERN project creators
- MongoDB Atlas for database hosting
Shefreen Kaur
Contact
GitHub: shefreenkaur Email: shefreenkaur@gmail.com