尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
Find the official maximum retail price of a product in Mauritius and Rodrigues.
The prices come from the four public lists of the Price Fixing Unit
(Ministry of Commerce and Consumer Protection) at https://pfu.govmu.org:
This is an independent project by Aplica. It is not a government website.
The site is static and builds in seconds. The data is pulled separately:查看完整 README ↗Find the official maximum retail price of a product in Mauritius and Rodrigues.
The prices come from the four public lists of the Price Fixing Unit (Ministry of Commerce and Consumer Protection) at https://pfu.govmu.org:
| Key | List | Page |
|---|---|---|
p | Max retail prices | /max-retail-prices-p |
s | Subsidised max retail prices | /max-retail-prices-s |
ph | Max retail prices, pharmaceutical | /max-retail-prices-pharmaceutical |
phs | Subsidised max retail prices, pharmaceutical | /subsidised-mrp-pharmaceutical |
This is an independent project by Aplica. It is not a government website.
The site is static and builds in seconds. The data is pulled separately:
api/pull (a Vercel function, also runnable as npm run pull) reads the
official lists for up to four minutes per run, picking up where the last run
stopped, and keeps what it has in Vercel Blob storage (scripts/lib/collector.mjs).
scripts/lib/outputs.mjs turns those stores into the three files the page loads.api/data serves them from Blob (/data/*.json); until the first pull, the
copy built from site/seed/ at deploy time is served instead.api/medicines searches the official medicines list live for a name.Triggers: Vercel Cron calls /api/pull once a day; any other scheduler can call it
too (rate-limited to once every 20 minutes unless it sends CRON_SECRET).
BLOB_READ_WRITE_TOKEN is added to the project automatically).CRON_SECRET environment variable, so scheduled calls skip the rate limit.Sign-in uses Supabase (free plan is enough to start). Without it, the page works as before and simply shows no sign-in button.
supabase/schema.sql.https://pri.aplica.biz and add it to
Redirect URLs (also https://pri-ashy.vercel.app and http://localhost:4173 for testing).SUPABASE_URL and SUPABASE_ANON_KEY (Supabase, Project Settings, API)SUPABASE_SERVICE_ROLE_KEY (same page; lets people delete their account; never shown to the page)PRI_AUTH_PROVIDERS, e.g. google,facebook,apple,emailOnly the email address (kept by Supabase Auth) and each person's lists are stored; each person can read only their own rows (row level security), and can delete their account from the page.
The pull keeps its copy of the lists in a public Supabase Storage bucket (pri-data,
created automatically) when SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY (or the newer
secret key) are set, which the Supabase integration does on Vercel. Without them it falls
back to Vercel Blob (BLOB_READ_WRITE_TOKEN), then to a local folder. PRI_STORAGE=blob
or PRI_STORAGE=file forces one. For a long run on your own computer, put the same two
Supabase values in .env.local.
The daily four-minute runs would take weeks to walk the whole medicines list, so the first copy is best made from any computer that can run Node for a few hours:
.env.local in the project folder
(it is ignored by git). It looks like BLOB_READ_WRITE_TOKEN="vercel_blob_rw_...".npm install, then npm run check (shows whether the storage answers and
what is in it), then PRI_MINUTES=720 npm run pull
(PowerShell: $env:PRI_MINUTES="720"; npm run pull).The run can be stopped and restarted at any time; progress is saved every couple of minutes, and the hosted site's daily run carries on from the same storage.
npm test # against a local stand-in for the official site
npm run check # test the Blob token and show what is in storage
npm run pull # pull for four minutes (PRI_MINUTES=720 for a long run);
# into Blob with BLOB_READ_WRITE_TOKEN, otherwise into data/store/
npm run build # rebuild site/seed-data from site/seed
npm run dev # preview on http://localhost:4173
Node 20 or later.