
Security News
Open VSX Unblocks Extension IDs Used in Malware Campaign
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.
@insforge/sdk
Advanced tools
Official JavaScript/TypeScript client for InsForge Backend-as-a-Service platform
Official TypeScript/JavaScript SDK for InsForge - A powerful, open-source Backend-as-a-Service (BaaS) platform.
npm install @insforge/sdk
Or with yarn:
yarn add @insforge/sdk
import { createClient } from '@insforge/sdk';
const insforge = createClient({
baseUrl: 'http://localhost:7130' // Your InsForge backend URL
});
// Sign up a new user
const { data, error } = await insforge.auth.signUp({
email: 'user@example.com',
password: 'securePassword123',
name: 'John Doe' // optional
});
// Sign in with email/password
const { data, error } = await insforge.auth.signInWithPassword({
email: 'user@example.com',
password: 'securePassword123'
});
// OAuth authentication (Google, GitHub)
await insforge.auth.signInWithOAuth({
provider: 'google',
redirectTo: 'http://localhost:3000/dashboard'
});
// Get current user
const { data: user } = await insforge.auth.getCurrentUser();
// Sign out
await insforge.auth.signOut();
// Insert data
const { data, error } = await insforge.database
.from('posts')
.insert([
{ title: 'My First Post', content: 'Hello World!' }
]);
// Query data
const { data, error } = await insforge.database
.from('posts')
.select('*')
.eq('author_id', userId);
// Update data
const { data, error } = await insforge.database
.from('posts')
.update({ title: 'Updated Title' })
.eq('id', postId);
// Delete data
const { data, error } = await insforge.database
.from('posts')
.delete()
.eq('id', postId);
// Upload a file
const file = document.querySelector('input[type="file"]').files[0];
const { data, error } = await insforge.storage
.from('avatars')
.upload(file);
// Download a file
const { data, error } = await insforge.storage
.from('avatars')
.download('user-avatar.png');
// Delete a file
const { data, error } = await insforge.storage
.from('avatars')
.remove(['user-avatar.png']);
// List files
const { data, error } = await insforge.storage
.from('avatars')
.list();
// Invoke an edge function
const { data, error } = await insforge.functions.invoke('my-function', {
body: { key: 'value' }
});
// Generate text completion
const { data, error } = await insforge.ai.completion({
model: 'gpt-3.5-turbo',
prompt: 'Write a hello world program'
});
// Analyze an image
const { data, error } = await insforge.ai.vision({
imageUrl: 'https://example.com/image.jpg',
prompt: 'Describe this image'
});
For complete API reference and advanced usage, see:
The SDK supports the following configuration options:
const insforge = createClient({
baseUrl: 'http://localhost:7130', // Required: Your InsForge backend URL
storageStrategy: 'localStorage' // Optional: 'localStorage' or 'memory' (default: 'localStorage')
});
The SDK is written in TypeScript and provides full type definitions:
import { createClient, InsForgeClient, User, Session } from '@insforge/sdk';
const insforge: InsForgeClient = createClient({
baseUrl: 'http://localhost:7130'
});
// Type-safe API calls
const response: { data: User | null; error: Error | null } =
await insforge.auth.getCurrentUser();
All SDK methods return a consistent response format:
const { data, error } = await insforge.auth.signUp({...});
if (error) {
console.error('Error:', error.message);
console.error('Status:', error.statusCode);
} else {
console.log('Success:', data);
}
The SDK works in all modern browsers that support:
For Node.js environments, ensure you're using Node.js 18 or higher.
We welcome contributions! Please see our Contributing Guide for details.
# Clone the repository
git clone https://github.com/InsForge/insforge-sdk-js.git
cd insforge-sdk-js
# Install dependencies
npm install
# Build the SDK
npm run build
# Run tests
npm test
# Run integration tests
npm run test:integration
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built with ❤️ by the InsForge team
FAQs
Official JavaScript/TypeScript client for InsForge Backend-as-a-Service platform
The npm package @insforge/sdk receives a total of 7,034 weekly downloads. As such, @insforge/sdk popularity was classified as popular.
We found that @insforge/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.