尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Drug-to-natural-remedy search whose seed data is held to safety invariants by test; fails closed on API errors
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Search a pharmaceutical and get information on the natural remedies related to it: what each is used for, how strong the evidence is, and known interactions with medications. Each relationship is labelled Similar use, Complementary or Supportive, and none is presented as a replacement for a prescribed medication. Live at https://remedi.vivancedata.com.
Remedi is information, not medical advice. Never stop or change a prescribed medication without talking to your doctor or pharmacist.
The interesting part is not the search; it is what the data is not allowed to
say. The seed set (85 drugs, 488 remedies, 235 mappings in
prisma/seed-data/mappings.ts) is held to
pharmacological invariants by
__tests__/seed-data/mappings.test.ts,
so a careless edit fails CI instead of shipping:
Alternative, shown as "Similar use"). Supportive
entries are allowed; a substitute is a test failure.The same stance applies at runtime. If the interactions API fails (rate limit, database blip), the remedy page renders an error. It used to fall through to the empty state and say "no known interactions", which is the one wrong answer a safety checker must never give (#69).
Next.js 16 (App Router, React 19), TypeScript, Bun, Prisma 7 + PostgreSQL,
Tailwind 4, Clerk auth, Stripe, Resend, Sentry. OpenAI is optional and only
powers /api/ai-search.
git clone https://github.com/gr8monk3ys/remedi.git && cd remedi
bun install
cp .env.example .env # defaults work for local dev
docker-compose up -d postgres # Postgres on localhost:5433
bun run init # prisma generate + migrate + seed
bun run dev # http://localhost:3000
curl "http://localhost:3000/api/search?query=ibuprofen"
Search order: local database, then OpenFDA (results are cached back into the
database), then a small in-memory fallback. OPENFDA_API_KEY raises the FDA
rate limit from 40 to 240 requests/min. Set bun run import:fda:dry to preview
a bulk import; see docs/OPENFDA_IMPORT.md.
bun run format:check && bun run lint && bun run type-check && bun run knip
bun run test:run # vitest unit tests (__tests__/)
bun run test:e2e # playwright (e2e/), needs the database
bun run db:verify && bun run db:integrity && bun run prod:check
All of the above run in .github/workflows/ci.yml; test and e2e are the
required checks on main.
app/api/ search, remedy, interactions, favorites, contributions, admin, webhooks
lib/remedy-matcher.ts token-overlap scoring; MIN_DISPLAY_SIMILARITY hides weak mappings
lib/openFDA.ts FDA client with retry
lib/db/ all Prisma access
prisma/seed-data/ curated drugs, remedies and mappings
proxy.ts CSP, CORS and auth-protected routes (Next middleware)
docs/ DEPLOYMENT.md, OPENFDA_IMPORT.md, PWA.md, SENTRY_ALERTS.md
GPL-3.0, see LICENSE.
Informational only, not medical advice. Talk to a physician or pharmacist before changing any medication.