A full-stack MERN web application for buying, renting, and managing plants with secure authentication, smart inventory control, and a modern responsive UI.
The Plant Nursery Portal is a full-stack web application built using the MERN stack (MongoDB, Express.js, React.js, Node.js). It provides a seamless digital experience for buying, renting, and managing plants, while also offering essential plant care guidance.
This system bridges the gap between traditional plant nurseries and modern e-commerce platforms by delivering a secure, responsive, and scalable solution for both customers and administrators.
- React.js
- Tailwind CSS
- Axios
- Node.js
- Express.js
- JWT Authentication
- MongoDB (Local)
- Secure registration & login
- JWT-based authentication
- Role-based access control (Admin & Customer)
- Name, price, stock, description, care instructions, categories
- Real plant images
- Search by name
- Filter by categories
- Add items
- Update quantities
- Persistent user-specific cart
- Simple checkout workflow
- Backend stock validation
- Multiple payment options
- Temporary plant rentals
- Tracks borrowed & returned plants
- Prevents overbooking
- User-based rental history
- Add / update / delete plants
- Manage stock
- Monitor sales and rentals
- Optimized for all screen sizes
- Protected endpoints
- Authentication middleware
- Error handling & validation
Here's how the portal looks.
Follow these steps to run the project locally.
Make sure you have the following installed:
- Node.js (v16+ recommended)
- MongoDB (Local installation or MongoDB Compass)
- Git
git clone https://github.com/ayesha-xainab/plant-nursery-portal.git
cd plant-nursery-portal
cd backend
npm install
Create .env file inside /backend
PORT=5000
MONGO_URI=mongodb://127.0.0.1:27017/plant_nursery
JWT_SECRET=your_secret_keyMake sure MongoDB service is running locally before starting the backend.
Run Backend Server
npm run dev
Backend will run on:
cd ../frontend
npm install
npm run dev
Frontend will run on:
To create an admin user, manually insert a user with role "admin" in MongoDB.
plant-nursery-portal/
│
├── backend/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── middleware/
│ └── server.js
│
├── frontend/
│ ├── index.html
│ └── src/
│ ├── components/
│ ├── context/
│ ├── pages/
│ ├── services/
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
│
└── README.md
This project welcomes any improvements and enhancements.








