Bit and Harmony platforms

Harmony is a minimalistic framework for stitching composable architectures. It allows for full-stack composable architectures to be composed into pluggable business features (Aspects), that you can compose into unified platforms.

It inverts control over integration to your platform, enabling devs to compose and test themselves in the context of a platform while working independently without compromising performance or dev experience.

Harmony have official runtimes for NodeJS and the Browser and based on Bit Apps for supporting further runtimes.

It is designed for incremental adoption, and can be quickly used to stich existing composable architectures into plugable features.

An Harmony platforms composing existing services and new Bit components
An Harmony platforms composing existing services and new Bit components

Get started

Create a new Bit workspace:

$bit
Copiedcopy

Set the Harmony, NodeJS and React component generator templates in your workspace:

// workspace.jsonc
{
    "teambit.generator/generator": {
    "envs": [
      "bitdev.node/node-env",
      "bitdev.react/react-env",
      "bitdev.symphony/envs/symphony-env"
    ]
  },
}
CopiedCopy

Make sure to use bit install after configuring the templates in workspace.jsonc.

Create the platform composition:

bit create harmony-platform my-platform
CopiedCopy

Run the platform:

bit run my-platform
CopiedCopy

Starting creating Aspects and compose them into your platform:

bit create aspect people --scope myorg.people
CopiedCopy

Use the Aspect in your platform:

import { SymphonyPlatformAspect } from '@bitdev/symphony.symphony-platform';
import { HeaderAspect } from '@bitdev/symphony.aspects.header';
import { PeopleAspect } from '@myorg/people.people';

export const WayneCloud = HarmonyPlatform.from({
  name: 'wayne-cloud',

  platform: [SymphonyPlatformAspect, {
    name: 'Wayne',
    logo: 'https://static.bit.dev/extensions-icons/wayne.svg',
  }],

  runtimes: [
    new BrowserRuntime(),
    new NodeJSRuntime(),
  ],

  aspects: [
    // you can use the symphony header aspect or fork to build your own.
    HeaderAspect,
    PeopleAspect // plugin your aspect to the platform.
  ],
});

export default WayneCloud;
CopiedCopy

Run the platform and you will see Aspects composed to all associated runtimes.

Platform aspects

Symphony is the default platform aspect for Harmony. It an opinianated platform using React and GraphQL you can use to build your platform.

Refereneces

What's next

► Create an Harmony platform

► Create the Platform Aspect

► Create an Aspect

► Set up your own Harmony Development Environment ('env')

► Create an Harmony runtime