Fabriku
Kelola produksi, stok, dan penjualan di Fabriku. Buat website usaha untuk menampilkan produk atau layanan, menerima pesanan, dan mengelola permintaan pelanggan.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證AI skin-care shopping agent: YouCam AI skin analysis and makeup try-on, a routine built from your scores, and PayPal checkout.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Your skin, read in seconds. Your routine, bought in one chat.
Glow Agent is an AI skin-care shopping agent. You take a selfie. YouCam AI Skin Analysis scores 11 skin concerns and highlights where it found each one on your face. Glow, the shopping agent, builds a morning and night routine around your actual scores. It lets you compare foundation, concealer, lip and blush shades rendered on your own photo with YouCam makeup virtual try-on, and checks out with PayPal.
Live demo: https://glow.apoorvdarshan.com
People wonder about their skin at the moment of purchase: in front of a shelf of serums or a page of 40 foundation shades. Generic quizzes ask you to self-diagnose ("Is your skin oily?"), and shade finders ask you to guess your undertone. Most people guess wrong, buy the wrong thing, and return it or give up.
Glow Agent replaces the guessing with measurement and a try-on, then carries you to checkout in the same conversation.
build_routine, search_products, show_products, try_on, add_to_bag and start_checkout. It answers from your report, cites your scores, and shows results as cards rather than walls of text.Without an AI key, the app still works end to end. The routine builder and shade matching run from buttons instead of chat. The live demo's agent runs on Gemini's free tier (gemini-3.5-flash-lite) through Gemini's OpenAI-compatible endpoint.
| Feature | API | Units |
|---|---|---|
| Skin report and detection masks | POST /s2s/v2.0/task/skin-analysis (SD, 12 actions incl. skin_type) | 14 per photo |
| Shade try-on | POST /s2s/v2.0/task/makeup-vto with foundation, concealer, lip_color or blush effects using each product's exact hex | 1 per render |
| Photo upload | POST /s2s/v2.0/file, then a PUT to the pre-signed URL | free |
Tasks are polled until success, and units are only charged on success. YouCam's result URLs expire after two hours. The worker therefore re-polls the task, which is free, to serve masks same-origin, so the page can use them as CSS mask-images and tint them over any skin tone.
POST /v2/checkout/orders (intent CAPTURE, itemized purchase_units with a matching item_total), then POST /v2/checkout/orders/{id}/capture.createInstance, findEligibleMethods, createPayPalOneTimePaymentSession and the <paypal-button> element.public/ static app (vanilla JS, no build step)
app.js camera/upload, report view, agent chat, bag, PayPal v6
product-art.js SVG packaging drawn from each product's color
src/ Cloudflare Worker (serves /api/*)
worker.js routes, sample-face cache, same-origin image proxy
youcam.js YouCam file upload, skin analysis, makeup VTO, error messages
report.js normalizes YouCam output, sanitizes reports sent back by the browser
recommend.js routine builder, budget fitting, product search, shade candidates
agent.js tool-calling agent loop (any OpenAI-compatible chat API)
paypal.js cart pricing, Orders v2 create/capture
limits.js daily per-IP and global quotas in KV
catalog.js the demo shop's fictional house products
tests/ vitest unit tests
Safety and cost controls:
npm install
cp .dev.vars.example .dev.vars # fill in your keys
npm run dev # http://localhost:8787
npm test
.dev.vars needs:
YOUCAM_API_KEYPAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET (sandbox app)AI_API_KEY, AI_BASE_URL and AI_MODEL, for any OpenAI-compatible endpoint with tool callingYouCam accounts in India use the makeupar.com host (the default YOUCAM_BASE). Set YOUCAM_BASE=https://yce-api-01.perfectcorp.com for other regions.
npx wrangler kv namespace create GLOW_KV # put the id in wrangler.jsonc
npx wrangler secret put YOUCAM_API_KEY
npx wrangler secret put PAYPAL_CLIENT_ID
npx wrangler secret put PAYPAL_CLIENT_SECRET
npx wrangler secret put AI_API_KEY # optional, with AI_BASE_URL and AI_MODEL
npm run deploy
Quotas can be tuned with LIMIT_<KIND>_PER_IP and LIMIT_<KIND>_DAILY vars, where the kinds are UPLOAD, ANALYZE, TRYON and AGENT.