A modern React e-commerce application for bedding products with email order notifications.
- 🛒 Shopping Cart - Add, remove, and manage products
- 🔍 Product Filtering - Filter by category, color, and price range
- 📧 Email Checkout - Send orders directly to your email
- 📱 Responsive Design - Works on desktop and mobile
- 🎨 Modern UI - Built with React and styled-components
- 🛣️ React Router - Client-side navigation
- Node.js (v16 or higher)
- npm or yarn
-
Clone the repository
git clone <your-repo-url> cd bedding-store-react
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envwith your EmailJS credentials (get from emailjs.com) -
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173/
This app includes email checkout functionality using EmailJS. To receive order notifications:
-
Create EmailJS account at https://www.emailjs.com/
-
Set up email service (Gmail, Outlook, etc.)
-
Create email template with these variables:
{{from_name}}- Customer name{{from_email}}- Customer email{{phone}}- Customer phone{{order_items}}- List of ordered items{{item_count}}- Total items{{order_total}}- Total price{{message}}- Customer message
-
Add credentials to
.env:VITE_EMAILJS_SERVICE_ID=your_service_id VITE_EMAILJS_TEMPLATE_ID=your_template_id VITE_EMAILJS_PUBLIC_KEY=your_public_key VITE_STORE_EMAIL=your-email@example.com
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
src/
├── components/ # React components
│ ├── Header.jsx # Site header with navigation
│ ├── Sidebar.jsx # Product filters
│ ├── ProductGrid.jsx # Product display grid
│ ├── Cart.jsx # Shopping cart sidebar
│ └── Footer.jsx # Site footer
├── pages/ # Page components
│ └── Contact.jsx # Contact page
├── hooks/ # Custom React hooks
│ └── useStore.js # State management hook
├── utils/ # Utility functions
│ ├── productData.ts # Product information
│ ├── emailService.js # Email sending functionality
│ └── emailConfig.js # EmailJS configuration
└── App.jsx # Main application component
- Environment variables for sensitive data
- Git-ignored credentials - Safe for GitHub
- No hardcoded secrets in source code
- Input validation on forms
- Browse Products - View all bedding products on the homepage
- Filter Products - Use sidebar filters to narrow down selection
- Search - Use the search bar to find specific products
- Add to Cart - Click "Add to Cart" on any product
- Checkout - Fill customer info and click "Send Order via Email"
- Receive Email - You'll get an email with complete order details
Before deploying to production:
- Set environment variables in your hosting platform
- Use production EmailJS credentials
- Test email functionality thoroughly
- Configure your domain for EmailJS (if needed)
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
Made with ❤️ using React, Vite, and modern web technologies