Head.js

The only script in your <head>. @head.js/snippet-*.

Get Started

Why Head.js?

Declarative

Declarative

Head.js takes care of the complexity of conversational UIs for you. Design actions for each event and state in your application, and Head.js will run accordingly.

This approach makes your code more predictable and easier to debug.

Native User Experience

Native User Experience

Head.js lets you create apps on every channel and never compromise on your users' experience.

You can apply progressive enhancement or graceful degradation strategy on your building blocks.

Easy Setup

Easy Setup

With Head.js, you only need a few configurations to make your bot work with channels, automatic server listening, webhook setup, signature verification and so much more.

Ready for Production

Ready for Production

There are thousands of bots powered by Head.js.

It has been optimized for real world use cases, automatic batching request and dozens of other compelling features.

<script src="app.js">
  head.require([ 'http://cdn.example.com/a.css', 'http://cdn.example.com/b.js' ], () => {});

  head.bridge.register('com.example.sdk@1.0.0', (register) => {
    head.require([ 'http://cdn.example.com/sdk-1.0.0.css', 'http://cdn.example.com/sdk-1.0.0.js' ], () => {
      const { SdkFactory } = window;
      const sdk = new SdkFactory();
      register(sdk);
    });
  });
</script>
<script src="chunk-1.js">
  const [ sdk ] = await head.bridge.initialize(['com.example.sdk@1.0.0']);
  sdk.do();
</script>

Intuitive APIs

Head.js has some functional and declarative approaches can help you define your conversations.

For most applications, you will begin by defining routes that you may familiar with when developing a web application.

Besides router, you can describe the side effects with function actions. It's the most important building part in the Head.js applications.

Head.js Logo

Build Your World Today!

Get Started Now