Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
565c810
Add Katana Bun/TypeScript reimplementation requirements
JGillam Dec 26, 2025
ca65f10
Change default TLS port from 8443 to 443
JGillam Dec 26, 2025
7a46d99
Enhance lock mode and add EC2 deployment guidance
JGillam Dec 26, 2025
73657a6
Add .CLAUDE_LAST_SESSION.md to .gitignore
JGillam Dec 26, 2025
22b18cb
Add Bun/TypeScript implementation plan
JGillam Dec 27, 2025
9a87da8
Initialize Bun/TypeScript project structure (Phase 1.1)
JGillam Dec 27, 2025
7d40e8a
Add Zod schemas and fix module YAML validation issues (Phase 1.2)
JGillam Dec 27, 2025
9601446
Add module loader and missing task types (Phase 1.3)
JGillam Dec 27, 2025
90cb0bf
Add CLI commands using Commander.js (Phase 1.4)
JGillam Dec 27, 2025
79a5f8d
Add CLI command tests (Phase 1.5)
JGillam Dec 27, 2025
96aea0b
Add StateManager for state persistence (Phase 2)
JGillam Dec 27, 2025
dd47708
Complete Phase 2: Config system, init command, list lock mode
JGillam Dec 27, 2025
3d29947
Complete Phase 3: Plugin architecture with mock mode support
JGillam Dec 27, 2025
e8507c1
Complete Phase 4: Dependency resolution and status checking
JGillam Dec 28, 2025
4c2d6b5
Complete Phase 5: Web Server & REST API
JGillam Dec 28, 2025
caa5723
Add self-sufficient binary with module fetching from GitHub
JGillam Dec 29, 2025
b7e4118
Strengthen server lock mode as auth mechanism
JGillam Dec 29, 2025
e97b087
Add GitHub Actions workflow for release builds
JGillam Dec 29, 2025
25e727d
Add certificate management and systemd service support
JGillam Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
build-linux:
runs-on: ubuntu-latest
defaults:
run:
working-directory: bun

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run tests
run: bun test

- name: Build binary
run: bun run build

- name: Rename binary with version
run: |
VERSION=${GITHUB_REF#refs/tags/}
mv bin/katana bin/katana-linux-amd64-${VERSION}

- name: Upload release asset
uses: softprops/action-gh-release@v2
with:
files: bun/bin/katana-linux-amd64-*
fail_on_unmatched_files: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,7 @@ fabric.properties
.idea/*
*.iml
.vagrant/

# Claude Code artifacts
.CLAUDE_LAST_SESSION.md
.claude/
39 changes: 39 additions & 0 deletions bun/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# dependencies (bun install)
node_modules

# output
out
dist
bin/
katana
*.tgz

# code coverage
coverage
*.lcov

# logs
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# caches
.eslintcache
.cache
*.tsbuildinfo

# IntelliJ based IDEs
.idea

# Finder (MacOS) folder config
.DS_Store

# Claude session files
.CLAUDE_LAST_SESSION.md
106 changes: 106 additions & 0 deletions bun/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@

Default to using Bun instead of Node.js.

- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
- Use `bun test` instead of `jest` or `vitest`
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
- Use `bunx <package> <command>` instead of `npx <package> <command>`
- Bun automatically loads .env, so don't use dotenv.

## APIs

- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
- `Bun.redis` for Redis. Don't use `ioredis`.
- `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
- `WebSocket` is built-in. Don't use `ws`.
- Prefer `Bun.file` over `node:fs`'s readFile/writeFile
- Bun.$`ls` instead of execa.

## Testing

Use `bun test` to run tests.

```ts#index.test.ts
import { test, expect } from "bun:test";

test("hello world", () => {
expect(1).toBe(1);
});
```

## Frontend

Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.

Server:

```ts#index.ts
import index from "./index.html"

Bun.serve({
routes: {
"/": index,
"/api/users/:id": {
GET: (req) => {
return new Response(JSON.stringify({ id: req.params.id }));
},
},
},
// optional websocket support
websocket: {
open: (ws) => {
ws.send("Hello, world!");
},
message: (ws, message) => {
ws.send(message);
},
close: (ws) => {
// handle close
}
},
development: {
hmr: true,
console: true,
}
})
```

HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.

```html#index.html
<html>
<body>
<h1>Hello, world!</h1>
<script type="module" src="./frontend.tsx"></script>
</body>
</html>
```

With the following `frontend.tsx`:

```tsx#frontend.tsx
import React from "react";
import { createRoot } from "react-dom/client";

// import .css files directly and it works
import './index.css';

const root = createRoot(document.body);

export default function Frontend() {
return <h1>Hello, world!</h1>;
}

root.render(<Frontend />);
```

Then, run index.ts

```sh
bun --hot ./index.ts
```

For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
Loading
Loading