No License Used
This project was created to understand the MERN stack's basic CRUD operations, face more problems, and gain experience.
- Create a MongoDB connection from the MongoDB website.
- Clone my repository.
- Navigate to the
backendfolder in your code editor terminal. - Create a config file called
config.jsin the root of thebackendfolder and definePORTandmongoDBURL. For example:export const PORT = 5555; export const mongoDBURL = 'mongodb+srv://**********:******@*************.mongodb.net/**************/*****************************&*************' - In your
backendfolder, typenpm install. After that, typenpm run dev. - Next, navigate to the
frontendfolder from your terminal and typenpm install. After that, typenpm run dev.
After running the book store project, you will see the table view (home page). If you run this project for the first time, you will see an empty table. Follow these steps to manage your books:
-
Add a Book:
- Click the plus icon in the top right corner to navigate to the "Create Book" page.
- Fill in the book name, author, and publish year to create a new book.
- After creating a new book, you will be redirected to the home page where the new book will be listed.
-
Switch Views:
- At the top center of the home page, there are two buttons: "Table" and "Card".
- The default view is the table. Click the "Card" button to see your added books in card view.
-
Edit a Book:
- Both the card and table views have edit icons.
- Click the edit icon to navigate to the edit book page.
- Make the necessary changes to the book details and save them.
-
Delete a Book:
- Both the card and table views have delete icons.
- Click the delete icon to navigate to the delete book page.
- Confirm the deletion to remove the book from the list.
-
Navigate Back:
- Each page (except the home page) has a back button to navigate to the previously opened page.
To get the MongoDB URL:
- Log in to your MongoDB account at MongoDB website.
- Create a new cluster or select an existing one.
- In the cluster view, click on the "Connect" button.
- Select "Connect your application" from the options.
- Copy the provided connection string (MongoDB URL).
Happy Coding :)





