Skip to main content

Introduction

WHAT YOU’LL LEARN
  • how to get started with building a Webiny app
  • what are scaffolds
  • how to run scaffolding

Prerequisites#

Before you start this tutorial, make sure that you have Webiny installed.

You can read on how to install it in our Install Webiny article.

Scaffold#

Scaffolding is the easiest way to build apps and APIs in Webiny. Using a scaffold you will generate your app or an API. You will get all of the required code automatically created for you. This is a great starting point, as then you can just modify and adapt the code to your needs, without dealing with much of the boilerplate work.

There are several scaffolds that ship with Webiny, including the Admin area scaffold and the API scaffold, which we will explore more in this tutorial. All scaffolds have a wizard that guides you through the process by asking you a set of simple questions. More on that in the actual tutorial.

note

You can add your own custom scaffolds by building a CLI plugin and using the current scaffold plugin as a reference.

Workspaces#

We link all our packages to node_modules via workspaces (read about them in yarn docs), so we can use their name to import them in our applications. Packages are linked by default via yarn postinstall. If you want to link them manually, run yarn link-packages.

note

By default, the packages located in ./packages/ directory are linked. If you want to create a package that is outside that directory, you must add yours to the linkPackages script.

The script is located in ./scripts/linkWorkspaces.js. You must add your directory into the whitelist array, otherwise package linking will not pick up your packages.

Last updated on by Bruno Zorić