Introduction

Better Query is a comprehensive TypeScript toolkit for building modern web applications with full type safety. It consists of two powerful packages that work seamlessly together:

Packages

Better Query

Better Query is a type-safe CRUD generator built on top of better-call that follows the architecture patterns of Better Auth. It provides a powerful way to generate REST API endpoints for your resources with minimal configuration while maintaining full TypeScript support and database agnostic operations.

Learn more about Better Query →

Better Admin

Better Admin is a comprehensive admin interface solution that integrates better-auth for authentication and better-query for data operations. It provides 78+ production-ready components with a CLI tool for easy installation.

Learn more about Better Admin →

Better Query Features

Better Query provides a wide range of features out of the box and allows you to extend it with plugins. Here are some of the key features:

  • 🚀 CLI Generator: Get started instantly with npx better-query init --with-auth
  • 🔧 Automatic Endpoint Generation: Creates full CRUD endpoints for any resource
  • Type-Safe: Full TypeScript support with Zod schema validation
  • 🔐 Better Auth Integration: Native integration with Better Auth for authentication and authorization
  • 🔒 Granular Permissions: Configure permissions per operation (create, read, update, delete, list)
  • 🛡️ Role-Based Security: Define permissions based on user roles and organization membership
  • 🔄 Schema Migrations: Automated detection and handling of breaking schema changes
  • 🎛️ Configurable: Enable/disable specific endpoints per resource
  • 📊 Pagination: Built-in pagination support for list endpoints
  • 🔍 Search: Basic search functionality for list operations
  • 🏗️ Database Agnostic: Works with SQLite, PostgreSQL, and MySQL via Kysely
  • 🌐 Framework Agnostic: Works with any framework that supports Web API handlers
  • 🎯 Type-Safe Client: Client SDK with full TypeScript support, similar to Better Auth
  • 🎨 Type Generation: Automatic TypeScript type generation from your schemas

...and much more!


On this page