Skip to content

a2zwebltd/ucubix-node-client-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UCubix Node.js App

Node.js demo application for the UCubix Distribution API with a built-in API Explorer UI. Uses ucubix-node-client under the hood.

Requirements

  • Node.js 18+

Quick Start

# 1. Install dependencies
npm install

# 2. Configure
cp .env.example .env
# Edit .env and set your UCUBIX_API_KEY

# 3. Run
npm run dev

Open http://localhost:3000 in your browser.

Configuration

All configuration is via environment variables (.env file):

Variable Default Description
UCUBIX_API_KEY (required) Your UCubix API key
UCUBIX_BASE_URL https://ucubix.com/api/v1/ API base URL
UCUBIX_MAX_RETRY 3 Max retries on 429 rate limit responses
PORT 3000 HTTP server port

Scripts

Command Description
npm run dev Start with auto-reload (tsx watch)
npm start Start normally
npm run typecheck Run TypeScript type checking

Project Structure

node-app/
├── public/
│   └── index.html       # API Explorer frontend
├── src/
│   ├── server.ts        # Express server, .env loader, static files
│   ├── routes.ts        # All API routes
│   ├── controller.ts    # Request handlers + error handling
│   └── client.ts        # Singleton UcubixClient factory
├── .env                 # Environment config
└── package.json

API Explorer UI

The application serves a full-featured API Explorer at http://localhost:3000:

General Info

  • Get Organisation — organisation details, credit lines, balance summary

Products

  • List Products — with filters: search, category, publisher, developer, franchise, platform; pagination and sorting
  • Single Product — full product details with regional pricing
  • Product Sub-resources — photos, screenshots, categories, publishers, platforms, franchises, developers

Orders

  • List Orders — with filters: code, external reference; pagination and sorting
  • Single Order — full order details
  • Order Items — items within an order, with license key status
  • Create Order — specify product, quantity, region, country
  • Update Order — change quantity
  • Cancel Order — cancel by UUID

License Keys

  • Single License Key — retrieve by UUID
  • Bulk License Keys — up to 1000 UUIDs at once

Catalog Dictionaries

  • Categories, Publishers, Platforms, Developers, Franchises — all with pagination and sorting

Rate Limit Testing

  • Burst Test — fire 1-200 real API calls, configure RPM and max 429 retries, view per-request timing, throttle delays, server remaining, and window state

UI Features

  • Sidebar with forms for every endpoint
  • JSON viewer with syntax highlighting (keys, strings, numbers, booleans, null)
  • Rate limit display in the toolbar after each request
  • Error display with type and detail
  • Loading spinner

License

MIT.

About

App to test Ucuxib api on Node js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors