Skip to content

Veskel01/sdbk

Repository files navigation

SurrealDBKit (sdbk)

License: MIT TypeScript

A modern TypeScript toolkit for SurrealDB providing type-safe APIs, query builders, and development tools for building scalable applications with SurrealDB.

Overview

SurrealDBKit (sdbk) is a collection of TypeScript packages designed to make working with SurrealDB safer, more productive, and enjoyable:

  • Type Safety — Full TypeScript support with compile-time validation
  • Developer Experience — Intuitive APIs and helpful tooling
  • Performance — Zero runtime overhead for type operations
  • Modular — Use only what you need

⚠️ Early Development: This project is in active development. APIs may change and some packages are still in progress.

Packages

This monorepo contains the following packages:

Foundational type definitions and utilities for SurrealDBKit. Provides core types, building blocks, and shared abstractions used across rest of the packages.

Status: 🚧 In Development

Key Features:

  • Entity and field type definitions
  • Expression builders and identifiers
  • Schema type system
  • Runtime type guards
  • Shared utilities for other packages

Planned Packages

The following packages are planned and will build on top of @sdbk/core:

  • @sdbk/client — Type-safe client wrapper for SurrealDB (uses core types)
  • @sdbk/query — Query builder with type inference (uses core expressions)
  • @sdbk/migrate — Schema migration tools (uses core schema types)

All packages depend on @sdbk/core for shared type definitions and utilities.

Usage

Check out the individual package documentation for usage examples:

More examples and documentation will be added as packages are developed.

Requirements

  • TypeScript: >= 5.0.0
  • Node.js: >= 18.0.0 (for development)
  • Bun: >= 1.3.3 (recommended package manager)

Development

This is a monorepo managed with Turbo and uses Bun as the package manager.

Prerequisites

# Install Bun (if not already installed)
curl -fsSL https://bun.sh/install | bash

Setup

# Clone the repository
git clone https://github.com/veskel01/sdbk.git
cd sdbk

# Install dependencies
bun install

# Build all packages
bun run build

# Run tests
bun run test

# Run linting
bun run lint

# Format code
bun run format

Available Scripts

  • bun run build — Build all packages
  • bun run test — Run tests for all packages
  • bun run lint — Lint all packages
  • bun run format — Format all packages
  • bun run check:types — Type-check all packages
  • bun run clean:workspace — Clean build artifacts

Project Structure

sdbk/
├── packages/
│   └── core/          # Core type definitions
├── scripts/           # Build and utility scripts
└── turbo.json         # Turbo configuration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

This project uses:

License

MIT © Jakub Andrzejewski (Veskel01)

See LICENSE file for details.

Links

About

SurrealDBKit (sdbk): modular TypeScript toolkit for SurrealDB queries, types, and integrations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors