Skip to content

A design for an ecommerce online store with CRUD functionality as well as sign-up andd login functionality

Notifications You must be signed in to change notification settings

TshwetsoMo/Plantshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Plant Shop Application

This is a MERN (MongoDB, Express, React, Node.js) stack application for managing a plant shop. The application allows users to view a list of plants, view details of individual plants, and perform CRUD (Create, Read, Update, Delete) operations.

Table of Contents

Prerequisites

Make sure you have the following software installed on your local machine:

Installation

Clone the repository:

git clone https://github.com/yourusername/plant-shop.git
cd plant-shop

Backend Setup
Navigate to the backend directory:
bash
Copy code
cd backend
Install backend dependencies:
bash
Copy code
npm install
Create a .env file in the backend directory and add the following environment variables:
env
Copy code
MONGO_URI=your_mongodb_connection_string
PORT=5001
Start the backend server:
bash
Copy code
npm start
The backend server should now be running on http://localhost:5001.

Frontend Setup
Navigate to the frontend directory:
bash
Copy code
cd frontend
Install frontend dependencies:
bash
Copy code
npm install
Start the frontend development server:
bash
Copy code
npm start
The frontend application should now be running on http://localhost:3000.

Running the Application
To run the application, make sure both the backend and frontend servers are running:

Backend: http://localhost:5001
Frontend: http://localhost:3000
You can now open your browser and navigate to http://localhost:3000 to see the application in action.

API Endpoints
Plants
GET /api/plants - Get all plants
GET /api/plants/:id - Get a single plant by ID
POST /api/plants - Create a new plant
PUT /api/plants/:id - Update a plant by ID
DELETE /api/plants/:id - Delete a plant by ID
File Structure
java
Copy code
plant-shop/
├── backend/
│   ├── models/
│   ├── routes/
│   ├── .env
│   ├── server.js
│   └── package.json
├── frontend/
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   ├── App.js
│   │   ├── index.js
│   │   ├── api.js
│   ├── public/
│   ├── package.json
└── README.md
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any changes.

License
This project is licensed under the MIT License. See the LICENSE file for details.

About

A design for an ecommerce online store with CRUD functionality as well as sign-up andd login functionality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published