Introduction

Welcome to the TableCraft Engine documentation! This engine simplifies database interactions by allowing you to define table configurations and automatically generate powerful APIs with filtering, sorting, pagination, and more.

Getting Started

Start with the basics to understand how to define tables and fetch data.

Basics

  1. Basics

    • Defining your first table.

    • Standard query parameters (sort, filter, paginate).

    • Basic API setup.

  2. Relationships & Joins

    • Connecting tables (e.g., Users → Orders).

    • Fetching related data.

    • Filtering across relationships.

  3. Advanced Configuration

    • Computed columns (SQL expressions).

    • Custom search logic.

    • Transforms (formatting data).

Core Concepts

  1. Security & Access Control

    • Handling sensitive data.

    • Tenant isolation.

    • Soft deletes.

  2. Extending & Raw SQL

    • When the engine isn't enough.

    • Writing raw Drizzle queries.

    • Using manualResult.

  3. Error Handling

    • Input validation.

    • Typed error class.

Features

Automatic date range filtering with smart detection:

  • Auto-detects date columns from schema

  • Prefers createdAt as default filter column

  • Full calendar date picker in frontend

  • Quick presets (Today, This Week, This Month, etc.)

Learn more about Date Filtering →

API Reference

Packages

Package
Description

@tablecraft/engine

Core engine with query building

@tablecraft/table

React DataTable component

@tablecraft/client

Frontend SDK

@tablecraft/codegen

TypeScript type generator

@tablecraft/adapter-hono

Hono.js adapter

@tablecraft/adapter-express

Express adapter

@tablecraft/adapter-next

Next.js adapter

@tablecraft/adapter-sveltekit

SvelteKit adapter

@tablecraft/adapter-elysia

Elysia (Bun) adapter

@tablecraft/plugin-cache

Caching plugin

Last updated

Was this helpful?