A premium full-stack e-commerce web application for browsing, purchasing, and managing plants, built with React, Node.js, Express, and MongoDB. Created by TechBire. π― Live Demo: https://bloomcart-wheat.vercel.app/
- Plant Catalog: Browse through a beautiful grid of plants with images, names, prices, and categories
- Search & Filter:
- Search by plant name, category, or description (case-insensitive)
- Filter by category (Indoor, Outdoor, Succulent, Air Purifying, Favorites, etc.)
- Filter by availability (In Stock/Out of Stock)
- Sort by date, name, or price
- Shopping Cart: Add plants to cart, manage quantities, and proceed to checkout
- Favorites Collection: Save your favorite plants for easy access
- Plant Details: Detailed view with pricing, descriptions, and care instructions
- Add Plant (Admin): Add new plants with comprehensive validation
- Responsive Design: Glass morphism UI that works seamlessly on desktop, tablet, and mobile devices
- Loading States: Beautiful loading animations and error handling
- SEO Optimized: Complete meta tags, Open Graph, and Twitter Card support
- RESTful API: Clean, scalable API with proper error handling
- Database Integration: MongoDB with Mongoose ODM
- Data Validation: Server-side validation with Joi
- Security: CORS, Helmet, and rate limiting
- Search: Advanced text search with indexing
- Payment Integration: Razorpay payment gateway integration
- Image Management: Google Images API integration for plant photos
- Seeding: Pre-populated with 50+ plant records
- React 18 with functional components and hooks
- React Router for navigation
- Axios for API calls
- React Icons for beautiful icons
- React Toastify for notifications
- CSS3 with modern styling and animations
- Node.js with Express.js framework
- MongoDB with Mongoose ODM
- Joi for data validation
- CORS for cross-origin requests
- Helmet for security headers
- Express Rate Limit for API protection
BloomCart/
βββ backend/ # Node.js Express API
β βββ models/
β β βββ Plant.js # Plant data model
β βββ routes/
β β βββ plants.js # Plant API routes
β β βββ payments.js # Payment processing
β β βββ images.js # Image management
β β βββ scraper.js # Web scraping utilities
β βββ validators/
β β βββ plantValidator.js # Input validation
β βββ scripts/
β β βββ seedData.js # Database seeding
β βββ services/
β β βββ GoogleImagesService.js # Image API integration
β βββ server.js # Express server setup
β βββ package.json
β βββ .env # Environment variables
βββ frontend/
β βββ public/ # Static assets, favicon, manifest
β βββ src/
β β βββ components/
β β β βββ Header.js # Navigation header
β β β βββ Footer.js # Site footer
β β β βββ PlantCard.js # Individual plant display
β β β βββ SearchAndFilter.js # Search and filter UI
β β β βββ LoadingSpinner.js # Loading component
β β β βββ ErrorMessage.js # Error display
β β β βββ Cart.js # Shopping cart
β β βββ pages/
β β β βββ Home.js # Main catalog page
β β β βββ AddPlant.js # Add plant form
β β β βββ PlantDetail.js # Plant details view
β β β βββ Checkout.js # Checkout process
β β β βββ OrderSuccess.js # Order confirmation
β β βββ context/
β β β βββ CartContext.jsx # Shopping cart state
β β βββ utils/
β β β βββ api.js # API integration
β β β βββ imageAPI.js # Image utilities
β β βββ App.js # Main app component
β β βββ index.js # React entry point
β βββ package.json
βββ .github/ # GitHub configurations
βββ README.md # Project documentation
βββ start.ps1 # Quick start script
βββ DEPLOYMENT_GUIDE.md # Comprehensive deployment guide
βββ DEPLOYMENT_CHECKLIST.md # Quick deployment checklist
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas)
- npm or yarn
-
Navigate to backend directory:
cd backend -
Install dependencies:
npm install
-
Environment Configuration: Create a
.envfile in the backend directory:PORT=5000 MONGODB_URI=mongodb://localhost:27017/plantstore FRONTEND_URL=http://localhost:3000 NODE_ENV=development
-
Start MongoDB: Make sure MongoDB is running on your system
-
Seed the database:
npm run seed
-
Start the backend server:
npm run dev
The backend will run on
http://localhost:5000
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Environment Configuration (Optional): Create a
.envfile in the frontend directory:REACT_APP_API_URL=http://localhost:5000/api
-
Start the frontend:
npm start
The frontend will run on
http://localhost:3000
GET /api/plants- Get all plants with optional filtersGET /api/plants/:id- Get single plant by IDPOST /api/plants- Add new plantPUT /api/plants/:id- Update plantDELETE /api/plants/:id- Delete plantGET /api/plants/meta/categories- Get all categories
search- Search by name, category, or descriptioncategory- Filter by categoryavailability- Filter by availability (true/false)page- Page number for paginationlimit- Items per pagesortBy- Sort field (createdAt, name, price)sortOrder- Sort order (asc, desc)
{
name: String (required, 2-100 characters),
price: Number (required, >= 0),
categories: [String] (required, enum values),
availability: Boolean (default: true),
description: String (max 500 characters),
image: String (URL),
care_instructions: String (max 300 characters),
stock_quantity: Number (>= 0, default: 0),
createdAt: Date,
updatedAt: Date
}- Indoor
- Outdoor
- Succulent
- Air Purifying
- Home Decor
- Low Light
- Pet Friendly
- Flowering
- Medicinal
- Hanging
- Large
- Small
- Grid layout with responsive design
- Beautiful plant cards with hover effects
- Category tags and availability badges
- Price display with Indian Rupee symbol
- Real-time search with debouncing
- Category dropdown with all available categories
- Availability filter
- Sorting options (date, name, price)
- Clear filters functionality
- Comprehensive form with validation
- Category suggestions and custom category input
- Image preview functionality
- Character count for text fields
- Success/error notifications
- Mobile-first approach
- Tablet and desktop optimizations
- Touch-friendly interface
- Flexible grid layouts
This project is ready for production deployment! Choose from multiple deployment options:
- Frontend: Vercel (Free tier)
- Backend: Railway (Free tier)
- Database: MongoDB Atlas (Free tier)
- π
DEPLOYMENT_CHECKLIST.md- Quick checklist for immediate deployment - π
DEPLOYMENT_GUIDE.md- Comprehensive step-by-step deployment guide
# Frontend
REACT_APP_API_URL=https://your-backend-url.com
REACT_APP_RAZORPAY_KEY=rzp_test_your_key
# Backend
NODE_ENV=production
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/bloomcart
RAZORPAY_KEY_ID=rzp_test_your_key_id
RAZORPAY_KEY_SECRET=your_razorpay_secret
JWT_SECRET=your_super_secret_jwt_key
FRONTEND_URL=https://your-frontend-url.com- CORS protection
- Helmet for security headers
- Rate limiting (100 requests per 15 minutes)
- Input validation and sanitization
- Error handling without exposing sensitive data
- Database indexing for faster searches
- Pagination to limit data transfer
- Debounced search to reduce API calls
- Optimized images with fallback
- Lazy loading components
The application includes:
- Form validation
- Error boundary handling
- API error handling
- Responsive design testing
- Mobile: < 480px
- Tablet: 480px - 768px
- Desktop: > 768px
- User authentication and authorization
- User profiles and order history
- Plant care reminders and notifications
- Reviews and ratings system
- Advanced filtering (price range, plant size, difficulty level)
- Plant care guides and tutorials
- Community features (plant sharing, forums)
- Real-time inventory management
- Multi-language support
- Mobile app development
This project was built as a comprehensive plant e-commerce solution. Contributions are welcome! Please feel free to submit a Pull Request.
Developer: TechBire
Email: anshhtechnical@gmail.com
LinkedIn: https://www.linkedin.com/in/techbire/
For any queries, suggestions, or collaboration opportunities, feel free to reach out!
- Thanks to all plant lovers who inspired this project
- Special thanks to the open-source community for amazing libraries and tools
Built with β€οΈ for plant lovers everywhere π±
Transform your space with nature's beauty π‘
