import { BlocksClient } from '@23blocks/sdk';
const client = new BlocksClient();
await client.auth.signIn();
const users = await client.users.list();
// Build faster with 23blocks
Open Source SDK

Frontend SDK

Integrate 23blocks in Minutes

A TypeScript-first SDK for rapidly integrating 23blocks services into any frontend application. Works with React, Angular, Vue, and vanilla JavaScript.

TypeScript React Angular Vue Svelte

Quick Start

Get up and running with the 23blocks Frontend SDK in under a minute. Install the package, initialize the client, and start building.

Using npm:

npm install @23blocks/frontend-sdk

Using yarn:

yarn add @23blocks/frontend-sdk
app.ts
import { BlocksClient } from '@23blocks/frontend-sdk';

// Initialize the client
const client = new BlocksClient({
  appId: 'your-app-id',
  apiKey: 'your-api-key'
});

// Authenticate a user
const session = await client.auth.signIn({
  email: 'user@example.com',
  password: 'secure-password'
});

// You're ready to go!
console.log('Welcome,', session.user.name);

Built for Developers

A modern SDK designed with developer experience in mind

TypeScript First

Full TypeScript support with auto-generated types for all API responses.

Framework Agnostic

Works with React, Angular, Vue, Svelte, or vanilla JavaScript.

Built-in Auth

Pre-configured authentication helpers for seamless user management.

Error Handling

Comprehensive error handling with typed exceptions and retry logic.

Tree Shakeable

Import only what you need. Optimized bundle size for production.

The LEGO Philosophy

One SDK. Any Backend.

The Frontend SDK is built on contracts, not dependencies. Use 23blocks services or bring your own backend — as long as it speaks the same language, it just works.

JSON:API Contract

Every endpoint follows the JSON:API specification. Standardized request/response formats mean predictable, reliable integrations.

Swap Any Backend

Using 23blocks Auth today but want to build your own? Implement the contract, point the SDK at your server, done. Zero frontend changes.

No Vendor Lock-in

The contract is open. The SDK is open. Your architecture remains yours — we're just making it easier to build.

config.ts
// Use 23blocks services
const client = new BlocksClient({
  baseUrl: 'https://api.23blocks.com'
});

// OR use your own backend
const client = new BlocksClient({
  baseUrl: 'https://your-api.com'
});

// Same SDK. Same code. Same types.
// Your backend just needs to implement
// the 23blocks contract (JSON:API format)

The contract defines endpoints, models, and response formats. Implement it in Rails, Node, Go, or any language you prefer.

Ship Fast with 23blocks

Point the SDK at our production API. Get authentication, file storage, forms, and more — fully managed, production-ready.

Explore blocks

Build Your Own Backend

Implement the 23blocks contract on your own servers. Use our SDK with your custom authentication, your database, your rules.

View contract specs

Available Modules

Access all 23blocks services through a unified, intuitive API

client.auth

User authentication and session management

client.users

User profiles and account operations

client.content

Headless CMS content retrieval

client.forms

Dynamic form submission and validation

client.files

File upload and storage operations

client.products

Product catalog and inventory

100% Open Source

Free Forever, MIT Licensed

The Frontend SDK is open source and always will be. Use it in personal projects, startups, or enterprise applications. No strings attached.

See all our open source projects

Works with All 23blocks Services

The Frontend SDK gives you access to the entire 23blocks ecosystem. Authentication, file storage, content management, forms, and more — all through one unified API.

Explore All Blocks

Stay in the loop

Get product updates, engineering posts, and new block announcements delivered to your inbox.

No spam. Unsubscribe anytime. Privacy policy.