Contributing
This guide explains how to contribute to the NanoForge Schematics project.
Prerequisites
Setup
Fork and clone the repository:
git clone https://github.com/<your-username>/schematics.git cd schematics
Ensure you are on the main branch:
git checkout main
Install dependencies:
pnpm install --frozen-lockfile
This also sets up Husky git hooks via the
preparescript.Create a feature branch:
git checkout -b feat/my-feature
Development Workflow
Make your changes in the
src/directory.Run formatting and lint fixes:
pnpm formatBuild the project to verify there are no type errors:
pnpm buildRun the full lint check:
pnpm lint
Commit Convention
This project uses Conventional Commits. Every commit message must follow this format:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Valid types:
Type |
Purpose |
|---|---|
|
A new feature |
|
A bug fix |
|
Documentation changes |
|
Maintenance tasks (deps, CI, tooling) |
|
Code restructuring without behavior change |
|
Performance improvements |
|
Adding or updating tests |
|
Code style changes (formatting, whitespace) |
Examples:
feat(application): add support for custom templates
fix(part-main): correct import ordering for systems
docs: update contributing guide
chore(deps): update angular-devkit to v22
Commit messages are validated by commitlint via a git hook. Commits that do
not follow the convention are rejected.
Pull Request Process
Push your branch to your fork:
git push origin feat/my-feature
Open a pull request against the
mainbranch.Ensure the CI pipeline passes (lint checks).
Request a review from a maintainer.
Once approved, the PR is merged into
main.
Code Style
The project enforces consistent code style through ESLint and Prettier.
Naming conventions:
Files: kebab-case (
part-base.factory.ts)Classes: PascalCase (
MainGenerator)Functions: camelCase (
generateMain)Constants: SCREAMING_SNAKE_CASE (
LIBS_FUNCTIONS_NAME)Enums: PascalCase enum name, SCREAMING_SNAKE_CASE values
Import ordering (enforced by Prettier plugin):
External packages (
@angular-devkit/*)Utility aliases (
@utils/*)Source root aliases (
~/*)Relative imports
Template files under src/libs/**/files/ are excluded from linting and
TypeScript compilation.
Project Structure
When adding code, follow the existing structure:
Schematics:
src/libs/<name>/with factory, schema, options, and filesUtilities:
src/utils/grouped by concernTypes:
.d.tsfiles alongside implementations or insrc/utils/
Dependencies
Dependencies are managed through pnpm workspace version catalogs defined in
pnpm-workspace.yaml. When adding or updating a dependency, use the catalog
reference rather than a direct version.
Reporting Issues
Report bugs and request features on the GitHub Issues page. Issue templates are available to guide your report.
Security
For security vulnerabilities, refer to the SECURITY.md file in the
repository root for the responsible disclosure process.