Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 Plantify - Plant E-Commerce Platform

Plantify Logo

πŸ“‹ Project Overview

Plantify is a modern, full-stack e-commerce platform dedicated to plant enthusiasts. Built with cutting-edge web technologies, it provides a seamless shopping experience for indoor plants, gardening supplies, and plant care accessories.

🎯 Key Objectives

  • Create an intuitive plant shopping experience
  • Provide comprehensive plant care information
  • Build a community of plant lovers
  • Offer secure and reliable e-commerce functionality

πŸ‘₯ Target Audience

  • Plant enthusiasts and collectors
  • Home gardening beginners
  • Interior design enthusiasts
  • Urban gardeners and apartment dwellers

πŸ› οΈ Technology Stack

Frontend

React Vite Tailwind CSS JavaScript

Backend

Node.js Express.js MongoDB Mongoose

Additional Tools

Nodemailer JWT Bcrypt

πŸ“ Project Structure

Plantify/
β”œβ”€β”€ πŸ“ frontend/                    # React frontend application
β”‚   β”œβ”€β”€ πŸ“ public/                  # Static assets
β”‚   β”‚   β”œβ”€β”€ πŸ“ assets/              # Product images and media
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ anthrium/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ bamboo-palm-plant/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ brazilwood-plant/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ jade-plant-mini/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ lucky-bamboo/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ monstera/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ monstera-xl/
β”‚   β”‚   β”‚   └── πŸ“ peace-lily-plant/
β”‚   β”‚   └── πŸ“„ index.html           # Main HTML template
β”‚   β”œβ”€β”€ πŸ“ src/                     # Source code
β”‚   β”‚   β”œβ”€β”€ πŸ“ components/          # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ AuthModal.jsx    # Authentication modal
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ForgotPassword.jsx # Password reset form
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Header.jsx       # Navigation header
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Login.jsx        # Login form
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ProductCard.jsx  # Product display card
β”‚   β”‚   β”‚   └── πŸ“„ Register.jsx     # Registration form
β”‚   β”‚   β”œβ”€β”€ πŸ“ contexts/            # React Context providers
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ AuthContext.jsx  # Authentication state
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ CartContext.jsx  # Shopping cart state
β”‚   β”‚   β”‚   └── πŸ“„ SearchContext.jsx # Search functionality
β”‚   β”‚   β”œβ”€β”€ πŸ“ pages/               # Main application pages
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Home.jsx         # Homepage with products
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ProductDetail.jsx # Individual product page
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Profile.jsx      # User profile page
β”‚   β”‚   β”‚   └── πŸ“„ ResetPassword.jsx # Password reset page
β”‚   β”‚   β”œβ”€β”€ πŸ“ services/            # API communication
β”‚   β”‚   β”‚   └── πŸ“„ api.js           # HTTP client and endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“„ App.jsx              # Main application component
β”‚   β”‚   └── πŸ“„ main.jsx             # Application entry point
β”‚   β”œβ”€β”€ πŸ“„ package.json             # Frontend dependencies
β”‚   β”œβ”€β”€ πŸ“„ tailwind.config.js       # Tailwind CSS configuration
β”‚   └── πŸ“„ vite.config.js           # Vite build configuration
β”‚
β”œβ”€β”€ πŸ“ backend/                     # Node.js backend application
β”‚   β”œβ”€β”€ πŸ“ config/                  # Configuration files
β”‚   β”‚   └── πŸ“„ database.js          # MongoDB connection setup
β”‚   β”œβ”€β”€ πŸ“ controllers/             # Business logic controllers
β”‚   β”‚   β”œβ”€β”€ πŸ“„ cartController.js    # Shopping cart operations
β”‚   β”‚   β”œβ”€β”€ πŸ“„ orderController.js   # Order management
β”‚   β”‚   β”œβ”€β”€ πŸ“„ productController.js # Product CRUD operations
β”‚   β”‚   └── πŸ“„ userController.js    # User authentication & profile
β”‚   β”œβ”€β”€ πŸ“ middleware/              # Custom middleware functions
β”‚   β”‚   β”œβ”€β”€ πŸ“„ auth.js              # JWT authentication middleware
β”‚   β”‚   └── πŸ“„ validation.js        # Input validation middleware
β”‚   β”œβ”€β”€ πŸ“ models/                  # MongoDB data models
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Cart.js              # Shopping cart schema
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Order.js             # Order schema
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Product.js           # Product schema
β”‚   β”‚   └── πŸ“„ User.js              # User schema
β”‚   β”œβ”€β”€ πŸ“ routes/                  # API route definitions
β”‚   β”‚   β”œβ”€β”€ πŸ“„ cart.js              # Cart-related endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“„ orders.js            # Order-related endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“„ products.js          # Product-related endpoints
β”‚   β”‚   └── πŸ“„ users.js             # User-related endpoints
β”‚   β”œβ”€β”€ πŸ“ scripts/                 # Utility scripts
β”‚   β”‚   β”œβ”€β”€ πŸ“„ addSingleProduct.js  # Add individual products
β”‚   β”‚   β”œβ”€β”€ πŸ“„ checkUser.js         # User verification script
β”‚   β”‚   β”œβ”€β”€ πŸ“„ testEmail.js         # Email service testing
β”‚   β”‚   └── πŸ“„ testForgotPassword.js # Password reset testing
β”‚   β”œβ”€β”€ πŸ“ seeders/                 # Database seeding
β”‚   β”‚   └── πŸ“„ productSeeder.js     # Sample product data
β”‚   β”œβ”€β”€ πŸ“ services/                # External service integrations
β”‚   β”‚   └── πŸ“„ emailService.js      # Email notification service
β”‚   β”œβ”€β”€ πŸ“„ .env                     # Environment variables
β”‚   β”œβ”€β”€ πŸ“„ package.json             # Backend dependencies
β”‚   └── πŸ“„ server.js                # Express server entry point
β”‚
└── πŸ“„ README.md                    # Project documentation

✨ Implemented Features (Current)

πŸ” User Authentication System

  • User Registration: Secure account creation with email validation
  • User Login: JWT-based authentication with "Remember Me" option
  • Password Reset: Email-based password recovery with secure tokens
  • Profile Management: Update user information and preferences
  • Session Management: Automatic token refresh and logout

πŸ›οΈ E-Commerce Core Features

  • Product Catalog: Browse extensive plant collection with high-quality images
  • Advanced Search: Real-time search with filters (category, price, difficulty)
  • Product Details: Comprehensive plant information including care instructions
  • Shopping Cart: Add, remove, and modify cart items with persistent storage
  • Responsive Design: Optimized for desktop, tablet, and mobile devices

πŸ“§ Communication Features

  • Email Notifications: Professional HTML email templates
  • Password Recovery: Secure email-based password reset system
  • Welcome Emails: Automated onboarding communication

🎨 User Experience

  • Modern UI/UX: Clean, intuitive interface with Tailwind CSS
  • Loading States: Smooth user interactions with loading indicators
  • Error Handling: Comprehensive error messages and validation
  • Accessibility: WCAG-compliant design principles

πŸš€ Future Scope Features (Roadmap)

πŸ›’ Enhanced E-Commerce

  • Wishlist Functionality: Save favorite plants for later
  • Order Management: Complete order tracking and history
  • Payment Gateway: Secure payment processing (Stripe/PayPal)
  • Inventory Management: Real-time stock tracking
  • Multi-currency Support: International market expansion

πŸ‘¨β€πŸ’Ό Admin Features

  • Admin Dashboard: Comprehensive management interface
  • Product Management: CRUD operations for plant catalog
  • User Management: Customer support and account management
  • Analytics Dashboard: Sales and user behavior insights
  • Bulk Operations: Efficient inventory and order management

🌟 Community Features

  • Product Reviews: Customer feedback and rating system
  • Plant Care Tips: Community-driven care guides
  • Social Integration: Share favorite plants on social media
  • Plant Care Reminders: Personalized care notifications
  • Expert Consultation: Connect with plant care specialists

πŸ“± Advanced Features

  • Mobile App: Native iOS and Android applications
  • Push Notifications: Order updates and care reminders
  • AR Plant Placement: Visualize plants in your space
  • Plant Health Scanner: AI-powered plant disease detection
  • Subscription Service: Regular plant delivery service

πŸš€ Installation & Setup

Prerequisites

  • Node.js (v18.x or higher)
  • MongoDB (v6.x or higher)
  • npm or yarn package manager
  • Git version control

Backend Setup

# Clone the repository
git clone <repository-url>
cd Plantify/backend

# Install dependencies
npm install

# Configure environment variables
cp .env.example .env
# Edit .env with your configuration

# Seed the database
node seeders/productSeeder.js

# Start the development server
npm run dev

Frontend Setup

# Navigate to frontend directory
cd ../frontend

# Install dependencies
npm install

# Start the development server
npm run dev

Environment Variables

# Backend (.env)
PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/plantify
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRE=30d
CLIENT_URL=http://localhost:5174
FRONTEND_URL=http://localhost:5174
EMAIL_SERVICE=gmail
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password
EMAIL_FROM=noreply@plantify.com

πŸ“š API Documentation

Authentication Endpoints

POST /api/users/register     # User registration
POST /api/users/login        # User login
POST /api/users/forgot-password # Password reset request
POST /api/users/reset-password  # Password reset confirmation
GET  /api/users/profile      # Get user profile
PUT  /api/users/profile      # Update user profile

Product Endpoints

GET    /api/products         # Get all products
GET    /api/products/:id     # Get single product
POST   /api/products         # Create product (Admin)
PUT    /api/products/:id     # Update product (Admin)
DELETE /api/products/:id     # Delete product (Admin)

Cart Endpoints

GET    /api/cart             # Get user cart
POST   /api/cart/add         # Add item to cart
PUT    /api/cart/update      # Update cart item
DELETE /api/cart/remove      # Remove cart item
DELETE /api/cart/clear       # Clear entire cart

πŸ—„οΈ Database Schema

User Model

{
  name: String,
  email: String (unique),
  password: String (hashed),
  phone: String,
  address: Object,
  role: String (user/admin),
  wishlist: [ObjectId],
  isActive: Boolean,
  passwordResetToken: String,
  passwordResetExpires: Date,
  createdAt: Date,
  updatedAt: Date
}

Product Model

{
  name: String,
  description: String,
  shortDescription: String,
  price: Number,
  originalPrice: Number,
  category: String,
  images: Object,
  stock: Number,
  sku: String (unique),
  rating: Object,
  careInstructions: Object,
  specifications: Object,
  features: [String],
  badges: [String],
  tags: [String],
  isActive: Boolean,
  createdAt: Date,
  updatedAt: Date
}

πŸ—οΈ Technical Architecture

Frontend Architecture

  • Component-Based: Modular React components for reusability
  • Context API: Global state management for auth, cart, and search
  • Custom Hooks: Reusable logic for API calls and state management
  • Responsive Design: Mobile-first approach with Tailwind CSS

Backend Architecture

  • MVC Pattern: Separation of concerns with models, views, and controllers
  • Middleware Stack: Authentication, validation, and error handling
  • RESTful API: Standard HTTP methods and status codes
  • Database ODM: Mongoose for MongoDB object modeling

Security Features

  • JWT Authentication: Secure token-based authentication
  • Password Hashing: Bcrypt for secure password storage
  • Input Validation: Server-side validation for all inputs
  • Rate Limiting: API rate limiting to prevent abuse
  • CORS Configuration: Cross-origin resource sharing setup
  • Helmet.js: Security headers for Express applications

πŸ“Š Performance & Scalability

Current Optimizations

  • Image Optimization: Compressed product images
  • Lazy Loading: On-demand component and image loading
  • Caching: Browser caching for static assets
  • Database Indexing: Optimized queries with proper indexes

Scalability Considerations

  • Microservices: Future migration to microservices architecture
  • CDN Integration: Content delivery network for global reach
  • Database Sharding: Horizontal scaling for large datasets
  • Load Balancing: Multiple server instances for high availability
  • Caching Layer: Redis for session and data caching

🎯 Presentation Highlights

Key Selling Points

  1. Modern Technology Stack: Latest web technologies for optimal performance
  2. User-Centric Design: Intuitive interface designed for plant enthusiasts
  3. Scalable Architecture: Built to handle growth and expansion
  4. Security First: Comprehensive security measures implemented
  5. Mobile Responsive: Seamless experience across all devices

Demo Features

  1. Product Browsing: Showcase the plant catalog and search functionality
  2. User Authentication: Demonstrate login, registration, and password reset
  3. Shopping Cart: Show add to cart and cart management features
  4. Email Integration: Display professional email templates
  5. Responsive Design: Show mobile and desktop views

πŸ‘₯ Contributing

We welcome contributions! Please read our contributing guidelines and submit pull requests for any improvements.

πŸ“„ License

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

πŸ“ž Contact

For questions or support, please contact the development team.


Built with ❀️ by the Plantify 🌱

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages