A MERN stack web application that allows users to search, explore, and save their favorite books using the Google Books API and Open Library API. Users can read online (if available), manage favorites with authentication, and browse related or popular books.
π Live Demo: Book Finder App
β User Authentication (JWT-based login & signup) β Search Books via Google Books & Open Library APIs β Book Details Page with description, cover, publish date, authors, etc. β Favorites Management (Save / Remove favorites with persistence in MongoDB) β Read Online option (when available via Google Books API) β Responsive UI (Mobile-friendly using Tailwind CSS + ShadCN components) β Dark Mode support β Popular Books shown on homepage (replaced by search results when user searches) β Related Books on the book details page
- βοΈ React + Vite
- π¨ Tailwind CSS + ShadCN UI + Lucide Icons
- π React Toastify (notifications)
- π Dark Mode support
- π’ Node.js + Express
- π MongoDB (via Mongoose)
- π JWT Authentication
- π Google Books API + Open Library API integration
- π― Frontend β Vercel
- π― Backend β Railway
- π― Database β MongoDB Atlas
Book-Finder/
β
βββ backend/ # Express + MongoDB backend
β βββ controllers/ # Route logic
β βββ models/ # Mongoose schemas
β βββ routes/ # Express routes
β βββ app.js # App entry point
β βββ .env # Environment variables
β
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # UI components (BookCard, Header, etc.)
β β βββ pages/ # Pages (Home, BookDetails, Favorites, Auth, etc.)
β β βββ context/ # Auth context
β β βββ api/axios.js # Axios config
β βββ vite.config.js # Vite config
β
βββ README.md
git clone https://github.com/<MSohailShahzad1>/book-finder.git
cd book-findercd backend
npm installCreate a .env file inside backend/ with:
PORT=5000
MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret
GOOGLE_BOOKS_API_KEY=your_google_api_keyRun backend:
npm run devcd frontend
npm installCreate a .env file inside frontend/ with:
VITE_API_BASE_URL=http://localhost:3000/apiRun frontend:
npm run dev| Method | Endpoint | Description |
|---|---|---|
| GET | /api/books/search/:query |
Search books |
| GET | /api/books/popular-books |
Fetch popular books |
| GET | /api/books/:id |
Fetch single book details |
| GET | /api/favorites |
Get user favorites |
| POST | /api/favorites |
Add/Remove from favorites |
| POST | /api/auth/signup |
Register new user |
| POST | /api/auth/login |
Login user |
- Show related books on book details page
- Advanced filtering (genre, publish year, etc.)
- Borrowability (Open Library integration for availability)
- Pagination + Infinite scroll
- Profile page for users
Contributions are welcome! Fork the repo, make your changes, and submit a pull request.
MIT License Β© 2025 [Muhammad Sohail Shahzad]