BookSwapHub is a full-stack platform that enables readers to swap books effortlessly. The application encourages sustainable reading, reduces book acquisition costs, and builds a community of readers who love sharing stories. It integrates advanced features like real-time chat, AI-powered book recommendations, category filtering, return policy, and more.
- Users can securely request and exchange books with others without any financial transactions.
- A return policy ensures fair play and trust.
- Integrated Gemini API to provide personalized book recommendations based on genre preferences.
- Smart AI agent responds to queries like "suggest me fantasy novels" or "books by Orwell".
- Built-in real-time chat system (via Firebase Realtime DB) for:
- Direct messaging with book owners.
- Community chat to engage with other readers.
- Filter books by title or category.
- Intuitive search bar with fast results.
- Sleek, modern, mobile-friendly interface powered by Chakra UI and Mantine UI.
- Clean animations and state indicators for intuitive UX.
- Upload book details with images (front and back covers).
- Manage current holdings, requests, and swap history.
- Return or cancel requests through a robust dashboard.
- Role-based access and strict Firebase + backend rules to protect user and data integrity.
git clone https://github.com/dodomyg/BookSwapHub.git
cd BookSwapHubnpm install
# or
yarn installCreate a .env file in the root with the following keys:
MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret
FIREBASE_API_KEY=your_firebase_key
...
npm startVisit http://localhost:3000 to start using BookSwapHub locally.
- 🔐 Sign Up / Login – Start your book swapping journey.
- 📚 Browse – View all available books or filter by category.
- ✉️ Request – Initiate a book swap with a single click.
- 💬 Chat – Talk directly with the owner or ask in the community chat.
- 🔁 Return – Mark books returned once completed.
- 🧠 Ask AI – Use the smart assistant to get book reviews or suggestions.
Contributions are welcome! 🙌
- Fork the repo
- Create a feature branch
- Commit changes with meaningful messages
- Submit a pull request

