Contributing to xRegistry Package Registries
November 4, 2025 ยท View on GitHub
Thank you for your interest in contributing to the xRegistry Package Registries project! This document provides guidelines and information for contributors.
๐ Getting Started
Prerequisites
- Node.js (v16 or later)
- Docker (for testing and deployment)
- Git
- PowerShell (on Windows) or Bash (on Linux/macOS)
Setting Up the Development Environment
-
Fork and clone the repository:
git clone https://github.com/your-username/xregistry-package-registries.git cd xregistry-package-registries -
Install dependencies:
npm install -
Start the development environment:
# For Windows ./start-servers.ps1 # For Linux/macOS npm run start:all
๐ How to Contribute
Reporting Issues
- Search existing issues before creating a new one
- Use clear, descriptive titles
- Include detailed steps to reproduce the issue
- Specify your environment (OS, Node.js version, etc.)
- Add relevant logs or error messages
Submitting Changes
-
Create a feature branch:
git checkout -b feature/your-feature-name -
Make your changes following our coding standards
-
Test thoroughly (see Testing section below)
-
Commit with clear messages:
git commit -m "feat: add new package registry support" -
Push and create a pull request
Pull Request Guidelines
- Keep PRs focused - one feature or fix per PR
- Write clear descriptions of what changes were made and why
- Include tests for new functionality
- Update documentation if needed
- Ensure CI passes before requesting review
๐งช Testing
Running Tests
# Run unit tests
npm test
# Run integration tests
npm run test:integration
# Run specific registry tests
npm run test:pypi
npm run test:npm
npm run test:maven
npm run test:nuget
npm run test:oci
Testing Guidelines
- Write unit tests for new functions and modules
- Add integration tests for new registry implementations
- Test error scenarios and edge cases
- Verify Docker container functionality
- Test API endpoints manually
Manual Testing
# Test unified bridge
node run-unified-demo.js
# Test individual registries
node test-actual-packages.js
๐๏ธ Project Structure
xregistry-package-registries/
โโโ bridge/ # Unified xRegistry bridge
โโโ npm/ # NPM registry implementation
โโโ pypi/ # PyPI registry implementation
โโโ maven/ # Maven registry implementation
โโโ nuget/ # NuGet registry implementation
โโโ oci/ # OCI registry implementation
โโโ mcp/ # MCP registry implementation
โโโ shared/ # Shared utilities and filters
โโโ test/ # Test suites
โโโ deploy/ # Deployment scripts and Bicep templates
โโโ viewer/ # xRegistry Viewer (git submodule)
๐ Coding Standards
General Guidelines
- Use consistent indentation (2 spaces)
- Follow JavaScript/TypeScript best practices
- Write self-documenting code with clear variable names
- Add comments for complex logic
- Use async/await instead of callbacks
File Naming
- Use kebab-case for file names:
package-registry.js - Use PascalCase for class names:
PackageRegistry - Use camelCase for function names:
getPackageInfo
API Design
- Follow xRegistry specification for all endpoints
- Use consistent error responses
- Include proper HTTP status codes
- Add request/response validation
๐ข Registry Implementation Guidelines
When adding support for a new package registry:
Required Files
- Server implementation (
{registry}/src/server.ts) - Dockerfile (
{registry}.Dockerfilein project root) - Package metadata (
{registry}/package.json) - TypeScript configuration (
{registry}/tsconfig.json) - Tests (
{registry}/tests/**ortest/{registry}/**)
Required Endpoints
All registries must implement these xRegistry endpoints:
GET /- Root documentGET /capabilities- Registry capabilitiesGET /model- Data modelGET /{groupType}- List groupsGET /{groupType}/{groupId}- Group detailsGET /{groupType}/{groupId}/{resourceType}- List resourcesGET /{groupType}/{groupId}/{resourceType}/{resourceId}- Resource details
Configuration
- Use environment variables for configuration
- Support common options (port, baseURL, API key, etc.)
- Provide sensible defaults
- Document all configuration options
๐ง Infrastructure
Docker
- Build multi-platform images (AMD64/ARM64)
- Use official base images when possible
- Minimize image size with multi-stage builds
- Include health checks
GitHub Actions
- Test on multiple platforms (Ubuntu, Windows, macOS)
- Build and test on every PR
- Sign container images with Cosign
- Deploy to staging environments
๐ Documentation
Required Documentation
- Update README.md for user-facing changes
- Update DEVELOPMENT.md for developer changes
- Add JSDoc comments for public APIs
- Include usage examples
Documentation Style
- Use clear, concise language
- Include code examples
- Add diagrams for complex features
- Keep examples up-to-date
๐ฏ Release Process
- Update version in
package.json - Update CHANGELOG.md with new features and fixes
- Create git tag with version number
- GitHub Actions automatically builds and publishes
- Create GitHub release with release notes
๐ค Community
Getting Help
- Create an issue for bugs or feature requests
- Start a discussion for questions or ideas
- Check existing documentation first
Code of Conduct
- Be respectful and inclusive
- Help newcomers get started
- Provide constructive feedback
- Focus on the code, not the person
๐ License
By contributing to this project, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to xRegistry Package Registries! ๐