Platforms

ReactNodeGraphQL

This quick start will guide you through building a service-oriented architecture, composed from backend services and a UI application.

A micro-service architecture and a frontend application stitched into a unified platform.

Install

To get started, install Bit on your machine:

$npx @teambit/bvm install
Copiedcopy

For a more advanced installation guide, head to our installation section.

Create a workspace

A workspace is used to create and maintain a set of independent components and apps, and compose them one to the other.

Run the following to create a workspace with a few components included, using the platform starter:

$bit
Copiedcopy

Open your workspace directory:

$cd my-project
Copiedcopy

Run the app

Your workspace maintains a number of components. One of these components is also an app. Run the app by using the following command:

$bit
Copiedcopy

You can list the apps and platforms available on your workspace using bit app list. Head to the apps section to learn more on running apps.

Preview components

Run the Workspace UI to preview your components and inspect your workspace:

$bit
Copiedcopy

The workspace UI displays all components maintained by your workspace. Use it to explore your components' preview, documentation, dependency graph, version history, and more.

Create components

You can create new components using our official templates. Our templates includes apps, backend services, UI components and more to help stitch your architecture:

$bit
Copiedcopy

Head to the create components section to learn on creating components.

Use components

Components are used as standard packages. Use an import statement with the requested component package name to use a component:

import { Announcement } from '@my-org/my-project.entities.announcement';
CopiedCopy

You can install external packages or components using bit install. Learn more on using components.

$bit
Copiedcopy

You can use bit test, lint and other commands to operate the components on your workspace. Find useful commands on the CLI reference.

Release

Run the following to verify there are no issues preventing Bit from snapping each component as an independent unit that is uncoupled from the rest of the workspace:

$bit
Copiedcopy

The output should confirm all components are ok to be snapped. The components' status is currently new as they were forked by the workspace starter and not imported.

Create a remote scope

Scopes help organize components in a shared domain of responsibility. For example, the analytics scope includes all components that provide analytics services, and the design scope includes the services for our design language.

Run the following to log in to your bit.cloud account:

$bit
Copiedcopy

If the name you chose is different than the name you chose while creating your workspace, then use the following command to update your components to the newly created account and scope:

$bit
Copiedcopy

Version your changes

Run the following to tag your components with a semantic release version:

$bit
Copiedcopy
See command synopsis

You can also use snap to create a new version for the component without assigning with a semantic release.

By default, components are built using bit.cloud's Ripple CI. However, you can run the components' build locally by adding the --build flag, or use your own CI platform. To learn more see Set up CI.

Release components

Export the newly created versions to your remote scope by running the following command:

$bit
Copiedcopy

Head over to your bit.cloud account to see your components build progress. Once the build process is completed, you components are deployed and ready to be used!