尚未偵測到更新。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.