Skip to content

Commit 319b671

Browse files
Copilotasperpharma
andcommitted
Update APPLY_TO_MAIN_SITE.md and env config for new Supabase project
Co-authored-by: asperpharma <252395498+asperpharma@users.noreply.github.com>
1 parent 66f94d0 commit 319b671

9 files changed

Lines changed: 110 additions & 45 deletions

File tree

.env

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ dist
1212
dist-ssr
1313
*.local
1414

15+
# Environment variables
16+
.env
17+
.env.local
18+
.env.*.local
19+
1520
# Editor directories and files
1621
.vscode/*
1722
!.vscode/extensions.json

APPLY_TO_MAIN_SITE.md

Lines changed: 97 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,131 @@
22

33
**Main site:** https://asperbeautyshop-com.lovable.app/
44
**Repo:** asperpharma/understand-project
5-
**Lovable:** https://lovable.dev/projects/657fb572-13a5-4a3e-bac9-184d39fdf7e6/settings
6-
**Supabase project:** `qqceibvalkoytafynwoc`
5+
**Lovable:** https://lovable.dev/projects/657fb572-13a5-4a3e-bac9-184d39fdf7e6/settings
76

87
Use this checklist to run all updates and apply the brain, social media, Google Merchant Center, and every page to the main Asper Beauty Shop website.
98

109
---
1110

11+
## Perfect update in 4 steps (copy-paste)
12+
13+
Do this whenever you want the **latest code live** on the main site.
14+
15+
**1. Open a terminal in your understand-project folder.**
16+
If you don't have it yet:
17+
```bash
18+
gh repo clone asperpharma/understand-project
19+
cd understand-project
20+
```
21+
22+
**2. Get latest and install deps.**
23+
```bash
24+
git pull origin main
25+
npm install
26+
```
27+
28+
**3. Deploy to the live site.**
29+
(If you have no new changes, skip the commit; otherwise:)
30+
```bash
31+
git add .
32+
git commit -m "Your message"
33+
git push origin main
34+
```
35+
Lovable will build and deploy; the site updates in a few minutes at https://asperbeautyshop-com.lovable.app/
36+
37+
**4. Verify.**
38+
```bash
39+
# From this VIP folder (Asper Shop ALL Files VIP):
40+
npm run health
41+
```
42+
Then open https://asperbeautyshop-com.lovable.app/ and spot-check: Home, Products, Cart, Beauty Assistant.
43+
44+
---
45+
1246
## ⚠️ Manual overrides to clear blockers (100% Production Ready)
1347

1448
Do these **in your dashboards** so the live site can use the Brain and Commerce Engine. Tick each when done.
1549

1650
### Step 1 — Lovable environment variables
1751

18-
Open **[Lovable → Settings → Environment variables](https://lovable.dev/projects/657fb572-13a5-4a3e-bac9-184d39fdf7e6/settings)**. Paste these exact values:
52+
**Where:** <a href="https://lovable.dev/projects/657fb572-13a5-4a3e-bac9-184d39fdf7e6/settings">Lovable → asper-beauty-shop → Settings → Environment variables</a>
53+
54+
Set (or confirm) these production variables:
1955

20-
| Variable | Value |
21-
|----------|-------|
22-
| `VITE_SUPABASE_PROJECT_ID` | `qqceibvalkoytafynwoc` |
23-
| `VITE_SUPABASE_URL` | `https://qqceibvalkoytafynwoc.supabase.co` |
24-
| `VITE_SUPABASE_PUBLISHABLE_KEY` | *(your anon/public key — see .env)* |
56+
| Variable | Value to use |
57+
|----------|----------------|
58+
| `VITE_SUPABASE_URL` | `https://rgehleqcubtmcwyipyvi.supabase.co` |
59+
| `VITE_SUPABASE_PUBLISHABLE_KEY` | *(your anon/public key from Supabase)* |
2560
| `VITE_SHOPIFY_STORE_DOMAIN` | `lovable-project-milns.myshopify.com` |
2661
| `VITE_SHOPIFY_STOREFRONT_TOKEN` | *(your Storefront API token)* |
2762
| `VITE_SHOPIFY_API_VERSION` | `2025-07` |
28-
| `VITE_SITE_URL` | `https://asperbeautyshop-com.lovable.app/` |
29-
| `VITE_LOVABLE_URL` | `asperbeautyshop-com.lovable.app` |
3063

31-
- [ ] All vars saved → trigger redeploy
64+
Also set if not already: `VITE_SUPABASE_PROJECT_ID` = `rgehleqcubtmcwyipyvi`, `VITE_SITE_URL` = `https://asperbeautyshop-com.lovable.app/`, `VITE_LOVABLE_URL` = `asperbeautyshop-com.lovable.app`.
65+
66+
- [ ] All Lovable env vars saved; redeploy or push to `main` so build uses them
3267

3368
### Step 2 — Supabase Auth redirects
3469

35-
Open **[Supabase → Auth → URL Configuration](https://supabase.com/dashboard/project/qqceibvalkoytafynwoc/auth/url-configuration)**:
70+
**Where:** <a href="https://supabase.com/dashboard/project/rgehleqcubtmcwyipyvi">Supabase Dashboard</a> → **Authentication****URL Configuration**
3671

37-
- Add **Redirect URL:** `https://asperbeautyshop-com.lovable.app/**`
38-
- Set **Site URL:** `https://asperbeautyshop-com.lovable.app/`
72+
- Under **Redirect URLs**, add: `https://asperbeautyshop-com.lovable.app/**`
73+
- Set **Site URL** to: `https://asperbeautyshop-com.lovable.app/`
74+
- Save
3975

40-
- [ ] Redirect URL added and Site URL set
76+
- [ ] Redirect URLs include main site; Site URL points to main site
4177

42-
### Step 3 — Edge Function `SITE_URL` secret
78+
### Step 3 — Edge Function SITE_URL secret (COD emails)
4379

44-
Open **[Supabase → Settings → Edge Functions → Secrets](https://supabase.com/dashboard/project/qqceibvalkoytafynwoc/settings/functions)**:
80+
**Where:** Supabase → **Project Settings****Edge Functions****Secrets**
4581

4682
- Add or update: **`SITE_URL`** = `https://asperbeautyshop-com.lovable.app/`
4783

48-
- [ ] SITE_URL secret saved
84+
- [ ] `SITE_URL` secret set so COD/confirmation emails link to the live site
4985

5086
### Step 5 — Google Merchant Center
5187

52-
- Log into Google Merchant Center (ID `5717495012`).
53-
- Verify Shopify feed is syncing and product links use the main domain.
88+
- Log into <a href="https://merchant.google.com/">Google Merchant Center</a>.
89+
- Confirm your Shopify product feed (and new JSON-LD markup) is syncing 5,000+ SKUs without critical errors.
90+
- Ensure product and storefront links point to `https://asperbeautyshop-com.lovable.app` (or your custom domain).
5491

55-
- [ ] Feed syncing without critical errors
92+
- [ ] Feed syncing; no critical errors; links point to main site
5693

57-
### Step 8 — Deploy & verify
94+
### Step 8 — Deploy and verify
5895

59-
From your **understand-project** clone:
96+
**Deploy from the understand-project repo** (not this VIP folder):
6097

6198
```bash
62-
git add . && git commit -m "feat: complete apply_to_main_site checklist" && git push origin main
99+
cd path/to/understand-project
100+
git add .
101+
git commit -m "feat: complete apply_to_main_site checklist with deep links and schema"
102+
git push origin main
63103
```
64104

65-
After Lovable finishes deploying, verify:
105+
Lovable will build and deploy. Then **verify** (from this VIP folder):
66106

67107
```bash
68-
curl -s https://asperbeautyshop-com.lovable.app/health | python -m json.tool
108+
npm run health
69109
```
70110

71-
- [ ] `/health` returns `"status": "ok"`
111+
Then open https://asperbeautyshop-com.lovable.app/ and https://asperbeautyshop-com.lovable.app/health — expect 200. Optionally run `npm run test:brain` for full Brain/Beauty Assistant check.
112+
113+
- [ ] Pushed to `main` from understand-project; Lovable deploy successful
114+
- [ ] `npm run health` passes; `/health` returns 200; site and Brain connected
115+
116+
---
117+
118+
## How to get and deploy the latest updates (reference)
119+
120+
| Goal | What to do |
121+
|------|------------|
122+
| **Get latest code** | In the **understand-project** folder: run `git pull origin main` (or `git pull`). If you don't have the repo yet: `gh repo clone asperpharma/understand-project` then `cd understand-project` and `git pull`. |
123+
| **Deploy latest to the live site** | Push to `main`: `git add .``git commit -m "Your message"``git push origin main`. Lovable will build and deploy to https://asperbeautyshop-com.lovable.app/ in a few minutes. |
124+
| **Redeploy without code changes** | In <a href="https://lovable.dev/projects/657fb572-13a5-4a3e-bac9-184d39fdf7e6">Lovable → your project → Deployments</a>, trigger a new deploy or "Redeploy" the latest. |
125+
| **Update this VIP folder (docs/workflows)** | If this folder is a git repo: `git pull`. If it's a copy, re-copy from your source or pull the latest from wherever you keep these files. |
126+
| **Install/update dependencies** | In **understand-project**: `npm install`. In this VIP folder (scripts): `npm install` if you added or changed scripts. |
127+
| **Verify the site** | Run `npm run health` in this VIP folder, or open https://asperbeautyshop-com.lovable.app/ and check home, products, cart, and Beauty Assistant. |
128+
129+
**One-liner:** Pull in understand-project → push to `main` → Lovable deploys → `npm run health` and open the site.
72130

73131
---
74132

@@ -78,9 +136,9 @@ In **Lovable** → your project → **Settings** → **Environment variables**,
78136

79137
| Variable | Value | Purpose |
80138
|----------|--------|----------|
81-
| `VITE_SUPABASE_PROJECT_ID` | `qqceibvalkoytafynwoc` | Brain / Beauty Assistant project |
82-
| `VITE_SUPABASE_URL` | `https://qqceibvalkoytafynwoc.supabase.co` | Supabase API |
83-
| `VITE_SUPABASE_PUBLISHABLE_KEY` | *(your anon/public key)* | Frontend auth & Edge Function calls |
139+
| `VITE_SUPABASE_PROJECT_ID` | `rgehleqcubtmcwyipyvi` | Brain / Beauty Assistant project |
140+
| `VITE_SUPABASE_URL` | `https://rgehleqcubtmcwyipyvi.supabase.co` | Supabase API |
141+
| `VITE_SUPABASE_PUBLISHABLE_KEY` | *(your anon/public key)* | Frontend auth &amp; Edge Function calls |
84142
| `VITE_SHOPIFY_STORE_DOMAIN` | `lovable-project-milns.myshopify.com` | 5000+ SKU catalog |
85143
| `VITE_SHOPIFY_STOREFRONT_TOKEN` | *(your Storefront API token)* | Storefront API |
86144
| `VITE_SHOPIFY_API_VERSION` | `2025-07` | API version |
@@ -98,7 +156,7 @@ Reference: `env.main-site.example` in this folder (copy names from there; never
98156

99157
So users can log in on https://asperbeautyshop-com.lovable.app/:
100158

101-
1. Open **Supabase Dashboard** → project **qqceibvalkoytafynwoc**
159+
1. Open **Supabase Dashboard** → project **rgehleqcubtmcwyipyvi**
102160
2. **Authentication****URL Configuration**
103161
3. Add to **Redirect URLs**:
104162
- `https://asperbeautyshop-com.lovable.app/**`
@@ -216,7 +274,7 @@ Do this in the **understand-project** repo (clone if needed: `gh repo clone aspe
216274
1. **Push to `main`** (or trigger deploy in Lovable) so the latest code and env are live.
217275
2. **Health check** (from this VIP folder):
218276
```bash
219-
node scripts/health-check.js
277+
npm run health
220278
```
221279
Confirms: main site, `/health`, Bulk Upload, Beauty Assistant, Shopify.
222280
3. **Manual smoke test:**
@@ -226,13 +284,15 @@ Do this in the **understand-project** repo (clone if needed: `gh repo clone aspe
226284
- If you have login: test sign-in redirect back to the main site
227285

228286
- [ ] Deploy triggered and successful
229-
- [ ] `node scripts/health-check.js` passes
287+
- [ ] `npm run health` passes (from this VIP folder)
230288
- [ ] Homepage, products, and chatbot work on main URL
231289

232290
---
233291

234292
## 9. Optional — Catalog sync (CSV → Shopify)
235293

294+
**Full spec:** See **docs/PLAN_AND_SPEC.md** (architecture, CSV mapping, idempotency, env, frontend verification).
295+
236296
If you have a new or updated CSV catalog to push to the store that feeds the main site:
237297

238298
1. In this VIP folder, set in `.env`: `SHOPIFY_STORE`, `SHOPIFY_ACCESS_TOKEN`, and optionally `CSV_PATH` (or pass CSV path when running).
@@ -257,10 +317,13 @@ If you have a new or updated CSV catalog to push to the store that feeds the mai
257317
| Main site | https://asperbeautyshop-com.lovable.app/ |
258318
| Lovable settings | https://lovable.dev/projects/657fb572-13a5-4a3e-bac9-184d39fdf7e6/settings |
259319
| GitHub repo | https://github.com/asperpharma/understand-project |
260-
| Supabase project | qqceibvalkoytafynwoc |
320+
| Supabase project | rgehleqcubtmcwyipyvi |
261321
| Env template | `env.main-site.example` (this folder) |
262322
| Design system | `DESIGN_SYSTEM.md` |
263323
| Single source of truth | `MAIN_PROJECT.md` |
324+
| Plan + CSV sync spec + Master Breakdown | `docs/PLAN_AND_SPEC.md` |
325+
| Test brain &amp; chatbot | `TEST_BRAIN_AND_CHATBOT.md` — run `npm run test:brain` |
326+
| Perfect update (4 steps) | See top of this file |
264327

265328
---
266329

env.main-site.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# See MAIN_PROJECT.md and APPLY_TO_MAIN_SITE.md.
77

88
# ========== Supabase (Brain / Beauty Assistant) ==========
9-
VITE_SUPABASE_PROJECT_ID=qqceibvalkoytafynwoc
10-
VITE_SUPABASE_URL=https://qqceibvalkoytafynwoc.supabase.co
9+
VITE_SUPABASE_PROJECT_ID=rgehleqcubtmcwyipyvi
10+
VITE_SUPABASE_URL=https://rgehleqcubtmcwyipyvi.supabase.co
1111
VITE_SUPABASE_PUBLISHABLE_KEY=
1212

1313
# ========== Shopify (Storefront — 5000+ SKUs) ==========

src/components/AIConcierge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type Msg = {
2222
imagePreview?: string; // local preview URL for display
2323
};
2424

25-
const SUPABASE_URL = "https://qqceibvalkoytafynwoc.supabase.co";
25+
const SUPABASE_URL = import.meta.env.VITE_SUPABASE_URL || "https://rgehleqcubtmcwyipyvi.supabase.co";
2626
const CHAT_URL = `${SUPABASE_URL}/functions/v1/beauty-assistant`;
2727

2828
function getTextContent(content: string | MessageContent[]): string {

src/integrations/supabase/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import { createClient } from '@supabase/supabase-js';
33
import type { Database } from './types';
44

5-
const SUPABASE_URL = "https://qqceibvalkoytafynwoc.supabase.co";
6-
const SUPABASE_PUBLISHABLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFxY2VpYnZhbGtveXRhZnlud29jIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzAzMzc1OTUsImV4cCI6MjA4NTkxMzU5NX0.cnstN7JUhkt-hevIWhaeYRu1Y51tPSTi7eOBM6RLz4Y";
5+
const SUPABASE_URL = import.meta.env.VITE_SUPABASE_URL || "https://rgehleqcubtmcwyipyvi.supabase.co";
6+
const SUPABASE_PUBLISHABLE_KEY = import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY || "";
77

88
// Import the supabase client like this:
99
// import { supabase } from "@/integrations/supabase/client";

src/pages/Intelligence.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ASPER_CATALOG = [
2222
{ handle: "rimmel-stay-matte", title: "Rimmel Stay Matte Pressed Powder", price: "6.50", vendor: "Rimmel London", type: "Makeup" },
2323
];
2424

25-
const SUPABASE_URL = "https://qqceibvalkoytafynwoc.supabase.co";
25+
const SUPABASE_URL = import.meta.env.VITE_SUPABASE_URL || "https://rgehleqcubtmcwyipyvi.supabase.co";
2626
const CHAT_URL = `${SUPABASE_URL}/functions/v1/beauty-assistant`;
2727

2828
type Msg = {

src/pages/LabTools.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
1111
import { ScrollArea } from "@/components/ui/scroll-area";
1212
import ReactMarkdown from "react-markdown";
1313

14-
const SUPABASE_URL = "https://qqceibvalkoytafynwoc.supabase.co";
14+
const SUPABASE_URL = import.meta.env.VITE_SUPABASE_URL || "https://rgehleqcubtmcwyipyvi.supabase.co";
1515
const LAB_URL = `${SUPABASE_URL}/functions/v1/lab-tools`;
1616

1717
function useLabStream() {

supabase/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project_id = "qqceibvalkoytafynwoc"
1+
project_id = "rgehleqcubtmcwyipyvi"
22

33
[functions.beauty-assistant]
44
verify_jwt = false

0 commit comments

Comments
 (0)