A full-stack Bookstore application built using the MERN stack (MongoDB, Express.js, React.js, Node.js).
It provides users with a simple interface to manage a collection of books through full CRUD operations.
- β Add a new book with title, author, description, price, and year
- π List all books in the database
- π View details of a specific book by ID
- βοΈ Update book information
- β Delete a book from the collection
- π RESTful API integration
- βοΈ Responsive frontend using React and Tailwind CSS
| Layer | Technology |
|---|---|
| Frontend | React.js, Tailwind CSS |
| Backend | Node.js, Express.js |
| Database | MongoDB (via Mongoose) |
| Tools | Postman, MongoDB Compass |
bookstore-app/ βββ backend/ β βββ models/ β βββ routes/ β βββ controllers/ β βββ server.js βββ frontend/ β βββ src/ β β βββ components/ β β βββ App.jsx βββ README.md
git clone https://github.com/your-username/mern-bookstore.git
cd mern-bookstore
### 2. Start the Backend
cd backend
npm install
npm start
Ensure MongoDB is running locally at: mongodb://localhost:27017/BookApp
### 3. Start the Frontend
cd ../frontend
npm install
npm start
## API Endpoints
| Method | Endpoint | Description |
| ------ | ------------ | -------------- |
| GET | `/books` | Get all books |
| GET | `/books/:id` | Get book by ID |
| POST | `/books` | Add a new book |
| PUT | `/books/:id` | Update a book |
| DELETE | `/books/:id` | Delete a book |