Giter Club home page Giter Club logo

vipullsingh / product-listing-react Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 3.24 MB

A simple Product Management Application built using the MERN stack (MongoDB, Express.js, React, and Node.js). This application allows you to manage products through CRUD operations (Create, Read, Update, Delete) and provides a user-friendly interface for browsing and managing products.

JavaScript 72.42% HTML 6.83% CSS 20.75%
expressjs nodejs product-listing product-management reactjs

product-listing-react's Introduction

Product Listing React App

Welcome to the Product Listing React App! This is a full-stack web application built using the MERN stack (MongoDB, Express.js, React, and Node.js). This application allows you to manage and display a list of products with CRUD (Create, Read, Update, Delete) functionality.

Table of Contents

Installation

  1. Clone the Repository:

    git clone https://github.com/vipullsingh/product-listing-react.git
  2. Navigate to Client and Backend Folders:

    cd product-listing-react/client
    npm install
    
    cd ../backend
    npm install
  3. Create a Dotenv file (.env) and Paste below code into it:

    PORT = 5000
    MONGODB_URL = <place_your_MongoDB_URL>
    

    This will install the required dependencies for both the frontend and backend.

Usage

  1. Start the Backend Server:

    cd backend
    npm start

    The backend server will run on http://localhost:5000.

  2. Start the React App:

    cd client
    npm start

    The React app will run on http://localhost:3000.

  3. Access the App:

    Open your web browser and navigate to http://localhost:3000 to interact with the React app.

API Routes

The following API routes are available:

  • GET /api/products: Fetch all products.
  • GET /api/products/:id: Fetch a single product by its ID.
  • POST /api/products: Create a new product.
  • PUT /api/products/:id: Update a product by its ID.
  • DELETE /api/products/:id: Delete a product by its ID.

Example Requests with Postman

  1. Fetch All Products:

  2. Fetch a Single Product by ID:

  3. Create a New Product:

  4. Update a Product by ID:

  5. Delete a Product by ID:

Folder Structure

The project is organized into two main folders:

  • client: Contains the React frontend code.
  • backend: Contains the Node.js and Express.js backend code.

Technologies Used

  • Frontend: React
  • Backend: Node.js, Express.js
  • Database: MongoDB
  • HTTP Library: Axios
  • Routing: React Router
  • Styling: CSS

Contributing

Contributions are welcome! If you find any issues or want to add new features, feel free to open a pull request.

product-listing-react's People

Contributors

vipullsingh avatar

Watchers

 avatar

Forkers

cosminmarian53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.