Code for site audioguidekit.org — an open-source, self-hosted PWA audio guide player for museums and cultural institutions.
AudioGuideKit is an open-source audio guide solution designed for museums, galleries, and cultural institutions:
- Self-hosted PWA player — works on any device without app stores
- Offline support — content caches automatically
- Multilingual — built-in support for multiple languages
The player component is available at @audioguidekit/react-player
npm install
npm run devAuto-deploy to Vercel once the code is pushed ti Guthub.
npm run build converts every prerendered page into markdown in public/md/ (gitignored) using the web-for-agents library, vendored as vendor/web-for-agents-*.tgz (its source is kept outside this repo). src/middleware.ts serves that markdown when an agent sends Accept: text/markdown or requests /page.md.
- New pages must set
alternates: { canonical: <own URL>, types: { 'text/markdown': mdPath(<path>) } }in their metadata. The root layout deliberately sets no canonical, because Next mergesalternatesshallowly. A'use client'page gets its metadata from a routelayout.tsx(seesrc/app/updates/layout.tsx). - Updating the library: the site keeps using the vendored tarball until it's replaced. After changing web-for-agents, run
npm pack --pack-destination <this repo>/vendorin the library, delete the old tarball, pointpackage.jsonat the new file, runnpm install, and commit the tarball with the lockfile. - Check after deploy:
curl -H "accept: text/markdown" https://audioguidekit.org/docsshould returntext/markdown.
MIT