Contributing
UIGen is open source and contributions are welcome. This page covers how to set up the monorepo, run tests, and submit changes.
Monorepo setup
UIGen uses pnpm workspaces. You need Node.js 18+ and pnpm 9+.
# Clone the repo
git clone https://github.com/darula-hpp/uigen.git
cd uigen
# Install all dependencies
pnpm install
# Build all packages
pnpm build
Project structure
uigen/
├── packages/
│ ├── core/ # Framework-agnostic adapters and IR
│ ├── react/ # React renderer
│ └── cli/ # CLI entry point
├── apps/
│ └── docs/ # This documentation site
└── examples/ # Example spec files
See ARCHITECTURE.md for a detailed breakdown of the architecture and design decisions.
Running tests
# Run all tests
pnpm test
# Run tests for a specific package
pnpm --filter @uigen-dev/core test
pnpm --filter @uigen-dev/react test
pnpm --filter @uigen-dev/cli test
Tests use Vitest and fast-check for property-based testing.
Making changes
- Create a branch from
main - Make your changes
- Add or update tests
- Run
pnpm testto verify everything passes - Create a changeset (see below)
- Open a pull request
Changesets
UIGen uses Changesets to manage versions and changelogs. When you make a change that should be released, create a changeset:
pnpm changeset
This prompts you to:
- Select which packages have changed
- Choose the version bump type (major, minor, patch)
- Write a summary of the changes
The changeset file is committed with your PR. See RELEASING.md for the full release process.
Version bump guidelines
| Type | When to use |
|---|---|
| Major | Breaking API changes |
| Minor | New backward-compatible features |
| Patch | Bug fixes and minor improvements |
Code style
- TypeScript strict mode is enabled in all packages
- ESLint is configured at the workspace root
- No
anytypes without a comment explaining why - Tests must pass before merging
Questions
Open an issue on GitHub if you have questions or want to discuss a change before implementing it.