Releases

User-friendly release notes and installation guides

Release Notes

User-friendly summaries of each release.


v0.2.8 - Custom Queries & Schemas (December 23, 2025)

Game-changer! DataBridge now supports custom queries and schema transformations - extend beyond CRUD with full type safety.

What’s New

Custom Queries ⭐ NEW

  • Define custom API endpoints - Create complex business logic endpoints beyond CRUD
  • Type-safe handlers - Full TypeScript support with Prisma Client
  • Parameter validation - Automatic Zod schema generation for params, query, and body
  • OpenAPI integration - Custom endpoints appear in Swagger UI automatically
  • Configuration file: databridge.queries.ts at project root

Example:

// databridge.queries.ts
import { defineQueries } from '@databridge-cli/cli';

export default defineQueries({
  'getUserDashboard': {
    method: 'GET',
    path: '/users/:userId/dashboard',
    params: { userId: { type: 'number', required: true } },
    handler: async (prisma, { params }) => {
      const user = await prisma.user.findUnique({
        where: { id: params.userId },
        include: { posts: true, comments: true }
      });
      return { user, stats: { postCount: user.posts.length } };
    }
  }
});

Custom Schemas ⭐ NEW

  • Transform database models - Create custom response shapes (DTOs)
  • Hide sensitive fields - Exclude passwords, tokens, internal IDs
  • Computed fields - Add fullName, formatted dates, calculations
  • Async transformations - Load related data on-demand
  • Configuration file: databridge.schemas.ts at project root

Example:

// databridge.schemas.ts
import { defineSchemas } from '@databridge-cli/cli';

export default defineSchemas({
  UserPublic: {
    from: 'User',
    fields: {
      id: true,
      email: true,
      firstName: true,
      lastName: true,
      password: false,  // Hide sensitive field
      fullName: {
        compute: (user) => `${user.firstName} ${user.lastName}`,
        type: 'string'
      }
    }
  }
});

Enhanced Code Generation

  • Custom route generator - Generates Fastify routes from query definitions
  • Schema transformers - Automatic DTO transformation layer
  • Validation layer - Zod schemas for all custom endpoints
  • TypeScript types - Full type safety across custom code
  • DMMF validation - Validates queries against Prisma schema

New Parsers

  • QueryParser - Parses and validates databridge.queries.ts
  • SchemaParser - Parses and validates databridge.schemas.ts
  • ConfigValidator - Validates custom configs against DMMF
  • CustomRouteGenerator - Generates custom Fastify routes
  • TransformerGenerator - Generates schema transformation functions

Documentation

Breaking Changes

None! This is a fully backward-compatible feature addition.

Installation

npm install -g @databridge-cli/cli

Quick Start with Custom Features

# 1. Initialize project
databridge init

# 2. Create custom queries
echo 'import { defineQueries } from "@databridge-cli/cli";
export default defineQueries({
  "getStats": {
    method: "GET",
    path: "/stats",
    handler: async (prisma) => ({
      users: await prisma.user.count(),
      posts: await prisma.post.count()
    })
  }
});' > databridge.queries.ts

# 3. Create custom schemas
echo 'import { defineSchemas } from "@databridge-cli/cli";
export default defineSchemas({
  UserPublic: {
    from: "User",
    fields: { id: true, email: true, password: false }
  }
});' > databridge.schemas.ts

# 4. Generate (parses and applies custom config)
databridge generate

# 5. Start server
databridge serve

Use Cases

Custom Queries Perfect For:

  • Complex joins across multiple tables
  • Aggregations and statistics (count, avg, sum)
  • Search with dynamic filters
  • Batch operations
  • Business logic endpoints

Custom Schemas Perfect For:

  • Hiding sensitive data (passwords, API keys)
  • API versioning (v1, v2 response shapes)
  • Mobile vs web different responses
  • Computed fields (fullName, age, formatted dates)
  • Compliance (GDPR, data minimization)

Learn More

Known Issues

None at this time.

Thank You!

This feature was heavily requested! Special thanks to the community for feedback and testing.


v0.2.5 - Multi-Database Support (December 16, 2025)

Major update! DataBridge now supports 5 major databases with Prisma 7 adapter architecture.

What’s New

Multi-Database Support

  • MySQL - Fully tested with @prisma/adapter-mariadb
  • PostgreSQL - Fully tested with @prisma/adapter-pg
  • SQL Server - Fully tested with @prisma/adapter-mssql
  • SQLite - File-based database with @prisma/adapter-better-sqlite3
  • CockroachDB - Distributed SQL with @prisma/adapter-pg

Prisma 7 Migration

  • Migrated to Prisma 7 adapter architecture
  • Automatic adapter selection based on database provider
  • Auto-detect database provider from connection string
  • Automatic driver installation (mariadb, pg, mssql, better-sqlite3)

Enhanced CLI Commands

  • databridge init - Now prompts for database provider selection
  • databridge introspect - Auto-detects and updates provider in schema.prisma
  • databridge generate - Generates correct adapter configuration for each database
  • databridge generate-sdk - Generate client SDKs in 50+ languages (Python, Go, C#, Java, TypeScript, etc.)
  • databridge serve - Enhanced with validation and OpenAPI endpoint

OpenAPI Ecosystem

  • OpenAPI 3.0 spec generation from Prisma schema
  • Interactive Swagger UI at /docs
  • Multi-language SDK generation (50+ languages)
  • Testing toolkit: Dredd contract testing, Prism mock servers
  • Auto-synced API contracts across your stack

Documentation Overhaul

  • Complete CLI command reference for users (1,000+ lines)
  • Database setup guide for all 5 databases
  • Docker setup examples for each database
  • Windows Git Bash workarounds documented
  • SQL Server special requirements explained
  • Getting started guides updated for v0.2.5

Breaking Changes

SQL Server Requirements

  • SQL Server now requires additional environment variables:
    DB_SERVER=localhost
    DB_PORT=1433
    DB_NAME=mydb
    DB_USER=sa
    DB_PASSWORD=password
  • This is due to Prisma 7 SQL Server adapter architecture
  • Documentation includes clear setup instructions

Prisma 7 Changes

  • Prisma Client output path now requires explicit configuration
  • Generated client moved to generated/prisma directory
  • Adapters replace direct database URLs in some configurations

Installation

npm install -g @databridge-cli/cli

Works on Windows, macOS, and Linux.

Quick Start

# 1. Initialize with database selection
databridge init
# Choose: MySQL, PostgreSQL, SQL Server, SQLite, or CockroachDB

# 2. Introspect (auto-detects provider)
databridge introspect

# 3. Generate API with correct adapters
databridge generate

# 4. Generate SDKs (optional)
databridge generate-sdk --lang python,go,csharp

# 5. Start server
npm run dev

Learn More

Known Issues

SQL Server on Windows Git Bash

  • Use MSYS_NO_PATHCONV=1 prefix for docker exec commands
  • Documented in database-setup.md

Adapter Dependencies

  • First-time setup may take longer due to driver installation
  • All drivers are installed automatically

Thank You!

Special thanks to everyone testing the multi-database features!


v0.1.0 - Initial Release (December 4, 2024)

Welcome to the first release of DataBridge CLI! This release brings you a complete, zero-install CLI tool for rapidly building type-safe REST APIs from your database schema.

What’s New

Complete CLI Workflow

  • Create new projects with databridge init
  • Introspect your database with databridge introspect
  • Generate complete API with databridge generate
  • Start developing instantly with npm run dev

Zero-Install Philosophy

  • All dependencies bundled (~60 MB per platform)
  • No waiting for npm installs
  • Works offline after initial download
  • Platform-optimized binaries

Smart Features

  • ✅ Automatic port conflict resolution (tries 3000-3004)
  • ✅ Automatic Prisma plugin generation
  • ✅ Automatic Prisma client generation
  • ✅ Cross-platform compatibility (Windows, macOS, Linux)

Installation

Note: v0.1.0 used platform-specific packages. These are now deprecated in favor of the universal @databridge-cli/cli package (v0.2.5+).

Legacy platform packages (deprecated):

# Windows
npm install -g @databridge-cli/cli-win32

# macOS
npm install -g @databridge-cli/cli-darwin

# Linux
npm install -g @databridge-cli/cli-linux

Current recommendation: Use @databridge-cli/cli (works on all platforms)

Verify: databridge --version

Quick Start

# 1. Initialize project
databridge init

# 2. Configure your database in .env

# 3. Introspect database
databridge introspect

# 4. Generate API
databridge generate

# 5. Start developing
npm run dev

Your API will be running at http://localhost:3000 (or next available port).

Learn More

Known Issues

None at this time. Please report issues if you encounter any problems.

Feedback Welcome!

This is our first release! We’d love to hear your thoughts:

  • ⭐ Star the repo if you find it useful
  • Report bugs via GitHub Issues
  • Share feature requests
  • Suggest documentation improvements

For detailed technical changes, see CHANGELOG.md

Was this page helpful?