π 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
