Skip to main content

Using components on WebApps

What is the state of BOS (NEAR Components)?

We no longer recommend building on BOS due to its limited capabilities and discontinued security maintenance. Developers with active projects on BOS are encouraged to migrate to another deployment strategy.

See the Web3 frontends section for more information.

In order to use the components you create in a WebApp you need to use what is known as the NEAR VM. This virtual machine helps you to easily fetch components from the blockchain and transform them into executable code.

There are two possible scenarios:


Starting a WebApp from scratch

If you want to start a WebApp from scratch, the simplest option is to use create-near-app. To use it, you only need to have node.js installed on your computer.

Simply run the following command and follow the instructions:

npx create-near-app@latest
Tutorial

To learn more about the template created by create-near-app see our Quickstart a WebApp tutorial.


Integrating Components into your WebApp

In order to integrate components into your WebApp you will leverage two libraries:

  • Wallet Selector: Allows user to login using their preferred NEAR wallet.
  • NEAR VM: Simplifies fetching NEAR components from the blockchain and rendering them.

The best way to learn how to integrate components into your WebApp is by following our tutorial:

Tutorial

To learn step-by-step how to integrate them, please visit our integrating components into a WebApp tutorial.

Was this page helpful?