@calljmp/react-native
TypeScript icon, indicating that this package has built-in type declarations

0.0.20-preview • Public • Published

Calljmp React Native SDK

Secure backend-as-a-service for mobile developers. No API keys. Full SQLite control.

npm version GitHub license React Native

🚀 Overview

Calljmp is a secure backend designed for mobile developers, providing:

  • Authentication via App Attestation (iOS) and Play Integrity (Android)
  • Full SQLite database access (no restrictions, run raw SQL)
  • Dynamic permissions for users & roles
  • React Native SDK for seamless integration

🔹 Website: calljmp.com
🔹 Follow: @calljmpdev


📦 Installation

Install the SDK via npm:

npm install @calljmp/react-native

or via yarn:

yarn add @calljmp/react-native

🛠️ Setup & Usage

1️⃣ Initialize Calljmp

Import and initialize Calljmp in your React Native app:

import { Calljmp, UserAuthenticationPolicy } from '@calljmp/react-native';

const calljmp = new Calljmp();

2️⃣ Authenticate User

Authenticate a user with Calljmp:

const auth = await calljmp.users.auth.email.authenticate({
  email: 'test@email.com',
  name: 'Tester',
  password: 'password',
  policy: UserAuthenticationPolicy.SignInOrCreate,
  tags: ['role:member'],
});

if (auth.error) {
  console.error(auth.error);
  return;
}

const user = auth.data.user;
console.log(`Authenticated user: ${user}`);

3️⃣ Run Direct SQL Queries

Access your SQLite database without restrictions:

const result = await calljmp.database.query({
  sql: 'SELECT id, email, auth_provider, provider_user_id, tags, created_at FROM users',
  params: [],
});

if (result.error) {
  console.error(result.error);
  return;
}

console.log(result.data);

4️⃣ Access service

If you are deploying your own service, you can access it via the service property.

// ./src/services/main.ts

import { Service } from './service';

const service = Service();

service.get('/hello', async c => {
  return c.json({
    message: 'Hello, world!',
  });
});

export default service;

then in your React Native app, you can call the service like this:

// ./src/app/App.tsx

const result = await calljmp.service
  .request('/hello')
  .get()
  .json<{ message: string }>();

if (result.error) {
  console.error(result.error);
  return;
}

console.log(result.data);

🔒 Security & App Attestation

Calljmp does not use API keys. Instead, it relies on App Attestation (iOS) and Play Integrity (Android) to verify that only legitimate apps can communicate with the backend.

For more details, check the Apple App Attestations docs and/or Google Play Integrity docs.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

💬 Support & Community

If you have any questions or feedback:

Package Sidebar

Install

npm i @calljmp/react-native

Weekly Downloads

165

Version

0.0.20-preview

License

MIT

Unpacked Size

2.19 MB

Total Files

411

Last publish

Collaborators

  • lykhonis