This is the marketing/community website for the MONAI project. It is not the
MONAI framework code; that lives at Project-MONAI/MONAI.
- Astro 5.x (static site)
- Tailwind 3.x
- Model Zoo: a self-contained Vue 3 SPA (CDN UMD +
public/src/model-zoo-vue.js, hash routing). It is NOT an Astro island;@astrojs/vuewas removed 2026-06-10. - Deployed to GitHub Pages from
mastervia.github/workflows/deploy.yml - Vitest for unit tests
npm install
npm run dev # http://localhost:3000 + LAN IP
npm run build # outputs dist/
npm test # vitest unit tests- Pages live under
src/pages/. Default to.astrofor new pages..md/.mdxis supported but the site's existing pages use.astrofor layout consistency. - Every page declares a
frontmatterconst withtitle,description,canonical. Optional:audience(array ofresearcher/engineer/clinician/newcomer),schemaType(Course/Article/WebPage),metaRefresh(for redirect-style pages). - Site visual conventions live in
docs/STYLEGUIDE.md(component recipes) anddocs/DESIGN.md(design direction, color roles, migration checklist, decision log). Read both before changing visual design; log notable decisions in DESIGN.md's decision log. - Tailwind classes only, no per-page CSS files.
- Asset naming: images live in category folders with kebab-case names:
public/assets/img/people/<first-last>.<ext>(headshots),public/assets/img/logos/<org>.<ext>(partner/contributor logos),public/assets/img/figures/<page-or-topic>-<name>.<ext>(figures/diagrams), and brand marks inpublic/assets/logo/. No spaces or CamelCase in filenames. - Follow the Writing voice rules in DESIGN.md for all user-facing copy and docs (no em dashes, no marketing AI-isms).
- Inline
<script>must useis:inlineto bypass Vite processing. - Analytics instrumentation (event schema and GA4 setup:
docs/ANALYTICS.md): when adding or editing a page, tag primary CTAs withdata-track="cta_click" data-track-cta-id="<page>_<slug>" data-track-cta-dest="<href>", and filter buttons withdata-track="filter_use"+data-track-filter-type/-value.public/assets/js/track.jshandles the rest; the footer markdown link (md_twin_click) ships site-wide automatically.
build.format: 'file'inastro.config.mjsemitscore.html-style URLs. Internal hrefs are literal*.html, and the nav-active script and md-twins both parse.htmlfilenames. The canonical URL must stayhttps://project-monai.github.iowith.htmlpaths.- Integration order in
astro.config.mjsmatters:mdTwins()must be registered beforellmsTxt()(llms-full.txt reads the twins md-twins emits). src/integrations/llms-config.jsoncurates which pages concatenate intollms-full.txt.- The agent-detect script inlined in
BaseHead.astromust run before gtag; treat that bootstrap as frozen (it has unit tests). - Tailwind's content globs must keep
./public/src/**/*.js, or the Model Zoo's classes get purged from the compiled CSS. - After editing
public/src/model-zoo-vue.js: runnode --checkon it, and keep both branches of:classternaries as complete literal class strings (Tailwind scans literals). npm run buildfirst curlsmodel_data.jsonfrom the live site (fallback:model_data.sample.json); keep that fallback file.public/schema/*.jsonare MONAI bundle metadata schemas served at permanent URLs (https://project-monai.github.io/schema/<file>). Live bundlemetadata.jsonfiles reference them by exact path, so never rename, move, edit, or delete an existing file there. Add new versions as new dated files only. Seepublic/schema/README.md.
npm run build must produce, in dist/:
- One
.htmlper page insrc/pages/ - One
.mdtwin per page (viasrc/integrations/md-twins.ts) llms.txt,llms-full.txt,sitemap-index.xml,sitemap-llms.xml,robots.txt
If any of these are missing after a build, the integration is broken.
Vitest unit tests live under tests/. Run with npm test.
Visual regression tooling (optional, manual):
npm run snapshot:currentcaptures dist screenshots with Puppeteer.npm run diffcompares againstvisual-baseline/(gitignored).
docs/DESIGN.md: design direction, color roles, alignment rules, decision log (canonical for "why")docs/STYLEGUIDE.md: component-level class recipesdocs/ARCHITECTURE.md: stack decision (stay on Astro), simplification history, next stepsdocs/ANALYTICS.md: GA4 operator guide (events, dimensions, dashboards)
- Don't add inline
<style>blocks; use Tailwind utility classes. - Don't add
<!-- #include -->directives; that pattern was retired with the Astro migration. Use Astro components. - Don't add new build scripts under
scripts/without a clear reason; Astro integrations should handle most build-time work. - Don't bump
astroto a major version (currently 5.x) without verifying the ecosystem integrations (@astrojs/tailwind,@astrojs/sitemap,@astrojs/mdx) and the customastro:build:doneintegrations are compatible. - Don't re-add
@astrojs/vue; nothing uses it (the Model Zoo is a CDN SPA).