# Setup Guide for Harish Rawat This website works as a preview immediately. Orders are handled through WhatsApp for now. To make admin changes save online for every visitor later, connect a shared online database. ## 1. Create Supabase 1. Go to supabase.com. 2. Create a new project. 3. Open SQL Editor. 4. Paste and run `database.sql`. 5. Open Storage and create these buckets: - `product-images` as public - `category-images` as public - `review-images` as public - `reference-files` as private 6. Run `supabase/storage-policies.sql` in SQL Editor. ## 2. Add website keys Open `js/supabase-client.js`. Replace: ```js url: "https://YOUR-PROJECT.supabase.co", anonKey: "YOUR-SUPABASE-ANON-KEY", ``` Use only the public anonymous key. Never add the service-role key to the website. ## 3. Create first admin account 1. In Supabase, open Authentication. 2. Add the owner email and password. 3. Copy the user ID. 4. In SQL Editor, run: ```sql insert into public.admin_profiles (id, full_name, role) values ('PASTE-USER-ID-HERE', 'Harish Rawat', 'admin'); ``` ## 4. Use the admin dashboard Open: ```text /admin/ ``` After Supabase Auth is connected, log in with the admin email and password. The preview dashboard opens locally now so the owner can see the labels and flow. ## 5. Add products 1. Go to Admin. 2. Open Add Product. 3. Fill product name, category, price, size and description. 4. Upload product images. 5. Publish. ## 6. Change homepage Use Admin → Homepage. Edit hero text, announcement bar, featured products, artist intro and trust points. ## 7. Update contact information Use Admin → Settings. Update phone, WhatsApp, address, Instagram, YouTube and delivery text. ## 8. Deploy to Cloudflare Pages 1. Zip files are already arranged at root. 2. Upload the zip contents to a GitHub repository or Cloudflare Pages direct upload. 3. Set build command to empty. 4. Set output folder to `/`. 5. Connect the domain `harishrawat.in`. ## 9. Secrets that must never be placed in frontend code - Supabase service-role key - Email service private keys - Admin passwords