ShopNex
A ready-to-use, self-hostable commerce platform: admin, hosted checkout, Storefront API, webhooks and an app marketplace. No developers required to run a shop.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗من دكتور أسنان لدكتور أسنان… بثقة
A marketplace for used dental equipment in Egypt. A certified technician inspects every device, the buyer's money is held until delivery plus a 3-day trial, and every device comes with a written warranty.
/admin).PHASE1_PROMPT.md. The control-panel requirements in docs/ADMIN_SPEC.md are newer and win where the two differ.DECISIONS.md.design-reference/. Open Demo.html in a browser.| Part | What |
|---|---|
| Site | Next.js 16 (App Router, TypeScript), Arabic RTL, IBM Plex Sans Arabic (self-hosted). Public listings are rendered on the server (fast, Google, link previews). |
| Hosting | Vercel: every push to claude/nice-fermat-y7zom3 deploys. A Cloudflare Workers build (OpenNext) also works; see below. |
| Database + login | Supabase: Postgres with row-level security on every table; login is Google only for now. |
| Photos | Supabase Storage: device-photos (public) and submission-photos (private). Each photo is shrunk in the browser before upload. |
| Business numbers | src/config/business.ts only (fees, percentages, warranty, photo limits). |
| Contact details | The dashboard's «الإعدادات» page, which overrides the defaults in business.ts. |
Requires Node 20+.
npm install
cp .env.example .env.local # then fill in the two NEXT_PUBLIC_* values
npm run dev # http://localhost:3000
Other commands:
npm run lint && npm run typecheck # code checks
npm run build && npm start # production build, http://localhost:3000
npm run preview # the same app on the Cloudflare Workers runtime
The site itself needs only these two. Find them in Supabase → Project Settings → API. Both are safe in the browser, because row-level security protects the data.
| Name | Where |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | https://<project-ref>.supabase.co, with no < > brackets |
NEXT_PUBLIC_SUPABASE_ANON_KEY | the "publishable" / anon key |
NEXT_PUBLIC_SITE_URL | optional: the site's own domain once it has one (for link previews); defaults to the Vercel address |
Only the scripts below use these, so never add them to Vercel. Keep them in .env.local, which git ignores:
| Name | Used by |
|---|---|
SUPABASE_SERVICE_ROLE_KEY | tests, db:set-admin, backup:photos (full access, keep it secret) |
SUPABASE_PROJECT_REF | the same scripts and migrations |
SUPABASE_ACCESS_TOKEN | applying migrations (Management API / Supabase CLI) |
SEED_ADMIN_EMAIL | db:set-admin: this email becomes admin |
supabase/migrations/*.sql in order, with the Supabase CLI (supabase db push) or the SQL editor. The migrations create every table, rule, view and the two photo buckets.https://estemal-tabib.vercel.app; redirect URLs https://estemal-tabib.vercel.app/auth/callback and http://localhost:3000/auth/callback.npm run db:set-admin with SEED_ADMIN_EMAIL set. After that, add team members from «الفريق» in the dashboard.supabase/seed/) is not for production. It only runs when you turn it on explicitly; see supabase/README.md.NEXT_PUBLIC_* variables in Vercel → Project → Settings → Environment Variables.npx wrangler login once, then npm run deploy. Keep cacheComponents off. The free Worker limit is 3 MiB gzipped; check the size with npx wrangler deploy --dry-run --outdir /tmp/w.npm run db:test-rls # security rules against the real database (~150 checks)
npm run e2e -- http://localhost:3000 /tmp/shots 390 # full browser run (phone width)
npm run e2e -- http://localhost:3000 /tmp/shots 1280 # …and desktop
The browser run covers:
/sell sends you to sign-in and keeps your draft./sell with the draft.Both test commands need SUPABASE_SERVICE_ROLE_KEY and SUPABASE_PROJECT_REF. They run against the real database, create throwaway users, and delete everything they made at the end. No emails are sent and Google is never opened. The browser run needs two test PNGs in E2E_MEDIA (see the file header).
Free Supabase projects pause after about a week with no visits. While paused, the site shows «ما قدرناش نحمّل الأجهزة» and nobody can sign in. To restore it:
To avoid pauses, keep the site getting some visits, or move to the Pro plan ($25/month), which never pauses and adds daily backups.
The free plan has no downloadable backups, so take your own, for example once a week and before any big change:
# 1. The database: all data, as SQL
npx supabase db dump --db-url "postgresql://postgres:<DB password>@db.<project-ref>.supabase.co:5432/postgres" --data-only -f backup/data.sql
npx supabase db dump --db-url "…same…" -f backup/schema.sql
# 2. The photos (only downloads new files on later runs)
npm run backup:photos -- ./backup/photos
Find the database password in Supabase → Project Settings → Database. Keep the backup/ folder off GitHub (git ignores it) and copy it somewhere safe, such as Google Drive.
To restore into a new project:
psql "<new db url>" -f backup/data.sql.NEXT_PUBLIC_* values in Vercel.src/app/(site)/ public pages: home, devices, device page, sell, request, account, login
src/app/admin/ control panel (admins; the marketing team sees part of it)
src/lib/ data access (Supabase), store, photos, orders, search, settings
src/config/ business numbers + feature switches (video, email login)
supabase/migrations/ database schema + security rules (already applied)
scripts/ set-admin, RLS tests, photo backup
e2e/ browser test