Contributing

Thank you for your interest in contributing to DotPassport SDK!

Getting Started

Prerequisites

  • Node.js 18+

  • npm or yarn

  • Git

Setup

  1. Fork the repository

  2. Clone your fork:

    git clone https://github.com/YOUR_USERNAME/dotpassport-sdk.git
    cd dotpassport-sdk
  3. Install dependencies:

    npm install
  4. Create a branch:

    git checkout -b feature/your-feature-name

Development

Project Structure

Commands

Command
Description

npm run build

Build the SDK

npm run dev

Start development mode

npm test

Run tests

npm run lint

Lint code

npm run format

Format code with Prettier

npm run typecheck

Run TypeScript checks

Running Tests


Code Style

TypeScript

  • Use TypeScript for all source files

  • Export types from public API

  • Prefer interfaces over type aliases for object shapes

  • Use strict mode

Naming Conventions

Type
Convention
Example

Files

kebab-case

api-client.ts

Classes

PascalCase

DotPassportClient

Functions

camelCase

createWidget

Constants

UPPER_SNAKE

DEFAULT_TTL

Types

PascalCase

ScoresResponse

Comments


Pull Request Process

Before Submitting

  1. Run all checks:

  2. Update documentation if you changed public APIs

  3. Add tests for new features

  4. Update CHANGELOG.md with your changes

PR Title Format

Use conventional commit format:

PR Description Template


Reporting Issues

Bug Reports

Include:

  1. SDK version

  2. Environment (browser, Node.js version)

  3. Steps to reproduce

  4. Expected vs actual behavior

  5. Error messages/screenshots

Feature Requests

Include:

  1. Use case description

  2. Proposed solution

  3. Alternative solutions considered


Documentation

Adding New Pages

  1. Create the markdown file in docs/

  2. Add entry to SUMMARY.md

  3. Follow existing page structure

Documentation Style

  • Use clear, concise language

  • Include code examples

  • Add links to related pages

  • Use tables for reference data


Release Process

Releases are managed by maintainers:

  1. Update version in package.json

  2. Update CHANGELOG.md

  3. Create release PR

  4. After merge, tag release

  5. Publish to npm


Code of Conduct

  • Be respectful and inclusive

  • Give constructive feedback

  • Help others learn

  • Report unacceptable behavior


Getting Help


License

By contributing, you agree that your contributions will be licensed under the MIT License.


Last updated