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.