๐ Get Started with KIMU Core โ
Welcome to KIMU โ Keep It Minimal UI Framework!
This guide will walk you through the basic steps to download, install, and run the core-framework for the first time.
๐ง Prerequisites โ
Before you start, make sure the following tools are installed on your system:
Git โ to clone the repository and manage code versions
Recommended: version โฅ 2.30Node.js โ to install and run the project dependencies
Recommended: LTS version (โฅ 18.x)
This also includesnpm, the Node.js package managerTypeScript โ required for compiling
.tsfiles
Install locally with:bashnpm install --save-dev typescriptOr install globally with:
bashnpm install -g typescript(Optional) Python 3.x โ used for the
py-serverscript to quickly serve static files from thedistdirectory:bashpython3 -m http.server 5173 --directory ./dist
๐ก You can verify the installation by running:
git --version
node -v
npm -vIf any of these commands fails, please install the corresponding tool from the links above before continuing.
๐๏ธย How to create a new project with KIMU Core โ
This section guides you step-by-step in creating a new project using KIMU Core as a framework, ideal for those starting from scratch and developing custom extensions.
1. Recommended project structure โ
Organize your project as follows:
my-kimu-app/
src/
core/ # (optional) Core overrides or extensions
extensions/ # Your custom extensions
utils/ # Utilities
models/ # Data models
tests/ # Tests
scripts/ # CLI scripts
docs/ # Documentation
dist/ # Production build
package.json
tsconfig.json
README.md2. Initialize the project and install KIMU Core โ
git clone https://github.com/UnicoVerso/kimu-core.git
# or, if available on npm:
# npm install kimu-core
cd my-kimu-app
npm init -y
npm install --save-dev typescript
# Copy/create a suitable tsconfig.json (you can use the one from kimu-core as reference)3. Create your first extension โ
- Create a folder in
src/extensions/hello-world/ - Inside, create these files:
component.ts(main logic)style.css(styles)view.html(UI template)
Example component.ts:
import { KimuComponent } from 'kimu-core/src/core/kimu-component';
import { KimuComponentElement } from 'kimu-core/src/core/kimu-component-element';
@KimuComponent({
tag: 'hello-world',
name: 'Hello World',
version: '1.0.0',
description: 'Minimal example extension',
author: 'YourName',
icon: '๐',
internal: false,
path: 'hello-world',
dependencies: []
})
export class HelloWorldComponent extends KimuComponentElement {
onInit() {
console.log('Hello World extension loaded!');
}
}4. Register the extension โ
Add your extension to the extension-manifest.json file at the project root, for example:
[
{
"tag": "hello-world",
"name": "Hello World",
"version": "1.0.0",
"description": "Minimal example extension",
"author": "YourName",
"icon": "๐",
"internal": false,
"path": "hello-world",
"dependencies": []
}
]5. Best practices and checklist โ
- Follow KIMU Core style and structure conventions
- Write modular and well-documented code
- Use only KIMU Core public APIs
- Add tests in
/testsand update documentation in/docs - Always consult the official documentation and update yours if you add new features