Develop your application from scratch

This guide walks you through building a project management application from scratch using the Tailor Platform. You'll create a complete system with database types, authentication, custom business logic, and event-driven automation in a step-by-step approach.

What You'll Learn

By the end of this guide, you'll be able to:

  • Use the tailordb service to create comprehensive data models that define the structure and relationships for projects and tasks
  • Configure authentication and user management utilizing the auth service
  • Implement custom business logic with the pipeline service
  • Set up event-driven automation using the executor service
  • Deploy a complete application using Terraform infrastructure-as-code

Prerequisites

Install Tailor CLI

tailorctl is a command-line utility that enables you to interact with the Tailor Platform, from creating your workspace to deploying applications. To install tailorctl, run the following command.

<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)">tailor-platform/tap/tailorctl</span></span>
<span></span>

Option 1: Download .exe file

Visit the Tailorctl release page.
Download the latest version of tailorctl for the Windows operating system.

Option 2: Install with Aqua

Aqua is a declarative CLI version manager. First install Aqua, then install tailorctl:

<span><span style="color: var(--shiki-token-comment)"># Install tailorctl with Aqua</span></span>
<span><span style="color: var(--shiki-color-text)">aqua install tailor</span><span style="color: var(--shiki-token-keyword)">-</span><span style="color: var(--shiki-color-text)">platform</span><span style="color: var(--shiki-token-keyword)">/</span><span style="color: var(--shiki-color-text)">tailorctl</span></span>
<span></span>

Install Terraform

Terraform is an infrastructure-as-code tool designed to help you create, modify, and manage infrastructure securely and effectively. You can see the Tailor Platform Provider documentation here.

<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)">hashicorp/tap/terraform</span></span>
<span></span>

Visit the Install Terraform page.
Download the latest version of Terraform for the Windows operating system that matches your CPU architecture.

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 setup
  • step-02/ - Database and type definitions
  • step-03/ - Permissions and application creation
  • step-04/ - Authentication setup
  • step-05/ - Pipeline resolver for custom logic
  • step-06/ - 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 six progressive steps, each building on the previous one. You can follow along sequentially or jump to specific steps based on your needs.

Step 1: Initial Setup

Set up the foundational Terraform configuration for working with Tailor Platform. You'll configure the Tailor provider and create a workspace variable that will be used throughout your infrastructure.

What you'll create:

  • Terraform provider configuration
  • Workspace variable definition

Expected outcome: Terraform is initialized and ready to communicate with the Tailor Platform API.


Step 2: Create Database and Types

Create a TailorDB database namespace and define the core data types for your project management application.

What you'll create:

  • TailorDB namespace "project-management-db"
  • User type with name, email, and roles (stored as strings)
  • Project type with status tracking and automatic timestamps
  • Task type with relationships to Projects and Users

Expected outcome: A complete database schema with three types, relationships, and automatic timestamp management.


Step 3: Add Permissions and Create Application

Add GraphQL permissions to control access to your database types and create an application that exposes your database through a GraphQL API.

What you'll create:

  • GraphQL permissions for all types
  • Tailor application "project-management"
  • CORS and IP address configurations
  • TailorDB subgraph connection

Expected outcome: A GraphQL API endpoint that provides full CRUD operations for all your types.


Step 4: Add Authentication

Add authentication capabilities with user profile management and machine user access.

What you'll create:

  • Auth namespace "project-management-auth"
  • User profile configuration linked to TailorDB User type
  • Machine user for administrative operations
  • Auth subgraph in the application

Expected outcome: Authentication system integrated with your application, enabling user management and secure access.


Step 5: Add Pipeline

Implement custom business logic using the Pipeline service. You'll create a resolver that closes projects and automatically cancels incomplete tasks.

What you'll create:

  • Pipeline namespace "project-management"
  • "closeProject" resolver with custom GraphQL schema
  • JavaScript function with transactional database operations
  • Pipeline subgraph in the application

Expected outcome: A custom GraphQL mutation that orchestrates complex operations across multiple database records.


Step 6: Add Executor

Add event-driven automation using the Executor service. You'll create an executor that sends Slack notifications when new tasks are created.

What you'll create:

  • Event publishing on the Task type
  • Executor "new-task-slack-notification"
  • Event trigger for Task creation
  • 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
  • Business Logic: Custom resolver for project closure operations
  • 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 role-based access control with more sophisticated permission policies
  • 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

Additional Resources