The home of the hapi.dev developer portal.
Built with VitePress, Vue 3, and TypeScript.
Clone the repo and install dependencies:
pnpm installCreate a .env file in the root directory with a GitHub token:
GITHUB_TOKEN="YOUR_TOKEN"
You can obtain a token from GitHub Settings. The token needs these scopes:
- repo:status — Access commit status
- public_repo — Access public repositories
Fetch module data from GitHub and npm:
pnpm fetch-dataStart the dev server:
pnpm devThe site will be available at http://localhost:5173 with hot reload.
Build the full site (fetch data + static generation):
pnpm generatePreview the built site:
pnpm previewcli/ # TypeScript CLI for fetching module data from GitHub/npm
components/ # Vue 3 components
docs/ # VitePress markdown pages and static assets
├── api/ # hapi core API docs (dynamic routes)
├── module/ # Module pages (install, API, changelog)
├── tutorials/ # Tutorials in 5 languages (en_US, ko_KR, pt_BR, tr_TR, zh_CN)
├── policies/ # Policy pages
├── resources/ # Resources (changelog, status, books, etc.)
└── public/ # Static assets (images, plugins.json)
generated/ # Auto-generated data (from pnpm fetch-data)
├── metadata/ # modules.json central registry
├── modules/ # Per-module info and changelog JSON
└── markdown/ # Raw API docs, changelogs, policies
.vitepress/ # VitePress config and theme
Tutorials live in docs/tutorials/{locale}/ with one markdown file per tutorial. Available locales: en_US, ko_KR, pt_BR, tr_TR, zh_CN.
To add a new translation, create a directory under docs/tutorials/ with the locale code (e.g. fr_FR) and add markdown files matching the English tutorial filenames.
hapi.dev maintains a list of community-created plugins at hapi.dev/plugins. The plugin data lives in docs/public/lib/plugins.json. To add a plugin, send a pull request with your addition. Please keep plugins in alphabetical order within their category.
pnpm lint # Run oxlint
pnpm fmt # Check formatting with oxfmt
pnpm test # Run lint + fmt + TypeScript checkThe site is deployed to Netlify. See netlify.toml for the build configuration. The build command is pnpm generate which fetches data and builds the static site to dist/.
