A full-stack bookstore web application built with React (Frontend) and Node.js with Express (Backend).
Follow the steps below to set up and run the project locally.
git clone https://github.com/your-username/bookstore.git
cd bookstore- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
- The frontend will be available at
http://localhost:5173(or as specified in your project).
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Importing Books Data to MongoDB:
The books data is stored in a JSON file named
Books.jsonwithin the backend folder. To run the project locally, you need to import thisBooks.jsonfile into your own MongoDB database. You can use MongoDB Compass or any other MongoDB tool to import the Books.json file. After importing, you should use your own MongoDB connection URL. -
Update MongoDB URL:
In the backend folder, open the index.js file. Update the MongoDB connection URL with your own MongoDB URL where you imported the Books.json data.
-
Start the backend server:
node index.js
-
The backend will be running at
http://localhost:3000(or your configured port).
- Browse books
- Search for books
- Add books to cart
- User authentication