Skip to content

Releases

v0.2.0

v0.2.0 Pre-release
Pre-release

Choose a tag to compare

@lalitgehani lalitgehani released this 21 Feb 18:01

🏗️ Infrastructure & Build

  • Monorepo migration: Migrated to a pnpm monorepo with a shared @snackbase/tsconfig package.
  • Vitest workspace: Structured unit and integration test configurations.
  • Public publishing: Added publishConfig with access: "public" to react, sdk, and skills packages.
  • CI cleanup: Removed legacy GitHub Actions CI and release workflows.
  • Monorepo cleanup: Removed root tsconfig, updated .gitignore, and dropped the @snackbase/examples package.

📦 New Packages

@snackbase/mcp — MCP Server

A full MCP (Model Context Protocol) server with stdio transport. Ships with the following tools:

Tool Capabilities
snackbase_collections CRUD, export, and import collection schemas
snackbase_records CRUD operations on collection records
snackbase_access_rules Get, update, validate, and test collection access rules
snackbase_users CRUD, password management, email verification
snackbase_groups Group and membership management
snackbase_roles Role management
snackbase_accounts Account management
snackbase_invitations User invitation management
snackbase_api_keys List, create, and revoke API keys
snackbase_admin Manage configurations, providers, and default provider
snackbase_dashboard Get server stats
snackbase_audit_logs Query, view, and export audit trail data
snackbase_email_templates List, get, update, render, send test, and view logs
snackbase_macros CRUD and test SQL macros
snackbase_migrations Query migration status and history

create-snackbase-app — Project Scaffolding CLI

  • Scaffolds new SnackBase projects from templates: todo, todo-single-tenant, realtime, and voting.
  • CLI flags for Git initialization, dependency installation, and non-interactive mode.
  • Included in all monorepo build and dev scripts.

✨ SDK Enhancements

Authentication Overhaul

  • TokenType enum integrated into user and auth state interfaces.
  • Core constants defined for system account ID, token prefixes, and API key paths.
  • Token utilities: Detection, validation, masking, and superadmin checks.
  • AuthManager: Detects token types, tracks token_type, exposes session type checks (isSuperadmin, isApiKeySession, isPersonalTokenSession, isOAuthSession).
  • Client getters: All session flags and tokenType exposed directly on SnackBaseClient.
  • Auth error interceptor (createAuthErrorInterceptor): Handles API key restrictions and preserves auth redirect details.
  • Optional systemAccountId override added to SDK configuration.

New Error Classes

  • ApiKeyRestrictedError: Raised when an API key lacks the required scope. Includes default suggestions.
  • EmailVerificationRequiredError: Raised when email verification is required to proceed.
  • Both are exported from the SDK package.

React SDK

  • useAuth hook now exposes tokenType, isSuperadmin, isApiKeySession, isPersonalTokenSession, and isOAuthSession.

API Key Service

  • List parameters, masked key formatting, explicit revoke response handling.
  • Updated to use new endpoint paths (/api/snackbase/api-keys).

Audit Logs

  • AuditLog interface now includes extra_metadata with auth_method for richer audit trails.
  • PDF export support added.

Collections & Records

  • Collection export/import with new types and service methods.
  • File upload API updated.
  • Refined query builder syntax.

🛡️ Admin Service

  • Set or unset a configuration as the default provider for its type.
  • is_default field support in configuration listings.

🧠 Skills Package

  • Added a comprehensive SnackBase JS/TS SDK skill with full documentation and rules.
  • Reorganized docs to references/ with a dedicated API reference.
  • Added skill installation script.
  • AdminService fully documented with default provider methods.

🔧 Bug Fixes & Refactors

  • Auth service test payloads aligned to snake_case (account, refresh_tokens).
  • default field schema enhanced with a description.
  • GitHub repository URLs updated across documentation.

v0.1.1

v0.1.1 Pre-release
Pre-release

Choose a tag to compare

@lalitgehani lalitgehani released this 23 Jan 20:42

Added

  • Initial release of SnackBase SDK for JavaScript/TypeScript

Features

  • Core Client: SnackBaseClient with configuration validation
  • HTTP Client: Fetch-based HTTP client with interceptors
  • Authentication: Email/password, OAuth, SAML, and API key authentication
  • Services: 17+ service classes for all SnackBase resources
    • Accounts, Users, Collections, Records
    • Roles, Collection Rules (Permission System V2)
    • Groups, Invitations, Macros
    • API Keys, Audit Logs, Dashboard, Admin
    • Email Templates, Files
  • Real-Time: WebSocket/SSE support with automatic reconnection
  • Query Builder: Fluent API for complex queries
  • React Integration: Context provider and hooks
    • useAuth, useQuery, useRecord, useMutation, useSubscription
  • Type Safety: Complete TypeScript definitions
  • Error Handling: Typed error hierarchy
  • Storage Abstraction: Platform-agnostic storage backends
  • Logging: Structured logging system with configurable levels

Package Exports

  • @snackbase/sdk - Core SDK
  • @snackbase/sdk/react - React integration

Build Output

  • ESM (.mjs) - 14.87 KB gzipped
  • CommonJS (.js)
  • TypeScript declarations (.d.ts)

[0.1.1] - 2026-01-24

Added

  • Initial beta release
  • Core SDK features
  • React hooks
  • Real-time subscriptions
  • Query builder
  • 231 tests passing

[Future Releases]

Planned

  • Integration tests with test server
  • Performance benchmarks
  • Request deduplication
  • Advanced caching strategies
  • Vue 3 integration
  • Angular integration
  • Svelte integration