Skip to content

Latest commit

 

History

History
94 lines (66 loc) · 2.91 KB

File metadata and controls

94 lines (66 loc) · 2.91 KB

import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem";

Scaffold a new Ceramic app

Get up and running quickly with a basic ComposeDB application with one command.


Prerequisites

  • Operating system: Linux, Mac, or Windows (only WSL2)
  • Node.js v20 - If you are using a different version, please use nvm to install Node.js v20 for best results.
  • npm v10 - Installed automatically with NodeJS v20

You will also need to run a ceramic-one node in the background which provides Ceramic data network access. To set it up, follow the steps below:

:::note The instructions below cover the steps for the MacOS-based systems. If you are running on a Linux-based system, you can find the instructions here. :::

  1. Install the component using Homebrew:
brew install ceramicnetwork/tap/ceramic-one
  1. Start the ceramic-one using the following command:
ceramic-one daemon --network in-memory

:::note By default, the command above will spin off a node which connects to a in-memory. You can change this behaviour by providing a --network flag and specifying a network of your choice. For example:

ceramic-one daemon --network testnet-clay :::


Start the ComposeDB example app

You can easily create a simple ComposeDB starter project by using our CLI and running the following command:

<Tabs defaultValue="npm" groupId="package-manager" values={[ {label: 'npm', value: 'npm'}, {label: 'pnpm', value: 'pnpm'}, {label: 'yarn', value: 'yarn'}, {label: 'bun', value: 'bun'}, ]}>

npx create-ceramic-app
pnpx create-ceramic-app

:::tip You need at least yarn 2.x to use the yarn dlx command. If you have an older version, upgrade it by running yarn set version stable and yarn install.

Then you can run the following command to create a new Ceramic app using yarn 2.x :::

yarn dlx create-ceramic-app
bunx create-ceramic-app

This command will create a new directory with a basic ComposeDB application (a social app). It will clone the app from repository, install all dependencies, launch a local Ceramic node, a local GraphQL server and start the app.

Once you have an opportunity to play with an example app and see how it works, you can start building your own app. For that, you will probably want to have more control over your environment and the code. You can find more information on how to set up your environment in the Set up your environment section.