Free Bootstrap 5 admin template, published to npm as @adminkit/core.
npm run dev: dev server on http://localhost:8080npm run build: build intodist/;npm run previewserves itnpm run lint: ESLint, Prettier, the icon check and the stats check; must passnpm run format: Prettier writenpm run stats: regeneratesrc/data/stats.jsonand the README countsnpm run stats:sync -- --pro ../adminkit-pro: refresh PRO's counts; run it before every release
src/pages/*.htmlare Handlebars pages with YAML frontmatter;src/layoutsandsrc/partialsare partials,src/helpershelpers,src/dataglobal data.src/jsandsrc/scssbuild tojs/app.jsandcss/app.css. Keep the output names: the pages and the npm package use them.js/app.jsstays one self-contained file (no dynamic imports, no chunks);src/types/app.d.tstypes its globals.src/js/head.jsis a blocking script in<head>: it sets the color mode before the first paint and must not import anything.
- Only CSS custom properties get a prefix:
--ak-*, like Bootstrap's--bs-*. Classes, Sass variables, functions and mixins never do. - Light and dark mode: colors that follow the mode use custom properties (
var(--bs-body-color),var(--ak-surface-bg)); dark-only overrides go in@include color-mode(dark) { ... }at the end of the partial. Check both modes. - Icons are Lucide,
<i data-lucide="name"></i>with canonical names from lucide.dev. Add a new icon tosrc/js/modules/icons.js, or lint fails. - Page scripts go in
{{#push "scripts"}}at the end of the page or of the widget's partial, insideDOMContentLoaded. Charts and maps useadminkit.chartjs("#id", function(theme) { ... })andadminkit.vectorMap(...); read colors fromtheme. - JavaScript that enhances markup registers it with
mount(selector, setup)(src/js/modules/mount.js), so markup added later works too. - Counts come from
src/data/stats.json({{formatNumber stats.pages.count}}). Never type a count by hand. - Motion: write transitions with
@include transition(...); under reduced motion nothing moves (a fade is fine). Cards inside.reveal-cardsand.revealelements fade in on scroll without extra code. - Layout shift stays 0: reserve the final size of anything a script draws (
{{> skeleton }}), give imageswidthandheight. - Accessibility: WCAG 2.2 AA in both modes. Text colors come from
readable($color, $background), text on a fill fromtext-on($background). Icon-only buttons get anaria-label; card titles areh2.card-title.
- Conventional Commits, see
CONTRIBUTING.md; lefthook enforces them. Releases follow "Releasing" there. - A PR that changes behaviour adds a short, user-facing line under
UnreleasedinCHANGELOG.md, like "Add pricing page (/pages-pricing.html)" or "Upgrade dependencies".