This is a Product Management system built with React for the frontend and Node.js with Express for the backend. It allows users to register products, view them in a table, edit or delete them. The backend implements a full CRUD API for managing products.
- Add new products: Users can add a new product with details like product name, type, company, and price.
- View all products: Products are listed in a table format.
- Edit products: Existing products can be edited inline.
- Delete products: Products can be deleted from the list.
- Pagination: Supports paginated views of product data.
- Technologies Used
- Installation
- Running the App
- API Endpoints
- Frontend Components
- Backend Implementation
- React: A JavaScript library for building user interfaces.
- Axios: A promise-based HTTP client used to make API requests.
- React Bootstrap: For UI components and styling.
- React Pagination: For paginating product data.
- Node.js: JavaScript runtime for server-side code.
- Express: Web framework for building REST APIs.
- MongoDB: NoSQL database for storing product data.
- Node.js and npm installed on your machine.
- Required Packages are :
- For the Frontend side:
- Axios
- react-bootstrap
- For the Backend side:
- express
- cors
- mongoose
- nodemon
- body-parser (optional)
- For the Frontend side:
- MongoDB instance running (locally or via a cloud provider like MongoDB Atlas).
git clone https://github.com/your-username/product-management-system.git
cd product-management-system
cd ../frontend
npm install
cd backend
npm install
- Ensure your MongoDB is running and accessible.
- Start the backend server:
cd backend
npm start
- Start the React frontend:
cd frontend
npm start
- A modal form for adding a new product to the system.
- Takes input fields for product name, type, company, and price.
- On submission, the data is sent to the backend using Axios to create a new product.
- Displays all available products in a table.
- Users can edit or delete products directly from the table.
- Implements pagination to display a limited number of products per page.
- Includes inline editing for updating products.
- A pagination component that helps navigate through the product list.
- The main entry point of the app. It combines the ProductRegisterForm and TableForm components to display the product registration form and the product list on the same page.
The backend is built using Node.js and Express. It provides a RESTful API to manage product data with the following functionality:
- CRUD Operations:
- Create: Add new products.
- Read: Fetch all or individual products.
- Update: Modify product details.
- Delete: Remove products from the system.
- User authentication for restricted access to product management.
- Filtering and sorting of products by type, company, or price.
- Improved error handling and validation for the product form.