Skip to content

Overview and purpose ​


1.0.0Size: 9.39 KBCoverage: 99.83 % across 300 tests

ARFA Generator is an automation core for frontend development workflows. It brings file generation, architectural checks, and quality tools together in a single pipeline, with optional build integration and a unified report for developers (console output) and LLM agents (CLI feedback).

The tool was created for Automation Ready Frontend Architecture — an approach to building maintainable, long-lived architectures that support automation — but also works for projects with other architectural principles.

The library uses strict typing, has minimal dependencies (chokidar and TypeScript as a peer dependency), and has extensive test coverage.

It can be used in three modes:

  • one-time codegen — run generation and checks before the build process starts, or as needed
  • parallel watch — the bundler and generator watch for changes simultaneously (which causes extra rebuilds)
  • generator-first — only the generator watches for changes, and the build runs in afterCheckers once the codebase has stabilized (the most efficient mode, providing a pipeline with consistent log and error output)

A unified pipeline ​

ARFA Generator connects all the tools in your workflow, whether they modify source files, run external checks, or produce artifacts through a bundler.

The library includes plugins and checkers for common use cases, but you can create your own set for a specific project. Here are some examples of what it can do:

Based on the folder structure and file names, you can generate:

  • _reexport.ts or index.ts barrel files that re-export all public files in a folder
  • a local package.json or index.ts pointing to a component’s main file
  • aggregated structures with types — for example, by collecting pages/*/store.ts files
  • routing maps for asynchronous imports, and more

By also reading file contents, you can:

  • collect localization keys and default values into one or more JSON files to pass to a translation system
  • create validation schemas from TypeScript contracts
  • assemble documentation, check for duplicates and consistent naming, and more

By adding checkers, you can:

  • check types and formatting
  • check that environment variable sets are in sync
  • check module import boundaries
  • use any third-party tools through their CLI, and more

Requirements ​

Requires TypeScript 5 or 6 (for the TS API) and Node.js >=22.17.0. The package is distributed as ESM only.

MIT License