wolkenkit

Your semantic JavaScript backend

wolkenkit is a CQRS and event-sourcing framework for JavaScript and Node.js which fits perfectly with domain-driven design (DDD). It provides the technical foundation for your application, including an event-store and a scalable real-time API. This allows you to focus on what's essential: Solving actual real-world problems in no time.

Want to get started?

Why wolkenkit?

Scaling with confidence

wolkenkit separates reading data from writing them by incorporating a CQRS architecture. This way you can optimize and scale your application as needed.

Empowering interdisciplinary teams

wolkenkit uses domain-driven design to model your domain language as code. This way it invites you to work in an interdisciplinary team as early as possible.

Learning from your past

wolkenkit does not store the current application state, but the stream of events that led to it. Using event-sourcing allows you to reinterpret your past.

Have a project in mind? Just get in touch!

Getting started

Hi, I'm Sophie!

Nice to meet you! I'm your new team's JavaScript ace. Our mission is to build the next big messaging platform.

Has Valentin already shown you the first draft of the desired UI? No? Well, look, here it is!

Let's build this using wolkenkit!

Wait a minute!

Before writing any code, we should first figure out the details of the domain.

Since this works best in an interdisciplinary team, let's gather in front of a whiteboard with people that know the domain inside out.

Wow, that was fun! Look at the model that we came up with!

Now let's transform this into code!

In a messaging platform, sending messages is obviously the first thing to do. In other words we want to change the application state. In wolkenkit this is handled by the so-called write model.

1It starts with an initial state that is used for handling authorization, too.

2Then, it handles commands that want to change the state. So it also acts as a gate-keeper for changing the state. If a change is allowed, the model publishes an event.

3When the event is applied the state changes. Finally, the event is forwarded to the read model.

Now let's implement reading!

…/writeModel/communication/message.js
const initialState = { 1
  text: '',
  isAuthorized: {
    commands: { send: { forPublic: true }},
    events:   { sent: { forPublic: true }}
  }
};

const commands = { 2
  send (message, command, mark) {
    message.events.publish('sent', {
      text: command.data.text
    });

    mark.asDone();
  }
};

const events = { 3
  sent (message, event) {
    message.setState({
      text: event.data.text
    });
  }
};

We need a way to read and list messages in our UI. That's what the read model takes care of.

The read model is all about efficiently reading the state of the application.

1 For that, it subscribes to particular domain events…

2 …and transforms them into data structures that are highly optimized for reading, in this case a list.

That's it! Let's start the application!

…/readModel/lists/messages.js
const fields = {
  text:      { initialState: '', fastLookup: true },
  timestamp: { initialState: 0 }
};

const when = {
  'communication.message.sent' (messages, event, mark) { 1
    messages.add({ 2
      text:      event.data.text,
      timestamp: event.metadata.timestamp
    });
    mark.asDone();
  }
};

Now let's use the wolkenkit CLI, a remote control for wolkenkit applications, to start the backend.

It packages and deploys the application into a bunch of Docker containers and runs them locally.

Wow, we now have a streaming REST API up and running! But REST alone won't make all users happy.

So, let's build a client using our SDK!

~/mychat
$ wolkenkit start

Let's create a simple static web site that can be hosted anywhere.

We then use the wolkenkit SDK to connect to the new backend.

The SDK will bring the API that we've just created to the client. One language, one code. So now we can start…

1 …sending messages using the write model.

2 We also can easily read lists in real-time.

Let's see this in action!

…/client/index.js
const wolkenkit = require('wolkenkit-client');

wolkenkit.connect({ host: 'messaging.wolkenkit.io' }).
  then(messaging => {
    messaging.communication.message(). 1
      send({ text: 'Hello world!' }).
      await('sent', () => {
        console.log('Command has been processed!');
      });

    messaging.lists.messages.readAndObserve({ 2
      orderBy: { timestamp: 'descending' },
      take: 10
    }).started(messages => {
        // Render your client
        console.log(messages);
      }).
      updated(messages =>  {
        // Render your client with updated messages
        console.log(messages);
      });
  });
https://messaging.wolkenkit.io
    Go ahead and send a message…
    https://messaging.wolkenkit.io

      Congratulations!

      You've just created a highly scalable cloud service.

      Like to learn more?

      Just head over to the docs, and join us on Slack!

      Need help modeling your domain? Just ask!

      Features

      Productivity from day one

      Never worry about persistence, networking, authentication, and authorization again. Focus on solving your domain problems and let wolkenkit take care of the boring stuff – right from the start.

      A streaming API out of the box

      Let wolkenkit create an interoperable streaming API for you that is built on pure HTTP/2 and a simple JSON-based protocol. Use it to send real-time updates to instantly notify people, services, and things.

      Legoesque by heart

      Create simple, distributed services by dividing complex problems into smaller chunks that can be solved by individual teams. Since wolkenkit applications are building blocks, they can be plugged together seamlessly.

      On the shoulders of giants

      Rely on proven, handpicked industry standards, e.g. HTTP/2, JSON, and JWT. Inspired by well-established architectural patterns and practices such as CQRS, event-sourcing, and immutability.

      Adaptable storage engine

      Select a storage engine to connect to the database of your choice. Either use one of the readymade adapters, such as PostgreSQL and MongoDB, or write your own.

      Built in the open

      Being open-source makes wolkenkit an ideal platform for running your mission-critical business processes. Have a look at how things work, adjust them to your needs, contribute back, and free yourself from vendor lock-ins.

      Plans

      Community Edition

      Free
      forever!
      • Perfect for open-source projects, thanks to AGPL 3.0
      • Develop, build, and run on your local machine
      • Run on your own server using docker-machine
      • Community support via StackOverflow
      • No credit card needed

      Enterprise Edition

      Let's
      talk!
      • Includes all features of the Community Edition
      • For commercial projects, due to a proprietary license
      • High-availability and scaling with confidence
      • Learn from your past by using the built-in time-machine
      • Deploy on-premise, to your own cloud, or get managed hosting
      • Support tailored to your needs