@lauvivans/kami
v3.0.0
Published
A Notion-based portfolio
Downloads
3,074
Readme
Kami
A Vue component library for building a portfolio that looks and works like Notion: a sidebar with nested pages, tabs, themes and Notion-style blocks. It ships as the npm package @lauvivans/kami, with a CLI that creates a new portfolio from a template.
The idea came from Nitin Ranganath's VS Code Portfolio. Documentation and a demo: kami.arualvivan.com.
Features
- Sidebar with the author, Favorites and nested pages. It can be pinned open or closed.
- Tabs for navigation, as in Notion Desktop. Open tabs survive a reload.
- Four themes: Light, Dark, Catppuccin Latte and Catppuccin Mocha.
- Page settings: font (Default, Serif or Mono, from the system fonts), small text and full width.
- Blocks for page content: text, headings, code with syntax highlighting, callouts, lists, columns, links, bookmarks, images and a database gallery.
- Preferences are kept in the browser's local storage. There is no backend.
- Search is not built yet.
The full list is in docs/product/requirements.md.
Requirements
Node.js ^20.19.0 || >=22.12.0, for both the CLI and the project it creates. CI creates and builds a project on Node 20.19.0, 22.12.0 and the version in .nvmrc.
On Node versions below 22.22, npm install prints EBADENGINE warnings for chokidar, ast-walker-scope and the ast-kit and @babel/* 8 packages under it. They all come from vue-router 5 and are only used by its file-based routing plugin (vue-router/vite), which Kami doesn't use, so the project still installs and builds.
Create a portfolio
npx @lauvivans/kami my-portfolioThe CLI copies the template into ./my-portfolio (the name defaults to my-portfolio), installs its dependencies and then installs @lauvivans/kami. The template has one example page, a banner and an icon. It stops with an error if the folder already exists.
cd my-portfolio
npm run devEach page is a Vue component listed in src/metadata/index.ts. The client docs explain how to add pages and deploy.
Develop locally
Use the Node version in .nvmrc.
git clone https://github.com/lauvivans/kami.git
cd kami
npm install
npm run devnpm run dev serves the documentation site in src/, which imports the library from packages/core/, so it also works as the playground.
| Script | What it does |
| ------------------- | ------------------------------------------------ |
| npm run dev | Serves the documentation site. |
| npm run build | Type checks and builds the site into dist/. |
| npm run build:pkg | Type checks and builds the package into dist/. |
| npm run lint | Runs ESLint. |
| npm run format | Runs Prettier on the repository. |
| npm test | Runs the Vitest tests. |
| npm run test:cli | Runs the CLI from the local clone. |
Branches and releases
Kami follows GitHub flow (decision 003):
mainis the only long-lived branch. Each change goes in a branch named<type>/<issue>-kebab-case-nameand is opened as a pull request intomain.- The pull request title follows Conventional Commits. Pull requests are squash-merged, so the title becomes the commit on
main. - The pull request description follows the template, which GitHub fills in when the pull request is opened: summary, changes, how it was tested, dependencies (when any changed), a checklist and the issue it closes.
- release-please keeps a Release PR open with the next version and its changelog (decision 004). Each merge updates it when the commit calls for a release:
fixandperfadd a patch,feata minor, and!or aBREAKING CHANGEfooter a major.chore,docs,test,ciandrefactoradd nothing. - Merging the Release PR tags the version, creates a draft GitHub release and stages the package on npm. A maintainer approves it with 2FA on npmjs.com, which puts the version live, and then publishes the draft release on GitHub.
Design decisions are in docs/decisions/.
Tools
