Skip to main content

Boltic SDK

The Boltic SDK is your gateway to building powerful applications with Boltic's comprehensive suite of cloud services. Whether you're working with databases, APIs, workflows, or other Boltic services, our SDK provides a unified, type-safe interface that works seamlessly across web, mobile, and serverless environments.

What is Boltic SDK?

Boltic SDK is a modern JavaScript/TypeScript library that simplifies integration with all Boltic services. It provides:

  • 🎯 Unified Interface - One SDK for all Boltic services
  • 🔒 Type Safety - Full TypeScript support with auto-completion
  • Modern Architecture - Built for performance and developer experience
  • 🌐 Cross-Platform - Works in browsers, Node.js, and serverless functions
  • 📦 Zero Dependencies - Lightweight with no external dependencies
  • 🔧 Flexible Configuration - Customize behavior for your specific needs

Installation

Getting started with the Boltic SDK is quick and easy. Choose your preferred package manager and follow the installation steps below.

Choose Your Package Manager

npm (Most Common)

If you're using npm (which comes with Node.js):

npm install @boltic/sdk --save

yarn

If you prefer yarn:

yarn add @boltic/sdk

pnpm

If you're using pnpm:

pnpm add @boltic/sdk

Quick Verification

After installation, verify everything works by creating a simple test:

// test.js
import { createClient } from "@boltic/sdk";

const client = createClient("your-api-key");
console.log("✅ Boltic SDK installed successfully!");

Then run:

node test.js

Running TypeScript Examples

For TypeScript files, use npx tsx to run them directly:

// test.ts
import { type BolticClient, createClient } from "@boltic/sdk";

const client: BolticClient = createClient("your-api-key");
console.log("✅ Boltic SDK with TypeScript works!");
npx tsx test.ts

Initialization

After installing the SDK, create a client to connect to your Boltic services. The client acts as your application's gateway to all Boltic functionality.

Get Your API Key

First, you'll need your API key from your Boltic dashboard:

  1. Log into your Boltic account
  2. Go to Settings → PAT Tokens
  3. Generate and copy your API key (keep it secure!)

Create Your Client

import { createClient } from "@boltic/sdk";

const client = createClient("your-api-key-here");

// Your client is ready to access all Boltic services
console.log("✅ Connected to Boltic services");

Secure API Key Storage

Never put your API key directly in your code! Instead, use environment variables:

// .env file
BOLTIC_API_KEY = your_actual_api_key_here;

// Your code
import { createClient } from "@boltic/sdk";

const client = createClient(process.env.BOLTIC_API_KEY);

Client Configuration

Customize your client behavior with configuration options:

const client = createClient("your-api-key", {
region: "asia-south1", // Server region (default: 'asia-south1')
timeout: 30000, // Request timeout in milliseconds (default: 30000)
retryAttempts: 3, // Number of retry attempts (default: 3)
retryDelay: 1000, // Delay between retries in milliseconds (default: 1000)
debug: false, // Enable debug logging (default: false)
});

Configuration Options

OptionTypeDefaultDescription
regionstring'asia-south1'Server region for optimal performance
timeoutnumber30000How long to wait for API responses (in milliseconds)
retryAttemptsnumber3How many times to retry failed requests
retryDelaynumber1000How long to wait between retries (in milliseconds)
debugbooleanfalseWhether to show detailed logs for troubleshooting

TypeScript Support

The SDK includes comprehensive TypeScript definitions with no additional packages required:

import { createClient, type BolticClient } from "@boltic/sdk";

const client: BolticClient = createClient(process.env.BOLTIC_API_KEY!);

// TypeScript provides autocomplete and type checking for all services
// Access different Boltic services through the client
const tablesService = client.tables;
// ... other services

Resources & Community

📦 Source Code & Contributions

The Boltic SDK is available as an open-source project on GitHub: boltic-sdk

Visit our GitHub repository to:

  • 🐛 Report Issues - Found a bug or have a feature request?
  • 📚 Browse Source Code - Understand how the SDK works internally
  • 🤝 Contribute - Help improve the SDK for the entire community
  • Star the Project - Show your support for the project
  • 📋 View Changelog - Stay updated with the latest releases and improvements

💬 Getting Help