Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tailor-platform/sdk/llms.txt
Use this file to discover all available pages before exploring further.
System requirements
Before installing the SDK, ensure your system meets these requirements:- Node.js 22 or later - The SDK requires Node.js version 22 or higher
- npm, yarn, or pnpm - Any of these package managers will work
- Git - For version control (recommended)
Install Node.js
If you don’t have Node.js 22 or later installed:- Visit the official Node.js website
- Download and install the latest LTS version (v22 or higher)
- Verify your installation:
Installation methods
Using create command (recommended)
The fastest way to get started is using thecreate command to scaffold a new project:
npm 7+ requires
-- before create-sdk options (for example, --template).- Creates a new directory with your project name
- Scaffolds a project using the selected template
- Installs all necessary dependencies
- Initializes a Git repository
Adding to an existing project
If you want to add the SDK to an existing Node.js project:tailor.config.ts file in your project root:
tailor.config.ts
Available templates
When using the create command, you can choose from these templates:hello-world
Minimal starter projectPerfect for learning the basics. Includes:
- Simple resolver example
- Basic project configuration
- User database type
inventory-management
Full-featured sample applicationProduction-ready patterns. Includes:
- Complex TailorDB schemas
- Custom resolvers with business logic
- Event-driven executors
- Role-based permissions
testing
Testing patterns guideLearn how to test your SDK code. Includes:
- Unit test examples with Vitest
- E2E test setup
- Mock patterns for TailorDB
- CI/CD integration
multi-application
Multi-app architectureShare resources across apps. Includes:
- Multiple application setup
- Shared database patterns
- External resource references
Template usage
Specify a template with the--template flag:
Post-installation setup
Authenticate with Tailor Platform
After creating your project, authenticate with the Tailor Platform:~/.config/tailor-platform/config.yaml.
Create a workspace
Every application needs a workspace. Create one with:us-east-1- US East (N. Virginia)eu-west-1- Europe (Ireland)ap-northeast-1- Asia Pacific (Tokyo)
Environment variables
Create an.env file in your project root for environment-specific configuration:
.env
| Variable | Description |
|---|---|
TAILOR_PLATFORM_WORKSPACE_ID | Your workspace ID for deployments |
TAILOR_PLATFORM_TOKEN | Authentication token (alternative to login) |
TAILOR_PLATFORM_PROFILE | Workspace profile name |
TAILOR_PLATFORM_SDK_CONFIG_PATH | Custom path to tailor.config.ts |
EDITOR | Editor for opening generated files |
Verify installation
Verify that everything is set up correctly:Development dependencies
Required dependencies
When using generated types in your resolvers, executors, or workflows, install these dependencies:For database queries
If you’re using the Kysely type plugin for type-safe database queries:IDE setup
Visual Studio Code
For the best development experience in VS Code:- Install the TypeScript extension
- Enable TypeScript IntelliSense in your workspace settings
- Add a
tsconfig.jsonif not already present:
tsconfig.json
Other editors
The SDK works with any editor that supports TypeScript:- WebStorm/IntelliJ IDEA - Built-in TypeScript support
- Vim/Neovim - Use coc-tsserver or nvim-lspconfig
- Sublime Text - Install LSP-typescript
Troubleshooting
Node.js version mismatch
If you see an error about Node.js version:Permission errors on npm install
If you encounter permission errors during installation:- Don’t use
sudowith npm - Configure npm to use a different directory:
- Add to your
~/.bashrcor~/.zshrc:
Git initialization skipped
If git initialization is skipped:- The project already exists within a git repository
- Git is not installed on your system
- Install git from git-scm.com to enable version control
Next steps
Now that you have the SDK installed:Follow the quickstart
Create and deploy your first application
Learn about configuration
Understand how to configure your application