Saleor Store
우리 컬렉션을 쇼핑하세요
댓글을 불러오는 중입니다.
로그인 상태를 확인하는 중입니다.
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A mobile-first marketplace where independent creators post affiliate links and
shoppers browse one clean, algorithm-free feed. Built with React + Vite + Tailwind.
Open the printed localhost URL — resize your browser to a phone width, or
open it on your phone via your computer's local IP, to test the mobile UI.
Deploy to Vercel (get a public URL)
1. Push this folder to a new GitHub repo:README 전문 보기 ↗A mobile-first marketplace where independent creators post affiliate links and shoppers browse one clean, algorithm-free feed. Built with React + Vite + Tailwind.
npm install
npm run dev
Open the printed localhost URL — resize your browser to a phone width, or
open it on your phone via your computer's local IP, to test the mobile UI.
git init
git add .
git commit -m "Social-Commerce Hub"
git branch -M main
git remote add origin https://github.com/<you>/social-commerce-hub.git
git push -u origin main
vite build (or npm run build)distsocial-commerce-hub.vercel.app — open it on your phone to test.Every push to main auto-redeploys.
Likelink ships a ready-to-upload RSS 2.0 product feed
(google-feed.xml) that uses Google's Shopping namespace (xmlns:g) with
g:id, g:title, g:description, g:link, g:image_link, g:price,
g:availability, g:brand (plus g:condition and g:product_type) — the
exact attributes Google Merchant Center requires, with no crawlable-validation
errors. Only approved products with a title and image are emitted.
There are three ways to get the feed:
Once deployed, hit:
https://<your-domain>/api/google-feed
Vercel turns api/google-feed.mjs into a serverless function; Netlify uses
netlify/functions/google-feed.js. Both read the live product/marketer feed
straight from the Supabase kv table and return the XML with
Content-Type: application/xml and Content-Disposition: attachment,
so you can paste the URL into Google Merchant Center as a Scheduled fetch.
Required env vars (the same ones the app uses):
VITE_SUPABASE_URL
VITE_SUPABASE_ANON_KEY
Optional overrides:
LIKELINK_BASE_URL (g:link origin, default https://likelink2.vercel.app)
LIKELINK_CURRENCY (default ILS)
LIKELINK_BRAND (default Likelink)
Add them in Vercel → Settings → Environment Variables (and re-deploy), or Netlify → Site settings → Environment variables.
Open the app, unlock the Admin tab, and click "Download google-feed.xml" on the "Google Merchant Feed" card in the Overview section. This builds the exact same XML from the live in-app data and downloads it straight away.
# From Supabase (needs VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY in .env)
npm run feed:google
# …or from a JSON export: { "marketers": [], "products": [...] }
npm run feed:google -- --input feed-input/products.json --base https://likelink2.vercel.app
The output path defaults to ./google-feed.xml — override with --output.
| Feed field | Source (Likelink product) |
|---|---|
g:id | product.id |
g:title | product.title |
g:description | product.description |
g:link | https://likelink2.vercel.app/?product=<id> (deep-links to the product in the app) |
g:image_link | product.image (absolute http(s) URL only) |
g:price | product.price formatted as <amount> ILS, e.g. 249.00 ILS |
g:availability | in stock when status === "approved", else out of stock |
g:brand | Likelink (override with LIKELINK_BRAND) |
g:condition | new |
g:product_type | product.category > <creator name> |
A sample generated feed is committed at google-feed.xml (built from the seed
products in feed-input/products.json) so you can validate the structure before
pointing Merchant Center at your live endpoint.
This project is already wired up to use Supabase for all shared marketplace data (marketers, products, clicks, sales, platform settings) — you just need to create the free project and drop in two credentials.
Go to supabase.com → New project (free tier is fine).
In the Supabase dashboard, open SQL Editor → New query, paste this, and run it:
create table kv (
key text primary key,
value text not null,
shared boolean not null default true,
updated_at timestamptz not null default now()
);
alter table kv enable row level security;
-- Demo-friendly policies: anyone with the public anon key can read/write.
-- See the security note below before handling real money.
create policy "public read" on kv for select using (true);
create policy "public insert" on kv for insert with check (true);
create policy "public update" on kv for update using (true);
In the Supabase dashboard: Settings → API. Copy the Project URL and the anon public key.
cp .env.example .env
Paste your Project URL and anon key into .env. Then:
npm install
npm run dev
Open the app, post a listing from one browser tab, and refresh a second tab — it should show up. That confirms Supabase is live.
In your Vercel project: Settings → Environment Variables, add the same
two variables (VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY), then redeploy
(or trigger a new deploy by pushing to main). Your live URL is now a real,
shared marketplace — any phone that opens it sees the same feed.
The app now lets creators upload a photo directly from their phone instead of only pasting an image URL. For those photos to be visible to every visitor (not just the device that uploaded them), run this once in the same SQL Editor:
insert into storage.buckets (id, name, public)
values ('product-images', 'product-images', true)
on conflict (id) do nothing;
drop policy if exists "public read images" on storage.objects;
drop policy if exists "public upload images" on storage.objects;
create policy "public read images" on storage.objects
for select using (bucket_id = 'product-images');
create policy "public upload images" on storage.objects
for insert with check (bucket_id = 'product-images');
Until this is run, uploaded photos still work, but only on the uploader's own
device (same local fallback behavior as the kv table).
/u/<their-slug>This project includes a Capacitor-wrapped native app (android/ and ios/
folders) — the actual project files Google Play and the Apple App Store
require. What's already done: app name, bundle ID (com.socialcommercehub.app),
and generated icons/splash screens for both platforms.
What you still need to do — these are Apple/Google requirements, not something any tool can skip:
android/ folder in Android Studio (File → Open)..aab file.ios/App/App.xcworkspace in Xcode.Both stores review submissions before they go live (Apple: usually 1–3 days, Google: a few hours to a couple of days).
Keeping the app in sync with future web updates: after any code change, run:
npm run build
npx cap sync
This copies your latest web build into both native projects before you rebuild in Android Studio / Xcode.
By default, sharing a creator's link (/u/maya) on WhatsApp shows a generic
preview. netlify/edge-functions/creator-og.js fixes this — it detects when
WhatsApp/Facebook/Twitter/etc. are generating a preview and serves a proper
title + image, while real visitors still get the normal app.
Important: Netlify Edge Functions are not included in a plain drag-and-drop deploy to Netlify Drop — that method only understands static files. To use this feature, switch to one of:
npm install -g netlify-cli, then netlify login and netlify deploy --prod from the project folder (this uploads functions too).Either way, add VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY in Site settings → Environment variables so the function can look up creator names.
The RLS policies above allow anyone holding the public anon key (which is
visible in your deployed site's JS bundle — this is normal for anon keys, but
worth understanding) to read and write every row in kv. That's fine for a
demo or a closed pilot with people you trust, but it means:
Before this handles real creators, real shoppers, or real money, the next step is adding Supabase Auth (email/password or magic link) and rewriting the RLS policies to be scoped per-user (e.g. a creator can only update their own products, only the admin's user ID can change the platform fee). Happy to build that next if you want to keep going.
POST /api/admin/auth — the
code lives only in the ADMIN_CODE env var (never with a VITE_ prefix,
which would ship it to browsers) and returns an HMAC-signed 8-hour token.