🚀 Live Demo 🚀
Book Explorer is a full-stack web application that scrapes book data from an external site, stores it (in JSON or MongoDB), and provides a searchable and browsable interface for customers.
book-explorer/
│── scraper/ # Node.js + Axios + Cheerio scraper script
│── backend/ # Express.js backend (API + MongoDB or JSON storage)
│── frontend/ # React + Vite frontend (book explorer UI)
cd scraper
npm install- Create a
.envfile (optional, for MongoDB connection) → see.env.example. - Run the scraper:
node scraper.jsThis will create a books.json file in /scraper.
If MONGO_URI is provided, data will also be upserted into MongoDB.
cd backend
npm install- Create a
.envfile (optional) → see.env.example. - Run the server:
node index.js👉 API will be served at: http://localhost:5000
cd frontend
npm install
npm run dev👉 Open the Vite dev server (usually http://localhost:5173).
GET /api/books→ Fetch all booksPOST /api/refresh→ Trigger scraper (only works if Node + paths are configured)
- If you don’t configure MongoDB, the backend will read from
scraper/books.json. - The project is modular — scraper, backend, and frontend can run independently.
- Built with:
- Scraper: Node.js, Axios, Cheerio
- Backend: Express.js, MongoDB (optional)
- Frontend: React (Vite, Tailwind optional)
MIT
