How k0d13/saykit works
SayKit is a compile-time internationalisation toolkit. Developers author tagged-template or JSX messages; Babel or bundler integrations transform source, and the config CLI extracts messages into formatted catalogues. Applications load catalogues through the small runtime, which provides locale-specific views and ICU formatting; optional React and Carbon adapters expose those capabilities in framework-specific forms. The repository also includes a browser playground for inspecting extraction and transformed output. Edges reflect README statements and shown source/index references; unsampled subsystem links are omitted where evidence is insufficient.
Main entry points: catalogue.ts Catalogue and store · extract-worker.ts Extraction worker · storage.ts Catalogue storage · index.tsx Playground runner
Components 21
Authoring and transforms
- JS transform
packages/transform-js/src/parser.ts - JSX transform
packages/transform-jsx/src/parser.ts - Babel plugin
packages/plugin-babel/src/index.ts - Bundler plugin
packages/plugin-unplugin/src/index.ts
Extraction and catalogues
- Config and CLI
packages/config/src/index.ts - Extraction worker
packages/config/src/features/workers/extract-worker.ts - Catalogue storage
packages/config/src/features/catalogue/storage.ts - File watcher
packages/config/src/features/watch.ts - JSON formatter
packages/format-json/src/formatter.ts - PO formatter
packages/format-po/src/formatter.ts
Runtime and formatting
- Catalogue and store
packages/integration/src/catalogue.ts - Locale view
packages/integration/src/view.ts - ICU formatting
packages/integration/src/messageformat/convert.ts
Framework adapters
- React client runtime
packages/integration-react/src/runtime/client.ts - React server runtime
packages/integration-react/src/runtime/server.ts - React message renderer
packages/integration-react/src/components/renderer.ts - Carbon integration
packages/integration-carbon/src/mixers/with-say.ts
Browser playground
- Playground page
website/app/(home)/playground/page.tsx - Playground runner
website/components/playground/index.tsx - Browser runtime loader
website/components/playground/runtime.ts
Other components
- Application developer
Connections 20
- Application developer → JS transform: authors messages
- Application developer → JSX transform: authors JSX
- Babel plugin → Config and CLI: resolves config
packages/plugin-babel/src/index.ts - Babel plugin → JS transform: transforms source
- Bundler plugin → Config and CLI: integrates config
- Config and CLI → Extraction worker: runs extraction
- Extraction worker → Catalogue storage: writes catalogues
packages/config/src/features/workers/extract-worker.ts - Extraction worker → File watcher: watches changes
packages/config/src/features/workers/extract-worker.ts - Catalogue storage → JSON formatter: formats via
- Catalogue storage → PO formatter: formats via
- Application developer → Catalogue and store: loads catalogues
- Catalogue and store → Locale view: creates views
packages/integration/src/view.ts - Locale view → ICU formatting: formats messages
packages/integration/src/view.ts - React client runtime → Catalogue and store: creates stores
packages/integration-react/src/runtime/client.ts - React server runtime → Catalogue and store: loads view
packages/integration-react/src/runtime/server.ts - React message renderer → React client runtime: reads view
- Carbon integration → Catalogue and store: uses runtime
- Playground page → Playground runner: renders
website/app/(home)/playground/page.tsx - Playground runner → Browser runtime loader: loads runtime
website/components/playground/index.tsx - Playground runner → Application developer: shows extraction