Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
195 lines (126 sloc) 4.53 KB


Copyright (C) 2017 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.


Okapi integrated service that generates static UI assets (JS/HTML/CSS) from Stripes modules and metadata.

Local installation

First, checkout the okapi-stripes repo from GitHub:

$ git clone

Note: Node.js version 6.x is required for running stripes-experiments. Older Node.js versions are likely to fail due to changes in react/redux


$ brew install node


Go to and download the Linux Binaries. Extract the archive, and symlink the programs "node" /usr/local/bin

To install yarn, see

MS Windows

Go to, select version 6.x for your Windows version and follow the instructions in the installer. (Tested for Node.js 6.2.2, 64bit version, on Windows 7.)

For AWS S3

To upload files to AWS S3, you need the aws(1) tool installed, and setup ~/.aws for you. See aws configure


$ sudo apt-get install awscli


$ brew install awscli

Webpack service

Run a local installation (see the readme above) in ./okapi-stripes

$ ./bin/

Start webpack service on port 3030:

$ ./bin/webpackServer.js 

Open web form to generate folio UI bundle:

open http://localhost:3030

then fill out the forms, and press submit.

Example run with GET (browser)

$ ./bin/webpackServer.js
Example app listening on http://localhost:3030
Run shell command: env stripes_tenant="test" ui_url="trivial  " ./bin/
Run build, may take 7-15 seconds, tenant test
UI module: ["trivial","","",""]
Webpack script is done

In your browser:

open http://localhost:3030

and after 7-15 seconds you should get the result as:


Example run with POST (command line)

Or more Okapi-style with a post request:

$ cat etc/post.json
{"url":["trivial", ""] }
$ curl -v -H "X-Okapi-Tenant-Id: test2" -X POST --data-binary @./etc/post.json -H "Content-Type: application/json" 'http://localhost:3030/bundle'
HTTP/1.1 201 Created

Example run with POST (command line) for ui-modules

Or more Okapi-style with a post request:

$ cat etc/ui-module.json 
{"module_type": "ui" }
$ curl -v -H "X-Okapi-Tenant-Id: demo" -X POST --data-binary @./etc/ui-module.json  -H "Content-Type: application/json" 'http://localhost:3030/bundle'
HTTP/1.1 201 Created

Testing with a shell script

Testing on the command line:

$ env tenant="test" ui_url="trivial" ./bin/


AWS S3 supports both HTTP and HTTPS. We are using HTTP URLs to enable access to a local running okapi instance on localhost:9130

UI Descriptor

Note: to run the following examples, an okapi service must be running on the same machine: ```cd okapi; mvn install; mvn exec:exec'''

Create a tenant "test", and assign 2 UI modules:

$ tenant=test module="trivial trivial-okapi" ./bin/

Create a tenant "demo", assign 1 module and 2 UI modules:

$ tenant="demo" modules_ui="@folio/trivial" modules="trivial-okapi" ./bin/

Create a bundle for UI modules for tenant "demo":

$ ./bin/ demo


To cleanup local yarn modules, run:

$ ./bin/

Additional information

See project STRIPES at the FOLIO issue tracker.

Other FOLIO Developer documentation is at

-- Index Data, Feb 2017