A modern, responsive e-commerce website for premium dry fruits and nuts built with React, TypeScript, and Tailwind CSS.
- π Complete E-commerce Functionality: Shopping cart, checkout, payment integration
- π Authentication: Email/password and Google OAuth login
- π± Responsive Design: Mobile-first, fully responsive across all devices
- π Dark/Light Mode: Theme toggle with persistent user preference
- π³ Payment Options: Razorpay, UPI, and Cash on Delivery
- π¦ Order Management: View order history and track orders
- π¨ Modern UI: Clean, accessible design with smooth animations
- π Product Search & Filter: Advanced filtering and sorting options
- π Real-time Cart Updates: Live cart count and notifications
- π Fast Performance: Optimized build with code splitting
- Frontend: React 18, TypeScript
- Styling: Tailwind CSS v4, Radix UI components
- Build Tool: Vite
- Icons: Lucide React
- State Management: React Context API
- Notifications: Custom toast system
- Authentication: Mock implementation with localStorage (ready for real backend)
- Deployment: Vercel-ready
- Node.js 18+ and npm
-
Clone the repository
git clone <repository-url> cd himgiri-naturals
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envand add your API keys and configuration. -
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
npm run build
npm run previewhimgiri-naturals/
βββ public/ # Static assets
β βββ favicon.svg
β βββ og-image.jpg
βββ src/
β βββ components/ # Reusable UI components
β β βββ ui/ # Shadcn/ui components
β β βββ figma/ # Figma-specific components
β β βββ Header.tsx
β β βββ Footer.tsx
β β βββ ProductsGrid.tsx
β β βββ ...
β βββ contexts/ # React Context providers
β β βββ AuthContext.tsx
β β βββ CartContext.tsx
β β βββ ThemeContext.tsx
β βββ pages/ # Page components
β β βββ HomePage.tsx
β β βββ ShopPage.tsx
β β βββ CheckoutPage.tsx
β β βββ ...
β βββ styles/ # Global styles
β β βββ globals.css
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
βββ index.html
βββ package.json
βββ tsconfig.json
βββ vite.config.ts
βββ tailwind.config.js
- Add/remove products
- Update quantities
- Real-time price calculations
- Persistent storage
- Mobile-friendly overlay
- Email/password signup and login
- Google OAuth integration (ready for implementation)
- Protected routes
- Order history for logged-in users
- Razorpay payment gateway
- UPI payment options
- Cash on Delivery
- Order confirmation system
- Mobile-first approach
- Tablet and desktop optimized
- Touch-friendly interactions
- Floating cart icon on mobile
- Light and dark modes
- Persistent user preference
- Smooth theme transitions
- Earthy color palette
Required environment variables for full functionality:
# Payment Gateway
VITE_RAZORPAY_KEY_ID=your_razorpay_key
VITE_RAZORPAY_SECRET=your_razorpay_secret
# Google OAuth
VITE_GOOGLE_CLIENT_ID=your_google_client_id
# App Configuration
VITE_APP_URL=your_app_url
VITE_CONTACT_EMAIL=support@himgirinaturals.com
VITE_CONTACT_PHONE=+91 98765 43210-
Install Vercel CLI
npm i -g vercel
-
Deploy
vercel
-
Build the project
npm run build
-
Deploy the
distfolder to your hosting provider
Edit src/components/ProductsGrid.tsx and update the allProducts array:
{
id: 'unique-id',
name: 'Product Name',
price: 299,
originalPrice: 399,
image: 'https://image-url.jpg',
rating: 4.5,
reviews: 123,
weight: '250g',
category: 'nuts', // 'nuts', 'fruits', 'mixed'
inStock: true,
badge: 'Premium' // optional
}Customize colors in src/styles/globals.css:
:root {
--primary: #8b4513; /* Brand color */
--accent: #d4af37; /* Gold accent */
--background: #faf8f5; /* Light background */
/* ... */
}- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Email: enquiry@himgirinaturals.com
- Real backend integration with Supabase
- Advanced search and filtering
- Product reviews and ratings
- Wishlist functionality
- Multi-language support
- Analytics integration
- SEO optimization
- PWA features
The admin app lives in admin/ and is deployed as a separate Vercel project.
Setup steps:
- Supabase: run
database-admin.sql(addsusers.role,inventory, triggers, RLS) - Vercel (new project): set Root Directory =
admin/- Env vars:
SUPABASE_URL,SUPABASE_SERVICE_ROLE,ADMIN_AUTH_SECRET - Map domain:
admin.himgirinaturals.com
- Env vars:
- Seed an admin user in Supabase:
UPDATE users SET role='admin' WHERE email='you@example.com';
Security:
- Admin auth uses HTTP-only JWT cookie (SameSite=Strict) scoped to admin host
- Admin API verifies
Hoststarts withadmin. - Main site does not bundle or route any admin code