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