This project contains a set of read-only xRegistry server implementations that proxy several popular package registries (NPM, PyPI, Maven, NuGet, OCI, MCP) behind a unified xRegistry-compliant API.
In addition, the project contains a bridge service that merges the individual registries into a single API endpoint, providing a consolidated view of all package metadata.
This shows how the CNCF xRegistry model can be used to create a unified metadata graph for dependency management across multiple package ecosystems for polyglot applications.
The API and model declarations follow the official xRegistry specification that is being developed as a CNCF sandbox project at https://github.com/xregistry/spec
- Unified API: Single endpoint for all package registries
- xRegistry Compliant: Follows the official xRegistry specification
- Multi-Registry Support: NPM, PyPI, Maven, NuGet, and OCI registries
- Docker Ready: Containerized deployment with Docker Compose
- Azure Integration: Deploy to Azure Container Apps with GitHub Actions
- Bridge Architecture: Intelligent proxy routing to backend services
- Node.js v16 or later
- Docker (optional, for containerized deployment)
- Git
# Clone the repository
git clone https://github.com/xregistry/xrproxy.git
cd xrproxy
# Install dependencies
npm installFor Windows:
# Command Prompt
start-servers-dynamic.bat
# PowerShell
.\start-servers.ps1# Start all services
docker-compose up
# Start in background
docker-compose up -d
# Start specific services
docker-compose up npm pypi# Start NPM registry
npm run start:npm
# Start PyPI registry
npm run start:pypi
# Start unified bridge (requires other services running)
npm run start:bridgeThe bridge server can optionally serve the xRegistry Viewer web interface:
# PowerShell (Windows)
.\start-bridge-with-viewer.ps1
# Bash (Linux/Mac)
./start-bridge-with-viewer.shAccess the viewer at: http://localhost:8080/viewer/
Features:
- Web-based UI for browsing xRegistry services
- Visualize package metadata across all registries
- Built-in CORS proxy for external xRegistry endpoints
- Flexible routing (API at root or
/registry/)
See bridge/VIEWER.md for complete documentation.
Once running, the unified bridge provides these endpoints at http://localhost:8080:
GET /- Root document with all registry informationGET /model- Unified data model from all registriesGET /capabilities- Combined capabilities from all services
GET /noderegistries- NPM packages (Node.js)GET /pythonregistries- PyPI packages (Python)GET /javaregistries- Maven packages (Java)GET /dotnetregistries- NuGet packages (.NET)GET /containerregistries- OCI images (Containers)GET /mcpproviders- MCP packages (Model Context Protocol)
# Get unified model showing all registry types
curl http://localhost:8080/model
# Browse NPM packages
curl http://localhost:8080/noderegistries
# Get capabilities from all registries
curl http://localhost:8080/capabilitiesThe project uses a bridge architecture where:
-
Individual Registry Services run on separate ports:
- NPM: 3000
- PyPI: 3100
- Maven: 3200
- NuGet: 3300
- OCI: 3400
- MCP: 3600
-
Unified Bridge Service (port 8080) provides:
- Single API endpoint
- Model and capability merging
- Intelligent request routing
- Authentication management
# Test unified bridge
curl http://localhost:8080/
# Check all registries are merged
curl http://localhost:8080/model | jq '.groups | keys'
# Should return: ["containerregistries", "dotnetregistries", "javaregistries", "noderegistries", "pythonregistries"]# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downThe xRegistry Package Registries project includes fully automated deployment to Azure Container Apps:
# Set variables
RG_NAME="rg-xregistry-prod"
LOCATION="eastus"
ACR_NAME="xregistryacr"
ACA_ENV_NAME="cae-xregistry-prod"
ACA_NAME="ca-xregistry-unified"
# Create resource group and resources
az group create --name $RG_NAME --location $LOCATION
az acr create --resource-group $RG_NAME --name $ACR_NAME --sku Standard --admin-enabled true
az containerapp env create --name $ACA_ENV_NAME --resource-group $RG_NAME --location $LOCATIONCI/CD Integration:
- Automated deployments via GitHub Actions workflows
- Multi-platform container builds (AMD64/ARM64)
- Security scanning and health verification
Monitoring and Health:
- Built-in health check endpoints
- Application Insights integration
- Container logs accessible via Azure CLI
Scaling and Updates:
# Configure auto-scaling
az containerapp update --name $ACA_NAME --resource-group $RG_NAME \
--min-replicas 1 --max-replicas 10
# View revisions for rollback
az containerapp revision list --name $ACA_NAME --resource-group $RG_NAMEResource Optimization:
- Optimized container configuration (1.75 CPU + 3.5GB memory)
- Resource sharing across registry services
- Non-root container execution for security
- HTTPS-only ingress for secure communications
See DEPLOYMENT.md for comprehensive details on:
- Azure Container Apps deployment
- GitHub Actions CI/CD setup
- Production configuration options
- Monitoring and health checks
- Scaling and auto-scaling options
- Security and resource optimization
| Variable | Default | Description |
|---|---|---|
XREGISTRY_PORT |
8080 |
Bridge server port |
XREGISTRY_ENABLE |
npm,pypi,maven,nuget,oci |
Enabled registries |
XREGISTRY_BASEURL |
Auto-detected | Base URL for responses |
XREGISTRY_API_KEY |
None | Global API key |
NODE_ENV |
development |
Environment mode |
Each registry can be configured individually:
# Custom ports
XREGISTRY_NPM_PORT=5000 npm run start:npm
XREGISTRY_PYPI_PORT=5001 npm run start:pypiWe welcome contributions! Please see CONTRIBUTING.md for:
- Development setup
- Coding standards
- Testing guidelines
- Pull request process
# Set up development environment
npm install
# Start services for development
cd test/integration
node run-docker-integration-tests.js
# In another terminal, start bridge
cd bridge
npm run build
PORT=8080 node dist/proxy.jsSee DEVELOPMENT.md for detailed development documentation.
- DEVELOPMENT.md - Comprehensive development guide
- DEPLOYMENT.md - Production deployment guide
- CONTRIBUTING.md - Contribution guidelines
- CHANGELOG.md - Project change history
- bridge/VIEWER.md - xRegistry Viewer integration guide
- xRegistry Specification - See the official xRegistry specification for standard compliance details
Port conflicts:
# Use dynamic port assignment
.\start-servers-dynamic.batServices not starting:
# Check dependencies
npm install
# Verify Node.js version
node --version # Should be v16+Bridge not connecting:
# Rebuild bridge
cd bridge && npm run build
# Check backend services are running
curl http://localhost:3000/noderegistries
curl http://localhost:3100/pythonregistries- π Check existing issues in the GitHub repository
- π Report bugs with detailed steps to reproduce
- π‘ Request features through GitHub Discussions
- π Read the docs in the linked guides above
This project is licensed under the MIT License - see the LICENSE file for details.
- Built following the xRegistry specification
- Supports NPM, PyPI, Maven, NuGet, and OCI registries
- Designed for cloud-native deployment on Azure Container Apps
Ready to get started? Use Docker Compose (docker-compose up) or the startup scripts to launch all services!