GreenNest is a single-page web application built for plant lovers who want to nurture and decorate their homes with beautiful indoor plants.
The platform allows users to explore plant care guides, browse and buy plants, and book expert consultations — ensuring a greener and healthier lifestyle for everyone.
🌿 Live Link: https://greennesta9.netlify.app/
💻 GitHub Repository: (https://github.com/ahnafabid10/GreenNest)
- Build a responsive and elegant single-page application (SPA).
- Implement secure Firebase authentication (Signup, Login, Google Sign-In, Forgot Password).
- Fetch and display plant data dynamically from JSON.
- Create protected routes for authenticated users.
- Maintain a modern, nature-inspired design that feels calming and fresh.
- Logo: GreenNest
- Navigation Links: Home | Plants | My Profile
- Conditional Rendering:
- ✅ Logged in → Show user avatar, display name, and Logout.
- 🚫 Logged out → Show Login and Register buttons.
- Quick Links: About | Contact | Privacy Policy
- Social Media Icons: Instagram | Facebook | Pinterest
- Footer Text:
© 2025 GreenNest. All rights reserved.
✅ Navbar & Footer are always visible on all routes.
✅ No reload or crash during navigation.
A plants.json file contains at least 6 indoor plant objects with the following fields:
{
"plantId": 1,
"plantName": "Snake Plant",
"category": "Air Purifier",
"price": 18,
"rating": 4.8,
"availableStock": 10,
"careLevel": "Easy",
"description": "A hardy plant that purifies indoor air and thrives in low light.",
"image": "https://i.postimg.cc/example1.png",
"providerName": "UrbanGreen Studio",
"sellCount": 250
}Swiper.js or Framer Motion slider with plant-themed visuals and captions.
-
Dynamically displayed from JSON.
-
Each card includes image, name, price, rating, and “View Details” button.
- Static/fake JSON data about watering, sunlight, and fertilizing tips.
- 3–4 plant experts with photo, name, and specialization.
- “Plant of the Week” — featuring a highlighted plant each week. (Bonus for creativity!)
If user isn’t logged in → redirect to Login page, then return to the intended details page after login.
Includes:
-
Large plant image, name, description, price, rating, stock info.
-
Book Consultation Form:
-
Fields: Name, Email
-
Button: “Book Now” → shows success toast + clears form.
-
Fields: Email, Password
-
Options: Forgot Password | Login Button
Navigation:
-
On success → navigate to desired route/home.
-
On failure → show toast/error message.
Extra:
-
Link to Signup Page
-
Google Sign-In button → login via Google, then redirect home.
Fields: Name, Email, Photo URL, Password
Validation Rules:
-
Must contain one uppercase letter
-
Must contain one lowercase letter
-
Must be at least 6 characters long
-
Invalid passwords show an inline error message and block registration.
-
On success → navigate to Home page.
Extra:
-
Link to Login Page
-
Google Sign-In option → redirect to Home page.
-
Name
-
Email
-
Profile Photo
Includes an Update Profile button — uses updateProfile() to update displayName and photoURL in real-time.
##💡 Bonus & Creative Additions
-
Password toggle (Show/Hide) on both Login & Signup.
-
“Forgot Password” with Gmail password reset link.
-
Smooth animations using Framer Motion.
-
Additional section: “Plant of the Week” or “Best Sellers”.
-
Implemented updateProfile() for real-time user updates.
-
Managed protected routes & redirection after login.
-
Password validation + custom error messages.
-
Integrated Swiper.js for responsive slider layout.
| Category | Tools / Libraries |
|---|---|
| Frontend | React.js, React Router, Tailwind CSS, DaisyUI |
| Animations | Framer Motion / Swiper.js |
| Backend | Firebase Authentication |
| Data | Local JSON (plants.json) |
| Icons | React Icons |
| Notifications | React Hot Toast / SweetAlert |
# Clone the repository
git clone https://github.com/ahnafabid10/GreenNest.git
# Navigate into the project directory
cd GreenNest
# Install dependencies
npm install
# Create a `.env` file in the root directory
# Add your Firebase
VITE_apiKey=your_api_key
VITE_authDomain=your_auth_domain
VITE_projectId=your_project_id
VITE_storageBucket=your_storageBucket
VITE_messagingSenderId= your_messagingSenderId
VITE_appId= your_appId
# Run the development server
npm run dev
# Build and preview production version
npm run build
npm run preview