npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kumori/aurora-backend-handler

v1.0.1

Published

backend handler

Readme

Backend Handler

Table of Contents

Overview

The backendHandler is responsible for mediating communication between the Aurora WUI and backend APIs. It listens for frontend events (e.g., updateUser), translates them into API calls, and emits an event back into the UI via the WUIBridge with the corresponding data.

This ensures a decoupled, event-driven architecture where WUI components remain agnostic of backend details.

Usage

To install this library ensure you have the following prerequisites installed:

Then you can install the package with the following command:

npm install @aurora-backend-handler/backend-handler@latest

This library gives acces to the backendHandler which recives and produces events involving the API.

Test

Installation

  1. Install dependencies:
npm install

Running Test

The project uses Jest as the testing framework with TypeScript support via ts-jest. To execute the tests, simply run:

npm run test

Coverage

The coverage of the test will be shown on the console where the test have been executed but also in a coverage folder on the repository directory.

Architecture

Proposed Data Models

export class User {
    id: string;
	name: string;
	surname: string;
	email: string;
	password: string;
	notificationsEnabled: string;
	organizations: Organization[];
	tokens: Token[];
	tenants: Tenant[];
	axebowPlan: "freemium" | "premium";
	companyName: string;
	rol: string;
}

interface Organization {
    id: string,
    name: string,
    usersIds: string[],
    tenantsIds: string[],
    billingInformation: {
        legalName: string,
        CIFNIF: string,
        email: string,
        language: string,
        country: string,
        region: string,
        city: string,
        address: string,
        zipcode: string,
    }
    invoices: {
        id: string,
        name: string,
        customer: string,
        customerCIF: string,
        cost: number,
        date: string,
        invoiceFile: string,
    }[],
    status?: string,
}

interface Token {
    name: string;
    tenant: string;
    desciprion: string;
    lastUsed: string;
    expiration: string;
    token: string;
}

interface Tenant {
    id: string,
    name: string,
    organizationsIds: string[],
    services: Service[],
    accounts: Account[],
    environments: Environment[],
    marketplaceItems: MarketplaceItem[],
    resources: Resource[],
    role: string,
    status: string,
    users: number;
}

interface Service {
    id: string;
	tenant: string;
	account: string;
	environment: string;
	name: string;
	logo: string;
	description: string;
	revisions: string[];
	status: string;
	role: { name: string; instances: Instance[]; logo?: string, category?: string, version?: string, description?: string, resource?: Resource[] }[];
	links: Link[];
	resources: Resource[];
	usage: Usage;
	minReplicas?: number;
	maxReplicas?: number;
	lastDeployed?: string;
	project: string;
	registry: string;
	imageName: string;
	entrypoint: string;
	cmd: string;
	serverChannels: Channel[];
	clientChannels: Channel[];
	duplexChannels: Channel[];
	cloudProvider: string;
	currentRevision?: string;
	startedAt?: string;
}

interface Instance {
    id: string;
    name: string;
    status: string;
    usage: Usage;
    logs: string[];
    conatiners: Container[];
}

interface Container {
    name: string;
    ready: boolean;
    reestartCount: number;
    metrics: {
        cpu: number;
        memory: number;
    }
    states: any;
}

interface Channel {
    name: string;
    from: string;
    to: string;
    protocol?: "http" | "tcp" | "https";
    port?: number;
    portNum?: number;
}

interface Account {
    id: string;
	name: string;
	tenant: string;
	cloudProvider: {
		name: string;
		region?: string;
		interface?: string;
		apiVersion?: string;
		authType?: string;
		authUrl?: string;
		credentialId?: string;
		credentialSecret?: string;
	};
	logo: string;
	environments: string[];
	services: string[];
	domains: string[];
	status: string;
	usage: Usage;
	flavors?: {
		small: string;
		medium: string;
		large: string;
		volatile: string;
		nonReplicated: string;
		persistent: string;
	};
	organization?: string;
}

interface Usage {
    current: {
        cpu: number;
        memory: number;
        storage: number;
        volatileStorage: number;
        nonReplicatedStorage: number;
        persistentStorage: number;
    };
    limit: {
        cpu: {
            max: number;
            min: number;
        }
        memory: {
            max: number;
            min: number;
        }
        storage: {
            max: number;
            min: number;
        }
        volatileStorage: {
            max: number;
            min: number;
        }
        nonReplicatedStorage: {
            max: number;
            min: number;
        }
        persistentStorage:{
            max: number;
            min: number;
        }
    };
    cost: number;
}

interface Environment {
    id: string;
    name: string;
    account: string;
    tenant: string;
    logo: string;
    services: string[];
    domains: string[];
    status: string;
    usage: Usage;
    organization?: string;
    cloudProvider?: string;
    labels?: string[];
}

interface MarketplaceItem {
    tenant: string,
    name: string,
    logo: string,
    description: string,
    version: string,
    requirements: {
        cpu: number,
        memory: number,
    }
    status: string,
    instances: Instance[],
    links: Link[],
    resources: Resource[],
    domain?: string,
    type?: string,
}

interface Resource {
    type: 'clientChannel' | 'secret' | 'volume' | 'file' | 'string' | 'number' | 'boolean',
    name: string,
    value: string,
    kind?: 'volatile' | 'nonReplicated' | 'persistent',
    maxItems?: number,
}

interface Link {
    name: string,
    origin: string,
    target: string,
}

Repository Tree

.
├── README.md
├── backend-handler.ts
├── environment.ts
├── event-helper.ts
├── event-names.ts 
├── jest.config.ts
├── package.lock.json
├── package.json
├── tsconfig.json
├── interfaces
│   ├── account-interface.ts
│   ├── channel-interface.ts
│   ├── container-interface.ts
│   ├── environment-interface.ts
│   ├── instance-interface.ts
│   ├── link-interface.ts
│   ├── marketplaceItem-interface.ts
│   ├── organization-interface.ts
│   ├── resource-interface.ts
│   ├── service-interface.ts
│   ├── tenant-interface.ts
│   ├── token-interface.ts
│   ├── usage-interface.ts
│   └── user-interface.ts
│
├── api
│   ├── account-api-service.ts
│   ├── deploy-service-helper.ts
│   ├── environment-api-service.ts
│   ├── marketplace-api-service.ts
│   ├── organizations-api-service.ts
│   ├── resources-api-service.ts
│   ├── service-api-service.ts
│   ├── tenant-api-service.ts
│   └── user-api-service.ts
│
├── test
│   ├── backend-handler.test.ts
│   ├── deploy-service-helper.ts
│   └── event-helper.test.ts
│
├── coverage
│   └── coverage data...
│
└── LICENSE

License