Develop your application from scratch with Tailor SDK
This guide walks you through building a project management application from scratch using the Tailor Platform SDK. You'll create a complete system with database types, authentication, custom business logic, and event-driven automation in a step-by-step approach using TypeScript.
What You'll Learn
By the end of this guide, you'll be able to:
- Use the Tailor SDK to create comprehensive data models with type-safe TypeScript definitions
- Configure authentication and user management with machine users
- Implement custom business logic with Pipeline resolvers using TypeScript
- Set up event-driven automation using Executor with webhook integrations
- Deploy a complete application using the Tailor SDK CLI
Prerequisites
Create a Workspace
Before you begin, you'll need a Tailor Platform workspace. You can create one through the Tailor Console. For more information about workspaces, see the Workspace documentation.
Once you have a workspace, note your workspace ID as you'll need to set it as an environment variable (WORKSPACE_ID) when deploying your application.
Install Node.js
The Tailor SDK requires Node.js version 22 or higher. You can download Node.js from the official website or use a version manager like nvm.
<span><span style="color: var(--shiki-token-comment)"># Using Homebrew</span></span>
<span><span style="color: var(--shiki-token-function)">brew</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">install</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">node</span></span>
<span></span>Following Along with Code
Each step in this guide has corresponding code available on GitHub. You can find the complete repository here.
The repository is organized by steps, with each step in its own folder:
step-01/- Initial database schema setupstep-02/- Authentication configurationstep-03/- Pipeline resolver for custom logicstep-04/- Executor for event-driven automation
Feel free to clone the repository and follow along, or reference the code whenever you need clarification.
Tutorial Steps
This tutorial is organized into four progressive steps, each building on the previous one. You can follow along sequentially or jump to specific steps based on your needs.
Step 1: Create Database Schema
Set up the foundational database schema for your project management application using the Tailor SDK. You'll define three core types (User, Project, Task) with relationships and automatic timestamp management.
What you'll create:
- Project configuration with Tailor SDK
- User type with name, email, and role enum
- Project type with name, description and status
- Task type with relationships to Project
Expected outcome: A complete database schema with three types and relationships, ready to be deployed to Tailor Platform.
Step 2: Add Authentication and Permissions
Add authentication capabilities with user profile management and machine users for different roles.
What you'll create:
- Auth configuration linked to User type
- User profile with email as username field
- Machine users for MANAGER, STAFF, and ADMIN roles
- Permission definitions for logged-in users
Expected outcome: Authentication system integrated with your application, enabling user management and role-based access through machine users.
Step 3: Add Pipeline
Implement custom business logic using Pipeline resolvers and add comprehensive permission controls. You'll create a resolver that closes projects and automatically cancels incomplete tasks, along with role-based permissions.
What you'll create:
- "closeProject" Pipeline resolver with transactional operations
- Kysely type generator for type-safe database queries
Expected outcome: A custom GraphQL mutation that orchestrates complex operations across multiple database records.
Step 4: Add Executor
Add event-driven automation using Executor. You'll create an executor that sends Slack notifications when new tasks are created.
What you'll create:
- Executor configuration in tailor.config.ts
- "new-task-slack-notification" executor
- Record created trigger for Task type
- Webhook operation to Slack
Expected outcome: Automatic Slack notifications whenever a new task is created in your application.
What You've Built
By completing this tutorial, you've created a full-featured project management application with:
- Data Layer: Three interconnected types (User, Project, Task) with validation and relationships
- API Layer: Auto-generated GraphQL API with queries and mutations
- Security: Authentication system with user profiles and machine users, plus role-based permissions
- Business Logic: Custom resolver for project closure operations with transactional database updates
- Automation: Event-driven Slack notifications for new tasks
Next Steps
Now that you have a working application, you can:
- Expand the data model: Add more types like Comments, Attachments, or Teams
- Add more resolvers: Implement additional logic for task assignment, project reporting, etc.
- Configure IdP integration: Connect external identity providers (Auth0, Okta, Google Workspace)
- Refine permissions: Implement more sophisticated permission policies with custom conditions
- Add more executors: Create automation for task reminders, status updates, or integrations with other tools
- Build a frontend: Create a web or mobile application that consumes your GraphQL API
- Deploy to production: Set up separate workspaces for development, staging, and production environments