Contributing

This guide explains how to contribute to the NanoForge Schematics project.

Prerequisites

  • Node.js 25
  • pnpm 10.x

Setup

  1. Fork and clone the repository.
    git clone https://github.com/<your-username>/schematics.git
    cd schematics
    
  2. Ensure you are on the main branch.
    git checkout main
    
  3. Install dependencies.
    pnpm install --frozen-lockfile
    
    This also sets up Husky git hooks via the prepare script.
  4. Create a feature branch.
    git checkout -b feat/my-feature
    

Development Workflow

  1. Make your changes in src/.
  2. Run formatting and lint fixes with pnpm format.
  3. Build the project with pnpm build.
  4. Run the full lint check with pnpm lint.

Commit Convention

This project uses Conventional Commits.
<type>(<scope>): <description>

[optional body]

[optional footer(s)]
Valid types include feat, fix, docs, chore, refactor, perf, test, and style. 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.

Pull Request Process

  1. Push your branch to your fork.
  2. Open a pull request against main.
  3. Ensure the CI pipeline passes.
  4. Request a review from a maintainer.
  5. Merge once approved.

Code Style

The project enforces consistent code style through ESLint and Prettier. Naming conventions:
  • Files: kebab-case
  • Classes: PascalCase
  • Functions: camelCase
  • Constants: SCREAMING_SNAKE_CASE
  • Enums: PascalCase enum name with SCREAMING_SNAKE_CASE values
Import ordering is enforced by the Prettier plugin. Template files under src/libs/**/files/ are excluded from linting and TypeScript compilation.

Project Structure

When adding code, follow the existing structure:
  • Schematics live in src/libs/<name>/
  • Utilities live in src/utils/
  • Types live in .d.ts files alongside implementations or in src/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.

Security

For security vulnerabilities, refer to SECURITY.md in the repository root.