Skip to content

Repository files navigation

KashMOX — TrPharma Antibiotics Portal

Standalone Next.js 14 app for kashmox.thinkroman.com. Independent of the main thinkromanpharma.com repo — no shared middleware, no shared SITE_URL, own Vercel project.

Structure

  • / — KashMOX 625 (flagship, lives at the domain root on purpose — the exact-match brand term gets the exact-match URL).
  • /antibiotics — portal listing, KashMOX first, then every other entry in src/data/antibiotics.ts, in order.
  • /antibiotics/[slug] — one shared template (MonographPage.tsx) renders every non-flagship antibiotic from its data entry.

How a new antibiotic propagates

The structured monograph content — mechanism, indications, dosage table, FAQs, contraindications — is generated from src/data/antibiotics.ts. The identity fields (name, tagline, one-line description, photo) sync live from pharma247 on top of that, via withLiveIdentity() in src/action/products.ts — same endpoint, same PHARMA_API_SECRET, same cache tag as the main thinkromanpharma.com repo.

Why only identity fields sync live, not the whole page: pharma247's API returns heading/tagline/desc/img plus one longDesc rich-text blob — it has no separate fields for dosage, FAQs, mechanism, or contraindications. Until that schema grows those fields, the structured monograph content has to live here. If pharma247 is unreachable or doesn't have a slug, withLiveIdentity() falls back to the local values — a pharma247 outage never takes this site down.

To add a new antibiotic:

  1. Add a new object to the antibiotics array in src/data/antibiotics.tssourceSlug should match its slug in pharma247 if you want its name/tagline/photo to sync live; leave the other fields structured (see the existing three for shape).
  2. Pick an order number and an accent (mox / fex / zee — add a new Tailwind color pair in tailwind.config.ts for a new accent).
  3. Done. The [slug] route statically generates the page, the portal listing picks it up automatically, and the sitemap includes it automatically. No route or template changes needed.

Env vars

  • PHARMA_API_SECRET — required. Same value used by the main thinkromanpharma.com repo. Set directly in the Vercel project's environment variables, never committed.

Deploy

New Vercel project, domain kashmox.thinkroman.com attached in project settings, DNS CNAME added wherever thinkroman.com's DNS lives.

Releases

Packages

Contributors

Languages