Volcano SDK Documentation
Welcome to the Volcano SDK documentation. This guide will help you integrate Volcano's backend services into your JavaScript and TypeScript applications.
Welcome to the Volcano SDK documentation. This guide will help you integrate Volcano's backend services into your JavaScript and TypeScript applications.
What is Volcano?
Volcano is a backend-as-a-service platform that provides everything you need to build modern applications:
- Authentication with email/password, OAuth providers, and anonymous users
- PostgreSQL Database with Row-Level Security and a browser-friendly query builder
- File Storage with access control policies
- Realtime subscriptions for database changes, presence, and broadcast messaging
- Serverless Functions for custom backend logic, including durable functions that checkpoint and resume across hours
The SDK is designed to work seamlessly in browsers, React/Next.js applications, and Node.js environments.
Documentation
| Guide | Description |
|---|---|
| Getting Started | Installation, configuration, and your first request |
| Authentication | User sign-up, sign-in, OAuth, sessions, and password recovery |
| Database | Query builder for PostgreSQL with Row-Level Security |
| Storage | Upload, download, and manage files |
| Realtime | WebSocket subscriptions, presence, and broadcast |
| Functions | Invoke serverless functions |
| Durable functions | Write functions that checkpoint and resume for up to 366 days |
| Project locks | Leases that keep one holder at a time on backend work |
| Logs | Search project logs and read activity buckets |
| Next.js Integration | Server components, middleware, and SSR considerations |
| TypeScript | Type definitions and best practices |
| Error Handling | Error patterns and troubleshooting |
| Versions | Runtime support, upgrades, and tested dependency sets |
Quick Example
Here's a complete example showing authentication and database queries:
import { VolcanoClient } from '@volcano.dev/sdk';
// Initialize the client
const volcano = new VolcanoClient({
apiUrl: 'https://api.volcano.dev',
anonKey: 'your-anon-key',
});
// Set your database
volcano.database('my-database');
// Sign in
const { user, error } = await volcano.auth.signIn({
email: 'user@example.com',
password: 'password123',
});
if (error) {
console.error('Sign in failed:', error.message);
} else {
console.log('Welcome back,', user.email);
}
// Query the database
const { data: posts } = await volcano
.from('posts')
.select('id, title, created_at')
.eq('published', true)
.order('created_at', { ascending: false })
.limit(10);
console.log('Recent posts:', posts);Installation
npm install @volcano.dev/sdkRealtime support is included with the SDK and is available from
@volcano.dev/sdk/realtime.
Getting Help
- GitHub Issues - Report bugs or request features
- Volcano Documentation - Product documentation and examples
License
Apache License 2.0 - see LICENSE for details.