Skip to content

grlt-hub/app-compose

Repository files navigation

App Compose

Lightweight IoC for the front-end. Compose apps you can control and trust.

npm version npm license bundle size zero dependencies Ask DeepWiki npm provenance llms.txt

Learn | Guides | Reference

Note

Beta: This project is currently in beta. The API may change before the stable release.

  • @grlt-hub/app-compose@3.0.0-beta.6
  • @grlt-hub/eslint-plugin-app-compose@3.0.0-beta.6
  • @grlt-hub/app-coda@3.0.0-beta.6

Features

  • Simplicity — lightweight, no containers/providers/decorators, zero dependencies. Framework-agnostic.
  • Clarity — no magic, no globals; context flows through typed wiring.
  • Reusability — same code, different context per compose.
  • Testability — missing context, duplicates, unused wires fail in CI.
  • Observability — your app as plain JSON; hooks for start, complete, fail.

Adopt it gradually

If you want to use App-Compose for a part of your existing app, you don't have to rewrite the rest. Add it to your stack, and bring in more when you're ready.

See it run

A minimal example built on the three key pieces: Task, Tag, and Wire (how they connect). Two features share data without knowing about each other.

import { createTask, createWire, compose, tag } from "@grlt-hub/app-compose"

// where the name to greet will live
const whoToGreet = tag<string>("whoToGreet")

const greeting = createTask({
  name: "greeting",
  run: {
    // greeting reads from it
    context: whoToGreet.value,
    fn: (name) => console.log(`Hello, ${name}!`),
  },
})

const user = createTask({
  name: "user",
  run: { fn: () => ({ name: "World" }) },
})

compose()
  .step(user)
  // filled by the user task
  .step(createWire({ from: user.result.name, to: whoToGreet }))
  .step(greeting)
  .run()

AI tools

App-Compose publishes LLM-friendly docs and is available on DeepWiki.

Cursor

  1. Open chat and type @docs
  2. Click Add new doc
  3. Paste the URL and confirm:
https://app-compose.dev/llms-full.txt

Claude / ChatGPT / Copilot

Paste this URL into the chat — most assistants accept URLs as context:

https://app-compose.dev/llms-full.txt

Use llms-small.txt for models with a smaller context window (e.g. GPT-3.5, free-tier plans).

DeepWiki

Open deepwiki.com/grlt-hub/app-compose and ask anything about the codebase.

Ready to try it?

Quick start — a step-by-step guide to the core concepts. Or browse the full docs and guides.