beta

# Development

# Architecture

The OpenUPM service is composed of below sub-systems:

  • Public upm registry
  • *Automatic build pipelines
  • *Website frontend
  • *Website backend (API)
  • *Package curated list
  • OpenUPM-CLI command line tool

Entries with * prefix are located in the main repository.

# Directory Structure

.
├── app         # service backend
│   ├── db         # database, redis
│   ├── jobs       # background jobs
│   ├── models     # models
│   ├── queues     # job queues
│   ├── utils      # useful scripts
│   └── views      # http endpoints
├── config       # configurations
├── data         # data
│   └── packages # package curated list (yaml files)
├── docs         # web frontend (vuepress)
└── tests        # unit tests

# Public UPM Registry

OpenUPM uses a custom verdaccio to host the registry. Though verdaccio is the most popular open source project to setup a private npm registry, most deployments served very limited user base or for testing purpose that don't care about performance much. OpenUPM try to solve quite a few issues related to the cluster deployment. Before these PRs get merged, OpenUPM will stay with the custom build:

  • S3 storage with CDN #250
  • Stateless s3 storage for cluster deployment #1595, #1459
  • Commands npm publish -f and npm unpublish return 404 #1435
  • Wrong timestamp for old search api #1597

Since OpenUPM has it's own way to organize package list, the verdaccio website and api endpoints are disabled (headless mode).

# Automatic Build Pipelines

OpenUPM watches the package curated list regularly, detects new contents and uses the job queue to build packages through Azure Pipelines.

# Job Queue

OpenUPM uses Bee-Queue to manage the job queue.

Job Description
build-pkg:<pkg> fetch repo info and create build-rel jobs for valid git tags
build-rel:<pkg>:<ver> build pkg@version via Azure Pipelines

# Website Frontend

OpenUPM uses VuePress - a static website generator to develop website frontend.

yarn docs:dev

# Website Backend

OpenUPM uses Express to develop website backend (API).

yarn server:dev

# Package Curated List

OpenUPM uses git as a database to maintain the package curated list. Each package is described as a YAML file.