Skip to main content

Javascript SDK

Use the Manifest JS SDK to fetch and manipulate your data from your JS client.

The SDK can be integrated in any frontend stack app like React, Vue, Svelte.... Or even by another server using NodeJS !


Install it via the terminal:

npm i @mnfst/sdk

Use the SDK directly in your favorite frontend:

import Manifest from '@mnfst/sdk'

// Initialize client with default backend URL: http://localhost:1111.
const manifest = new Manifest()

// Initialize client with custom URL.
const manifest = new Manifest('')

CRUD operations

Perform all CRUD (Create Read Update Delete) operations with the SDK.

// Get all cats.
const cats = await manifest.from('cats').find()

// Get paginated cats.
const cats = await manifest.from('cats').find({ page: 1, perPage: 10 })

// Typed.
const cats: Cat[] = await manifest.from('cats').find<Cat>()

// Get a filtered list of cats.
const cats = await manifest
.where('breed = siamese')
.andWhere('active = true')
.andWhere('birthDate > 2020-01-01')

// Order cats.
const cats = await manifest
.orderBy('age', { desc: true })

// Load relations (eager relations are loaded automatically).
const cats = await manifest
.with(['owner', '', ''])

// Filter by relations.
const cats = await manifest
.where(`owner in 1,2,3`)
.andWhere(`store = ${storeId}`)

// Create a cat.
const newCat = await manifest.from('cats').create({
name: 'Milo',
age: 2

// Update a cat.
const updatedCat = await manifest.from('cats').update(1, {
name: 'updated name',
age: 2

// Delete a cat.
await manifest.from('cats').delete(1);


When filtering, you have access to the following operators: =, >, >=, <, <=, like and in.

Get started with your favorite front-end framework

See the following quick start guides to integrate CASE with popular front-end frameworks: