Skip to content
View as Markdown

Getting Started ​

This guide creates an ERP Kit project, adds a working app from the user-management template, and deploys its backend and frontend to your own workspace. At the end you can sign in to the deployed app and ask your coding agent to extend it.

Prerequisites ​

ToolVersionCheck
Node.js24 or laternode --version
pnpmThe version pinned in the project's package.json, through Corepackcorepack enable && pnpm --version
GitAny recent versiongit --version
Coding agentOne that supports skills (optional, for the agent skills)
Tailor Platform accountAccess to ERP Kit under your contract

1. Authenticate to the registry ​

ERP Kit is installed from Tailor's private registry. Log in and save a registry token for the first download:

bash
pnpm dlx @tailor-platform/sdk login

tailor_token=$(pnpm dlx @tailor-platform/sdk auth token) &&
  npm config set '//registry.tailor.tech/npm/:_authToken' "$tailor_token" --location=user

The token goes in your user-level ~/.npmrc, never in the repository. After the project exists, it refreshes the token by itself. See Registry access for details.

2. Create the project ​

bash
mkdir my-app && cd my-app
pnpm --config.@tailor-erp:registry=https://registry.tailor.tech/npm/ dlx @tailor-erp/kit init my-app
pnpm install

erp-kit init creates the workspace layout, the registry settings (.npmrc and .pnpmfile.mjs), the agent skills, and an App CI workflow. It runs once; later changes come from erp-kit update.

3. Add an app from a template ​

From the project root:

bash
pnpm exec erp-kit app init my-erp apps -t user-management
pnpm install

This creates apps/my-erp/backend, apps/my-erp/frontend, and apps/my-erp/docs. The user-management template comes with users, roles, permissions, and sign-in already working. Omit -t to choose a template interactively.

4. Create a workspace ​

Run the rest of this guide from the backend directory:

bash
cd apps/my-erp/backend
pnpm exec tailor workspace create --name my-erp-dev --region us-west

Add --organization-id <id> (and --folder-id <id> to place it in a folder) to create the workspace in your organization instead of your personal account. You can also create the workspace in the Console.

Save the workspace ID from the output to .env:

bash
echo "TAILOR_PLATFORM_WORKSPACE_ID=<workspace-id>" >> .env

TIP

The pnpm run scripts read .env themselves. A bare pnpm exec tailor ... command does not, so pass --env-file .env to it. A command that fails with "Workspace ID not found" is usually missing this flag.

5. Deploy and seed ​

bash
pnpm run deploy
pnpm run seed

deploy applies the backend, then builds the frontend and publishes it as the default-web static website. A first deploy writes the application id into tailor.config.ts; commit it. If the frontend build fails, the backend is already applied: fix the error and run pnpm run deploy again.

seed loads master data and an admin user. The admin's email and password are in seed/data/_User.jsonl.

WARNING

The seeded admin and its password are committed to the repository. Use them only in development workspaces, and change them before anyone else signs in. See Security defaults.

6. Open the app ​

Print the application and website URLs:

bash
pnpm exec tailor show --env-file .env

Open the default-web URL and sign in as the seeded admin.

To work on the frontend with hot reload against the deployed backend, write the frontend's .env and start Vite:

bash
echo "VITE_TAILOR_APP_URL=$(pnpm exec tailor show --env-file .env --json | jq -r '.url')" > ../frontend/.env
echo "VITE_TAILOR_CLIENT_ID=$(pnpm exec tailor oauth2client get default --env-file .env --json | jq -r '.clientId')" >> ../frontend/.env

cd ../frontend
pnpm run generate
pnpm dev

The app runs at http://localhost:5173.

7. Connect your coding agent ​

Add the Tailor docs MCP server (https://mcp.tailor.tech/) to your coding agent so it can read these docs. See MCP server for the setup steps for each agent.

The ERP Kit skills are already in .agents/skills/. Describe what you want to build, for example:

Add a backorder rule to the sales flow: when stock is short, keep the order open
and create a backorder line for the remaining quantity.

The agent uses erp-kit-app-impl to wire the modules, write the resolvers, and add tests.

TIP

The erp-kit-deploy-guide skill runs steps 3 to 6 for you and can explain each step as it goes. Run /erp-kit-deploy-guide in your coding agent from the project root.

Next steps ​