Thanks for thinking about contributing. FixedCode is a spec-driven, deterministic code-generation engine — same spec, same code, every time. The codebase is small and welcoming to outside changes.
Requirements:
- Node.js ≥ 20
- npm (bundled with Node)
- git
git clone git@github.com:gibbon/fixedcode.git
cd fixedcode
# install engine dependencies
cd engine && npm install && cd ..
# install each bundle/generator's deps as needed
cd bundles/spring-domain && npm install && cd ../..engine/ TypeScript engine — CLI, pipeline, types
bundles/ Template packages (one npm package per bundle)
generators/ Programmatic (non-template) generators
examples/ Working examples with specs and generated output
docs/ Architecture, bundles, generators, CFR docs
.github/workflows/ CI and release pipelines
Each bundle and generator is a self-contained npm package with its own package.json, schema, templates, tests.
# build the engine
cd engine && npm run build && cd ..
# run a generation against an example
node engine/bin/fixedcode.js generate path/to/your-spec.yaml -o /tmp/out
# verify the output matches the spec's expectations
node engine/bin/fixedcode.js verify path/to/your-spec.yaml /tmp/out
# run tests
cd engine && npm testIf you've installed the CLI globally (npm install -g fixedcode), the binary is fixedcode.
See docs/bundles.md for the full guide. The fast path:
node engine/bin/fixedcode.js bundle init <name>scaffolds the project structure.- Edit
src/index.ts— set thekind, declare your spec schema, implementenrich(). - Drop Handlebars templates into
templates/. - Add tests under
test/. - Open a PR.
See docs/generators.md. Generators differ from bundles in that they produce output programmatically, not from templates. The OpenAPI generator under generators/openapi/ is a worked example.
We use vitest across all packages. Run npm test from the package directory. New features should land with tests; security-sensitive changes must include regression tests.
Follow Conventional Commits style. Common prefixes:
feat(<scope>): …— new featurefix(<scope>): …— bug fixdocs: …— docs onlybuild: …— dependency or build-tooling changesci: …— CI workflow changeschore: …— anything else
The <scope> is usually the package: engine, spring-domain, etc.
- CI green (typecheck, lint, test, build, smoke)
- New code has tests
- Public API changes have docs updates
- Commit messages follow the convention above
- CHANGELOG.md
[Unreleased]section updated for user-visible changes
- Bugs: open an issue using the Bug report template.
- Feature requests: use the Feature request template.
- Questions: use the Question template (or start a discussion if your repo has them enabled).
- Security issues: see
SECURITY.md— please do not open public issues.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.