This project is a full-stack application for managing books using React for the frontend, Express with MongoDB for the backend, and storing book images as BLOBs in the database.
- CRUD operations for books (Create, Read, Update, Delete)
- Image uploads for book covers stored as BLOBs in MongoDB
- Responsive UI with React and Tailwind CSS
- Frontend: React, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB (using Mongoose for ODM)
- File Storage: Storing book images as BLOBs in MongoDB
- Other Tools: Axios for API requests, Multer for handling file uploads
To get a local copy of the project up and running, follow these steps:
- Node.js installed on your machine
- MongoDB installed locally or access to a MongoDB instance (local or cloud)
-
Clone the repository:
git clone https://github.com/SudeepMi/react-node-crud.git cd react-node-crud
-
Install frontend and backend dependencies:
# Install backend dependencies cd server npm install # Install frontend dependencies cd ../frontend npm install
-
Make sure MongoDB is running either locally or accessible remotely.
-
Create a MongoDB database and configure connection settings in
backend/index.js
.
-
Start the backend server (from
backend
directory):npm start
The server will run on
http://localhost:3000
by default. -
Start the frontend development server (from
frontend
directory):npm start
The frontend will run on
http://localhost:5173
by default. -
Open your browser and navigate to
http://localhost:5173
to view the application.
- Click on the "Add Book" button.
- Fill in the book details and select an image file for the book cover.
- Click "Add" to save the book.
- Navigate to the book you want to update.
- Click on the "Update" button.
- Modify the book details or update the book cover image.
- Click "Update" to save the changes.
- Navigate to the book you want to delete.
- Click on the "Delete" button.
- Confirm the deletion when prompted.
Contributions are welcome! Fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.