JavaScript SDK
@massicloud/client is the official MassiCloud client for JavaScript and TypeScript. It works in browsers, Node.js, React Native, and edge runtimes.
What it does
- Authenticate end-users (sign up, sign in, sign out)
- Query Postgres or MySQL tables via the REST API — same calls either way
- Read, write, and create signed URLs for object storage buckets
- Manage tokens automatically (refresh, persistence)
- Same API shape as Supabase (intentional — migration is mostly a search-and-replace)
Install
npm install @massicloud/clientRequires Node 18+ for the built-in fetch.
A minimal example
import { createClient } from '@massicloud/client'
const massi = createClient({ url: 'https://api.massicloud.dz/v1/my-project', key: 'mc_anon_my-key', db: 'production',})
// Sign inconst { data, error } = await massi.auth.signIn({ email: 'me@example.dz', password: 'secret',})
// Queryconst { data: todos } = await massi .from('todos') .select('*') .eq('completed', false)