KitroJS is a modern, TypeScript-first web framework built on:
- React for UI
- File-based routing for pages & API
- Block-based UI for reusable components
- Hono for super-lightweight HTTP/API handling
This repository contains KitroJS Dev Edition v0.1.1 β a lightweight, developer-focused setup without CMS or admin panel. Perfect for:
- quickly building prototypes
- learning the core of KitroJS
- building your own sites/apps on top of the runtime
-
π File-based routing
Every file insrc/pagesautomatically becomes a route. -
π§± Block-based UI
Blocks are just React components β no special magic, just TypeScript + props. -
β‘ API routes out-of-the-box
Files insrc/pages/apibecome Hono-powered API endpoints. -
π§ TypeScript-first
Full type support, clear interfaces and strong DX. -
π Quick setup
Unzip βpnpm installβpnpm run dev:devdemoβ you're ready to go. -
π§© No vendor lock-in
Everything is just React + TS + Hono. You can easily integrate into existing stacks.
This Dev Edition contains:
packages/kitro-runtimeβ HTTP server + runtimepackages/kitro-routerβ file-based routingpackages/kitro-blocksβ base blocks + helpersapps/kitro-dev-demoβ example app with pages, blocks and API routes- OSS files:
LICENSE,NOTICE,AUTHORS,CONTRIBUTING.md,SECURITY.md,COPYRIGHT.txt
Note:
This edition contains no CMS, admin or Studio. This is intentional, so developers can use the core as simply as possible.
- Node.js 18+
- pnpm 8+ or 10+
- Git (optional, for version control)
# 1. Install dependencies
pnpm install
# 2. Start development server
pnpm run dev:devdemoBy default, the dev server runs on http://localhost:3000 (check the console output to confirm).
A minimal setup looks like this:
apps/
kitro-dev-demo/
src/
pages/
index.tsx
docs.tsx
about.tsx
api/
hello.ts
packages/
kitro-runtime/
kitro-router/
kitro-blocks/
LICENSE
NOTICE
AUTHORS
CONTRIBUTING.md
SECURITY.md
COPYRIGHT.txt
README.md
Key directories:
apps/kitro-dev-demo/src/pagesβ all UI pages (React components)apps/kitro-dev-demo/src/pages/apiβ API routes (Hono handlers)packages/kitro-blocksβ shared blocks (Heading, Text, Card, etc.)
Every file in src/pages automatically becomes a route.
Example: src/pages/about.tsx:
import React from "react";
export default function AboutPage() {
return (
<main>
<h1>About KitroJS</h1>
<p>KitroJS is a modern React/TypeScript framework.</p>
</main>
);
}Route: /about
Rules:
index.tsxβ/docs.tsxβ/docscontact.tsxβ/contact
No extra config needed.
Blocks are reusable React components with clear TypeScript props.
Example: a simple CustomBlock:
// packages/kitro-blocks/src/CustomBlock.tsx
import React from "react";
export interface CustomBlockProps {
title: string;
description?: string;
}
export function CustomBlock({ title, description }: CustomBlockProps) {
return (
<section>
<h2>{title}</h2>
{description && <p>{description}</p>}
</section>
);
}Export in index.ts:
export * from "./CustomBlock";Use in a page:
import React from "react";
import { CustomBlock } from "@kitro/blocks";
export default function HomePage() {
return (
<main>
<h1>Welcome to KitroJS</h1>
<CustomBlock
title="Blocks are just React"
description="No magic, just components and props."
/>
</main>
);
}All files in src/pages/api become API endpoints.
Example: src/pages/api/hello.ts:
import type { Context } from "hono";
export default async function handler(c: Context) {
const name = c.req.query("name") ?? "Developer";
return c.json({ message: `Hello, ${name}!` });
}Routes:
/api/helloβ{"message": "Hello, Developer!"}/api/hello?name=Nicoβ{"message": "Hello, Nico!"}
Want to create a new API route?
Simply create a new file, for example:
src/pages/api/test.tsβ/api/test
The Dev Edition is set up for fast feedback during development:
- Modify code in
src/pagesorpackages/kitro-blocks - Browser reloads automatically (or via hot reload, depending on dev-server setup)
If you're not sure if hot reload works:
- Start dev server:
pnpm run dev:devdemo - Open browser at
http://localhost:3000 - Modify some text in
src/pages/index.tsx - Save β check if the change is immediately visible
Note: Dev Edition focuses on DX. The following is a basic example; adjust it to your infrastructure.
1. Build
pnpm run build:devdemoThis generates a production build for the demo app.
2. Start in production mode
pnpm run start:devdemoYou can run this with PM2 or systemd:
PM2 example:
pm2 start "pnpm run start:devdemo" --name kitrojs-dev
pm2 saveThere is no official testing guide yet, but this is the planned direction:
- Pages & Blocks: React Testing Library + Vitest/Jest
- API routes: Hono + supertest/undici
Suggestions and PRs for a testing setup are welcome in CONTRIBUTING.md.
Short roadmap for future versions:
- Extended hot-reload documentation
- Official testing setup & examples
- Performance tips & best practices
- Integration examples (auth, database, etc.)
- Examples of larger apps (dashboard, blog, landing pages)
We welcome contributions!
Read first: CONTRIBUTING.md
Quick summary:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m "Add my new feature" - Push to your fork:
git push origin feature/my-feature - Open a Pull Request
Security issues?
Read SECURITY.md and email:
Do not report vulnerabilities publicly in issues or PR titles.
- License: MIT
- Copyright: COPYRIGHT.txt
- Notice: NOTICE
- Authors: AUTHORS
KitroJS is developed by Nico Vermaeck and will gradually grow with community contributions.
If you use KitroJS in a project, we'd love it if you place a small reference somewhere like:
"Built with KitroJS"
But it's not required.