---
url: https://docs.tailor.tech/sdk/quickstart.md
---
# Quickstart

## Getting Started

In this quickstart tutorial, you'll create an app using the Tailor Platform SDK.
Follow the steps below to get started.

## Prerequisite

You'll need a Tailor account to start using the Tailor Platform.
Contact us [here](https://www.tailor.tech/demo) to get started.

### Install Node.js

The SDK requires Node.js 22.15.0 or later. Install Node.js via your package manager by following the official Node.js instructions.

Alternatively, you can use Bun as the runtime.

> **Note:** Bun has a known issue with HTTP/2 connections that may cause intermittent failures during `deploy` or `generate` commands ([bun#14249](https://github.com/oven-sh/bun/issues/14249), [bun#26719](https://github.com/oven-sh/bun/issues/26719)). If you encounter a connection error, retry the command.

### Create an Example App

The following command creates a new project with the required configuration files and example code.

```bash
npm create @tailor-platform/sdk -- --template hello-world example-app
cd example-app
# Or with Bun:
# bun create @tailor-platform/sdk --template hello-world example-app
# cd example-app
```

Before deploying your app, you need to create a workspace:

```bash
npx @tailor-platform/sdk login
npx @tailor-platform/sdk workspace create --name <workspace-name> --region <workspace-region>
npx @tailor-platform/sdk workspace list

# Or with Bun:
# bun tailor login
# bun tailor workspace create --name <workspace-name> --region <workspace-region>

# OR
# Create a new workspace using Tailor Platform Console
# https://console.tailor.tech/
```

## Deploy Your App

Run the deploy command to deploy your project:

```bash
npm run deploy -- --workspace-id <your-workspace-id>
# Or with Bun:
# bun run deploy --workspace-id <your-workspace-id>
```

You can now open the GraphQL Playground and execute the `hello` query:

```graphql
query {
  hello(name: "sdk") {
    message
  }
}
```

## Hello World Example

Here's a simple query resolver from the hello-world template:

```typescript
import { createResolver, t } from "@tailor-platform/sdk";

export default createResolver({
  name: "hello",
  operation: "query",
  input: {
    name: t.string().description("Name to greet"),
  },
  body: (context) => {
    return {
      message: `Hello, ${context.input.name}!`,
    };
  },
  output: t
    .object({
      message: t.string().description("Greeting message"),
    })
    .description("Greeting response"),
});
```

You can edit `src/resolvers/hello.ts` to customize the message:

```typescript
export default createResolver({
  body: (context) => {
    return {
      message: `Goodbye, ${context.input.name}!`,
    };
  },
});
```

Deploy again to see the response.

## Next Steps

* Learn about [TailorDB](services/tailordb) for database schema definition
* Create custom [Resolvers](services/resolver) with business logic
* Set up [Executors](services/executor) for event-driven automation
* Explore [Templates](https://github.com/tailor-platform/sdk/tree/main/packages/create-sdk#available-templates) for more examples
