Build apps for Helix

Create embedded apps that plug directly into the Haven Helix platform. Access real business data, authenticate automatically, and ship fast.

Get Started GitHub
🔐

Automatic Auth

Your app gets a Helix auth token automatically. No login pages, no OAuth dance. Users are already signed in.

📊

Real Data Access

Call the Helix API with one line. Stores, transactions, employees, inventory, all through the SDK.

🚀

Any Framework

Build with React, Vue, plain HTML, Laravel, whatever you're fast in. If it runs in a browser, it works.

Quickstart

From zero to a working Helix App in 5 minutes.

1 Scaffold your app

# Using the Helix Toolkit CLI
helix-toolkit app create my-cool-app

# Or just create an HTML file, no CLI required
mkdir my-cool-app && cd my-cool-app
touch index.html

2 Add the Helix SDK

<script src="helix-sdk.js"></script>
<script>
  const helix = new HelixSDK();

  helix.onReady(async (ctx) => {
    console.log('Hello,', ctx.user);

    // Fetch stores from Helix
    const stores = await helix.apiGet('/stores');
    console.log(stores);
  });
</script>

3 Register in Helix

Open Helix, go to Helix Apps in the sidebar, click + New App. Enter your app name and URL (even http://localhost:3000 works for development).

Your app appears in the Helix sidebar instantly. Click it to open and you're authenticated automatically.

4 Iterate

Change your code, refresh the page. No redeploy needed during development. When you're ready to ship, deploy to *.apps.havenhelix.com and ask an admin to promote your app.

SDK Reference

The Helix SDK handles authentication and API access. Include helix-sdk.js in your app. That's it.

helix.onReady(callback)

Called when the user is authenticated. Fires immediately if already ready.

helix.onReady((ctx) => {
  console.log(ctx.user); // "admin@myhavenbot.com"
  console.log(ctx.token); // Helix auth token
});

helix.apiGet(path) / apiPost(path, body) / apiPatch / apiDelete

Make authenticated requests to the Helix API. Token is included automatically.

// GET stores
const stores = await helix.apiGet('/stores');

// GET store stats
const stats = await helix.apiGet('/store_stats');

// GET KRA data
const kra = await helix.apiGet('/kra/day_data?store_id=1');

// GET transactions
const txns = await helix.apiGet('/store_stats/transactions');

helix.getToken() / helix.getContext() / helix.isReady()

Utility methods. getToken() returns the raw auth token if you need to make your own fetch calls.

Available API Endpoints

These endpoints are available to Helix Apps via the SDK. All require authentication (handled automatically).

Method Endpoint Description
GET/storesList all stores
GET/store_statsStore statistics and summaries
GET/store_stats/transactionsTransaction data
GET/kra/day_dataKRA daily metrics
GET/kra/storesKRA store list
GET/kra/blocksKRA data blocks
GET/kra/transactionsKRA transaction details
GET/employee_statsEmployee performance data
GET/distribution_productsDistribution product catalog
GET/idr_reportsIDR report data
GET/auth/authenticateCurrent user info and roles

All endpoints are prefixed with /api by the SDK automatically. Just pass the path.

Blaze Store Inventory

Store inventory sourced from the Blaze partner API, mirrored under the blaze namespace. Paths match Blaze's /store/inventory/... shape so code written against Blaze works unchanged against the Helix mock.

Method Endpoint Description
GET/api/v1/blaze/inventory/brandsList all brands
GET/api/v1/blaze/inventory/categoriesList all categories
GET/api/v1/blaze/inventory/inventoriesStock rows per product per terminal
GET/api/v1/blaze/inventory/productsList all products
GET/api/v1/blaze/inventory/products/{productId}Get product by id
GET/api/v1/blaze/inventory/products/datesProducts modified after ?modified_after=
GET/api/v1/blaze/inventory/products/terminals/{terminalId}Products carried by a terminal (with on-hand quantity)
GET/api/v1/blaze/inventory/sku/{sku}Product by SKU with per-terminal quantities
GET/api/v1/blaze/inventory/terminalsList all terminals

Deploying Your App

The journey from localhost to production.

prerelease

Development

Register your app in Helix with any URL, even http://localhost:3000. Only you and admins can see it. Iterate freely, change the URL whenever.

deploy

Ship to a trusted domain

Deploy your app to yourapp.apps.havenhelix.com. Update the app URL in Helix to point there. This is required before promotion.

active

Go live

An admin promotes your app to active. It appears in the Helix sidebar for all users (based on role permissions). Congratulations, you shipped a Helix App!

FAQ

What frameworks can I use?

Anything. React, Vue, Angular, Svelte, plain HTML/JS, Laravel Blade, Django templates. If it outputs HTML, it works. The SDK is a single JS file.

How does authentication work?

When Helix loads your app, it passes auth params automatically. The SDK reads them, gives you a token, and cleans the URL. You never see a login screen.

Can I use my own backend?

Yes. Your app can have its own API, database, whatever. Use the Helix token to call the Helix API from your backend too. It's just a Bearer token.

What's a "trusted domain"?

To go from prerelease to active, your app must be hosted on an approved domain (*.apps.havenhelix.com, havenhelix.com, or myhavenbot.com variants). During development, any URL works.

How do I get the Helix Toolkit?

git clone git@github.com:haven-team/helix-toolkit.git
export PATH="$HOME/dev/haven/helix-toolkit/cli/bin:$PATH"
helix-toolkit doctor

Where do I get help?

Ask in RingCentral, check the toolkit repo, or read the helix-apps repo for examples.