尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Multi-tenant SaaS for gold & silver pawnbrokers to manage pledges, interest, valuation, risk, and customer records.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A multi-tenant SaaS for gold and silver pawnbrokers (pledge shops) in India.
Shop owners record customer pledges of jewellery against loans, track accruing interest, monitor loan-to-value risk against live metal prices, manage an inventory of items acquired through pledge sales and direct purchases, keep a task list, and share a read-only portal with each customer. Access is gated behind a Razorpay subscription. Most UI strings and all printed receipts are in Hindi.
Every shop's data is isolated: each API route resolves the signed-in user to an internal user id and scopes all queries by it.
Note: middleware lives in proxy.ts — Next.js 16 renamed middleware.ts.
Requires Node 22 and a PostgreSQL database.
npm ci
# create a .env file — variable names are listed below (there is no .env.example)
npx prisma generate
npx prisma migrate dev # apply migrations
npx prisma db seed # seeds the 10 default pledge item types
npm run dev # http://localhost:3000
The seed is idempotent and contains no personal data — it only creates the
system-default PledgeItemType rows.
npx tsc --noEmit # the primary gate
npm test # vitest — interest, LTV, and customer-risk logic
npm run lint
npm run build # only needed for build-time issues
CI (.github/workflows/ci.yml) runs typecheck, test, and lint on push and PR to
main. It does not run a build.
After any schema change, run npx prisma generate and clear the Turbopack cache
(rm -rf .next) before restarting the dev server — a stale client plus a cached
chunk produces confusing runtime errors.
Names only. Never commit values; .env* is gitignored.
Database
DATABASE_URL — used by both the app runtime and the Prisma CLIDIRECT_URL — convention for direct/unpooled migrations; nothing reads it as currently wiredClerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYWEBHOOK_SECRET — Svix signing secret for the Clerk user webhookNEXT_PUBLIC_CLERK_* redirect URL variablesRazorpay
NEXT_PUBLIC_RAZORPAY_KEY_IDRAZORPAY_KEY_SECRETRAZORPAY_WEBHOOK_SECRETRAZORPAY_PLAN_HALF_YEARLYRAZORPAY_PLAN_YEARLYCloudinary
CLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRETOther
NEXT_PUBLIC_BASE_URLALPHA_VANTAGE_API_KEY — USD→INR rate for metal price conversionCRON_SECRET — 32+ characters; guards the cron endpointsCRON_SECRET and RAZORPAY_WEBHOOK_SECRET must be non-empty. Secret checks
fail closed and compare in constant time, so an empty value blocks the endpoint
rather than weakening it.
Two cron endpoints, with different auth headers:
# metal prices — every 2 hours
curl -s https://<host>/api/cron/update-prices -H "Authorization: Bearer <CRON_SECRET>"
# risk evaluation — daily
curl -s -X POST https://<host>/api/cron/evaluate-risk -H "x-cron-secret: <CRON_SECRET>"
Trigger update-prices once manually after a first deploy so metal prices are
seeded and LTV isn't blank for the first hour.
Read CLAUDE.md first. It documents the hard invariants — tenant scoping, money and weight precision, server-derived valuation inputs, webhook signature verification, audit-record immutability — each of which has been the source of a real incident. Treat a violation as a bug.
This repository is private and must stay private: its git history contains real customer data from an early ledger import.