Node.js demo application for the UCubix Distribution API with a built-in API Explorer UI. Uses ucubix-node-client under the hood.
- Node.js 18+
# 1. Install dependencies
npm install
# 2. Configure
cp .env.example .env
# Edit .env and set your UCUBIX_API_KEY
# 3. Run
npm run devOpen http://localhost:3000 in your browser.
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 |
| Command | Description |
|---|---|
npm run dev |
Start with auto-reload (tsx watch) |
npm start |
Start normally |
npm run typecheck |
Run TypeScript type checking |
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
The application serves a full-featured API Explorer at http://localhost:3000:
- Get Organisation — organisation details, credit lines, balance summary
- 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
- 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
- Single License Key — retrieve by UUID
- Bulk License Keys — up to 1000 UUIDs at once
- Categories, Publishers, Platforms, Developers, Franchises — all with pagination and sorting
- 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
- 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
MIT.