Skip to content

kalevski/toolcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

414 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

toolcase 🧰

GitHub

A monorepo of focused, framework-light TypeScript packages for building modern web, Node.js, and HTML5 game projects.

Every package is TypeScript-first, ships dual ESM + CJS (where applicable), is tree-shakeable, and targets Node.js β‰₯ 18. Core packages have zero runtime dependencies.

πŸ“– Live docs and demos: toolcase.kalevski.dev

πŸ“¦ Packages

Package Version What it gives you
🧬 @toolcase/base v Zero-dep helpers and data structures (Cache, PriorityQueue, ObjectPool, State, EventEmitter, retry, JSONSchema, …).
🏷 @toolcase/logging v Tiny isomorphic logger with scoped loggers, log levels, and pluggable reporters.
πŸ“¦ @toolcase/serializer v Runtime protobuf-based binary serializer β€” define schemas in code, encode/decode Uint8Array.
πŸ–₯ @toolcase/node v Node.js backend helpers β€” Fastify routing, Kysely repositories, Redis KV service, typed env, sanitize + pagination + filters + sorts, image processing, OAuth2/OIDC.
🧩 @toolcase/web-components v Framework-free HTML5 Web Components (tc-*) with from-scratch toolcase styling and a Bootstrap-compatible class/grid API β€” drop into any stack without React, Vue, or Angular.
πŸ•Ή @toolcase/phaser-plus v Opinionated runtime for Phaser 4 β€” scene lifecycle, feature registry, object pool, flow events, isometric, shader effects, A*, Tweakpane debugger.

Pick a package

  • Need helpers? β†’ @toolcase/base (works in browser + Node).
  • Need logs? β†’ @toolcase/logging (browser console + custom reporters).
  • Sending binary data over the wire? β†’ @toolcase/serializer (protobuf, no .proto files).
  • Building a Node.js backend? β†’ @toolcase/node (Fastify, Kysely, Redis, OAuth2/OIDC, image processing).
  • Building a UI in any (or no) framework? β†’ @toolcase/web-components (drop-in tc-* custom elements, Bootstrap-compatible classes).
  • Building a Phaser 4 game? β†’ @toolcase/phaser-plus (runtime layer with batteries included).

Install

Each package ships independently. Install only what you need:

npm install @toolcase/base
npm install @toolcase/logging
npm install @toolcase/serializer
npm install @toolcase/node
npm install @toolcase/web-components
npm install @toolcase/phaser-plus phaser

Quick example

import logging from '@toolcase/logging'
import { retry, Cache } from '@toolcase/base'

const log = logging.getLogger('users')
const cache = new Cache<User>(60_000) // 60s TTL

async function getUser(id: string) {
    const cached = cache.get(id)
    if (cached) return cached

    const user = await retry(() => fetchUser(id), { retries: 3 })
    cache.set(id, user)
    log.info('fetched user', id)
    return user
}

Claude Code skills

Each package publishes a Claude Code skill at toolcase.kalevski.dev/<package>/SKILL.md. Install one with:

claude /skill-install https://toolcase.kalevski.dev/base/SKILL.md
claude /skill-install https://toolcase.kalevski.dev/node/SKILL.md
claude /skill-install https://toolcase.kalevski.dev/web-components/SKILL.md
# … etc

Development

This repo is an npm workspaces monorepo.

npm install            # install all workspace deps
npm run build          # build every package
npm test               # vitest, all workspaces
npm run lint           # eslint .
npm run lint:exports   # publint each package's export map
npm run format         # prettier --write .

Per-package commands:

npm -w @toolcase/base run dev               # tsup --watch
npm -w @toolcase/web-components run build    # JS + SCSS bundle
npm -w @toolcase/phaser-plus run typecheck  # tsc --noEmit
npm -w @toolcase/examples run dev           # demo site (Vite)

Run a single test file:

npx vitest run path/to/file.test.ts

Repo layout

base/               @toolcase/base
logging/            @toolcase/logging
serializer/         @toolcase/serializer
node/               @toolcase/node
web-components/      @toolcase/web-components
phaser-plus/        @toolcase/phaser-plus
examples/           Vite + React demo site (deployed to GH Pages)

License

MIT β€” Β© Daniel Kalevski

About

🧰 A collection of JavaScript modules useful for any kind of JavaScript application.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors