Skip to content

MSohailShahzad1/Book-Finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Book Finder with Borrowability

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

πŸš€ Features

βœ… 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


πŸ› οΈ Tech Stack

Frontend

  • βš›οΈ React + Vite
  • 🎨 Tailwind CSS + ShadCN UI + Lucide Icons
  • πŸ”” React Toastify (notifications)
  • πŸŒ™ Dark Mode support

Backend

  • 🟒 Node.js + Express
  • πŸƒ MongoDB (via Mongoose)
  • πŸ” JWT Authentication
  • 🌍 Google Books API + Open Library API integration

Deployment

  • 🎯 Frontend β†’ Vercel
  • 🎯 Backend β†’ Railway
  • 🎯 Database β†’ MongoDB Atlas

πŸ“‚ Project Structure

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

⚑ Getting Started

1️⃣ Clone Repo

git clone https://github.com/<MSohailShahzad1>/book-finder.git
cd book-finder

2️⃣ Setup Backend

cd backend
npm install

Create 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_key

Run backend:

npm run dev

3️⃣ Setup Frontend

cd frontend
npm install

Create a .env file inside frontend/ with:

VITE_API_BASE_URL=http://localhost:3000/api

Run frontend:

npm run dev

🌐 API Endpoints

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

πŸ“Έ Screenshots

Home Page Search Page Register Page Login Page Book Detail Page My Library Page

🚧 Roadmap

  • 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

🀝 Contributing

Contributions are welcome! Fork the repo, make your changes, and submit a pull request.


πŸ“œ License

MIT License Β© 2025 [Muhammad Sohail Shahzad]


About

Find, explore, and save your favorite books – MERN stack app with advanced search and user authentication.πŸ”— **Live Demo:** [Book Finder App]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages