Pure Elements is a modern, full-featured e-commerce platform specializing in Ayurvedic skincare, haircare, body care, wellness, and luxury products. Built with React and TypeScript, it provides a seamless shopping experience with a comprehensive admin panel for product and content management.
- Product Browsing: Browse products by category (Skin Care, Hair Care, Body Care, Men's Care, Kids Care, Wellness, Perfumes, Gifting)
- Product Search: Advanced search functionality across product names, descriptions, and categories
- Product Details: Detailed product pages with images, descriptions, ingredients, and usage instructions
- Shopping Cart: Persistent cart with real-time updates
- Wishlist: Save favorite products for later
- User Authentication: Secure signup and login with Supabase Auth
- Order Management: Track order history and status
- Checkout: Complete checkout flow with shipping address and payment options
- Responsive Design: Mobile-first design that works on all devices
- Store Locator: Find physical store locations
- Product Management: Create, edit, and delete products with category and subcategory organization
- Order Management: View and update order statuses
- Content Management:
- Manage navigation menu items
- Update hero banner slides
- Manage product categories
- Dashboard: Overview of products, orders, and sales
- Frontend Framework: React 19 with TypeScript
- Build Tool: Vite
- UI Components: Custom components with Tailwind CSS
- Icons: Lucide React
- Backend: Supabase (PostgreSQL database, Authentication, Row Level Security)
- State Management: React Context API
- Routing: Client-side routing with React state
src/
βββ components/ # React components
β βββ admin/ # Admin panel components
β βββ ProductCard.tsx
β βββ ProductDetails.tsx
β βββ ProductListing.tsx
β βββ ...
βββ contexts/ # React Context providers
β βββ AuthContext.tsx
β βββ CartContext.tsx
β βββ ToastContext.tsx
βββ lib/ # Utility libraries
β βββ database.ts # Supabase database service
β βββ supabase.ts # Supabase client configuration
βββ types/ # TypeScript type definitions
βββ constants/ # App constants and static data
βββ App.tsx # Main application component
- Node.js (v18 or higher)
- npm or yarn
- Supabase account (for database and authentication)
-
Clone the repository
git clone <repository-url> cd Pureelements
-
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Set up Supabase Database
- Create a new Supabase project
- Run the migrations in
supabase/migrations/:001_initial_schema.sql- Creates all tables and RLS policies002_update_products_rls.sql- Updates RLS policies for product management
- Or use the Supabase CLI:
supabase db push
-
Run the development server
npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Admin Panel: Navigate to Admin section (default PIN: 1234)
The application uses Supabase (PostgreSQL) with the following main tables:
- products: Product catalog with categories, pricing, images, and descriptions
- orders: Customer orders with shipping and payment information
- order_items: Individual items in each order
- cart_items: Shopping cart items (user-specific)
- wishlist_items: Wishlist items (user-specific)
- user_profiles: Extended user information
- nav_items: Navigation menu configuration
- hero_slides: Homepage hero carousel slides
- categories: Product categories
- User Authentication: Supabase Auth with email/password
- Row Level Security (RLS): Enabled on all tables
- Admin Access: PIN-based admin panel (configurable)
- Data Protection: Secure API calls with Supabase client
Access the admin panel by navigating to the Admin section. Default PIN: 1234
- Products: Manage product catalog (add, edit, delete)
- Orders: View and update order statuses
- Content: Manage navigation items and hero banners
- Categories: Organize product categories
- ProductListing: Category-based product browsing with filters
- ProductDetails: Detailed product view with image zoom
- CartDrawer: Slide-out shopping cart
- CheckoutPage: Complete checkout flow
- AdminLayout: Admin dashboard with navigation
- CategoryCircle: Category display with hover effects
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
Default admin PIN is 1234. To change it, edit src/components/admin/AdminLogin.tsx
Categories are managed in src/constants/index.ts and can be updated through the admin panel.
Main categories include:
- SKIN CARE
- HAIR-CARE
- BODY-CARE
- MENS CARE
- KIDS-CARE
- WELLNESS
- PERFUMES
- GIFTING
- Ensure products have
mainCategoryset correctly - Check that RLS policies are configured properly
- Verify database connection in browser console
- Verify Supabase credentials in
.env - Check that
user_profilestable exists - Ensure RLS policies allow user profile access
- Default PIN is
1234 - Check browser console for errors
- Verify Supabase RLS policies allow product updates
This project is private and proprietary.
This is a private project. For issues or questions, please contact the development team.
For support, please refer to the documentation or contact the development team.
Built with β€οΈ for Pure Elements