BookMate is a MERN-based bookstore application designed for managing a collection of books. It provides full CRUD functionality and features a responsive, interactive interface. Users can browse, add, update, and delete books seamlessly using a modern tech stack.
Goal:
To build a dynamic, full-stack bookstore application using MongoDB, Express.js, React.js, and Node.js.
Objectives:
- Set up a full-stack application using the MERN stack.
- Implement CRUD operations for books using MongoDB.
- Design a responsive frontend with React.js and React Router.
- Connect the frontend to the backend through API endpoints.
- Deploy the application for real-world usage.
-
React.js
- Why?: A JavaScript library for building interactive, component-based user interfaces.
- Use Case: Developing the single-page application for managing books with reusable components.
-
React Router
- Why?: Provides declarative routing for React applications.
- Use Case: Enabling navigation between pages like "Add Book," "Edit Book," and "View Books."
-
Tailwind CSS
- Why?: A utility-first CSS framework for rapidly building modern designs.
- Use Case: Styling the application to be responsive and visually appealing.
-
Axios
- Why?: A promise-based HTTP client for making API requests.
- Use Case: Communicating with the backend API for CRUD operations.
-
Node.js
- Why?: A runtime environment for running JavaScript on the server.
- Use Case: Building the backend server for handling requests and managing APIs.
-
Express.js
- Why?: A fast, unopinionated web framework for Node.js.
- Use Case: Creating RESTful API routes for book management.
-
Mongoose
- Why?: An ODM library for MongoDB to simplify interactions with the database.
- Use Case: Defining schemas and models for managing book data.
- MongoDB
- Why?: A flexible, scalable NoSQL database.
- Use Case: Storing data about books, including title, author, price, and description.
-
Vercel
- Why?: An optimized platform for deploying frontend applications.
- Use Case: Hosting the React.js frontend.
-
Render
- Why?: A cloud platform for deploying backend applications with Node.js.
- Use Case: Hosting the Express.js backend and exposing API endpoints.
This section illustrates the complete workflow for users and admins in the BookMate application, covering key functionalities such as book management, browsing, and user interactions.
This section demonstrates the high-level architecture of the BookMate app, showcasing the interaction between the frontend, backend, and database. It highlights how users perform actions like browsing, adding, and managing books, with all requests processed by the backend and stored in the database.
This project is structured to ensure a systematic and incremental development process. Each week builds upon the previous deliverables, enabling a smooth transition from basic functionalities to advanced features.
NOTE: Participants are encouraged to customize the user interface and incorporate additional features into the application. These modifications allow participants to demonstrate creativity, improve usability, and enhance the functionality of the project. Such enhancements align with the project’s objective of fostering innovative thinking while providing a personalized learning experience.
Goal: Set up the MERN stack and prepare the project structure.
Tasks:
- Install development tools: Node.js, VSCode, and Git.
- Reading Material: Node.js Setup Guide
- Video Tutorial: Install Node.js
- Initialize the backend:
- Create a folder for the project and initialize it with
npm init
. - Install Express.js and set up a basic server.
- Install Mongoose and connect to a local MongoDB instance.
- Reading Material: Express.js Basics
- Video Tutorial: Setting Up Express
- Create a folder for the project and initialize it with
- Initialize the frontend:
- Create a React project using Vite.
- Install Tailwind CSS and set up a basic layout.
- Reading Material: Vite Guide
- Video Tutorial: React with Vite
Deliverables:
- A functional backend server with a test route.
- A React frontend with Tailwind CSS configured.
Goal: Build API endpoints for managing books.
Tasks:
- Set up MongoDB Atlas:
- Create a cloud database and connect it to the app.
- Reading Material: MongoDB Atlas Setup
- Video Tutorial: Setting Up MongoDB Atlas
- Create a book schema with Mongoose.
- Fields: title, author, price, and description.
- Reading Material: Mongoose Schema
- Video Tutorial: Mongoose Schema Tutorial
- Implement CRUD API routes for books.
- Test the API using Postman.
- Reading Material: Building REST APIs with Express
- Video Tutorial: Express CRUD Tutorial
Deliverables:
- Functional API endpoints for creating, reading, updating, and deleting books.
Goal: Build basic UI components and set up routing.
Tasks:
- Install React Router and create routes for:
- Home
- Add Book
- Edit Book
- View Book Details
- Reading Material: React Router Docs
- Video Tutorial: React Router Setup
- Use Tailwind CSS to create:
- Navigation bar
- Basic UI for listing books
- Reading Material: Tailwind CSS Guide
- Video Tutorial: Tailwind CSS Tutorial
Deliverables:
- Functional UI with routing and navigation.
- Styled components using Tailwind CSS.
Goal: Integrate API with the frontend for CRUD functionality.
Tasks:
- Use Axios to fetch books from the backend and display them in a list.
- Reading Material: Axios Docs
- Video Tutorial: Axios in React
- Create forms for adding and editing books.
- Implement client-side validation.
- Reading material: Reading Docs
- Video Tutorial: React Form Tutorial
- Add delete functionality with a confirmation dialog.
Deliverables:
- CRUD functionality integrated with the React frontend.
- Validation for book forms.
Goal: Enhance UI/UX and test the application.
Tasks:
- Add responsive design using Tailwind utilities.
- Test CRUD operations thoroughly on different devices.
- Reading Material: Reading Docs
- Video Tutorial: Testing React Apps
Deliverables:
- A polished, responsive app with a seamless user experience.
Goal: Deploy the app for public use.
Tasks:
- Deploy the backend on Render.
- Reading Material: Render Node.js Guide
- Video Tutorial: Render Deployment
- Deploy the frontend on Vercel.
- Reading Material: Vercel Deployment
- Video Tutorial: Vercel Deployment Guide
Deliverables:
- Fully deployed backend and frontend with public URLs.
The End
Checkout the screenshots for your reference
https://github.com/mohammad-taheri1/Book-Store-MERN-Stack.git