Skip to content

Quickstart

This walkthrough creates a posts collection and lists documents from the JavaScript SDK. Production base URL is https://api.tefily.com.

  1. Sign in at app.tefily.com.
  2. Create or select an organization.
  3. Create a project. Copy the project ID from the project URL or project settings.

In Kallax (schema builder):

  1. Create a table named posts.
  2. Add fields, for example title (string, required) and status (string).
  3. Open Endpoints and enable list and create (and any others you need).
  4. If the project has end-user auth on, add access rules or calls from the SDK will be denied once you send a project JWT. Platform tokens and service tokens still bypass rules.
Terminal window
npm install @kataflax/sdk
import { KataflaxClient } from '@kataflax/sdk';
const client = new KataflaxClient({
baseUrl: 'https://api.tefily.com',
projectId: 'YOUR_PROJECT_ID',
});
const posts = client.collection('posts');
const created = await posts.create({
title: 'Hello Tefily',
status: 'draft',
});
const page = await posts.list({ page: 1, pageSize: 20 });
console.log(page.total, created);

Until you enable project auth and rules, you can call the data API without a user JWT. That is useful for a first test. For a real app, turn auth on, add requireAuth (and usually userFieldCompare for owner-scoped rows), and register or log in before create / list.

4. Optional: inject a platform or service token

Section titled “4. Optional: inject a platform or service token”

Scripts and backends can skip end-user rules:

client.setToken('kfx_…'); // personal access token — admin-level, do not ship to clients

Or construct a backend client with a service token.