Introduction to DataBridge

Free developer toolkit for auto-generating type-safe APIs and Typescript SDKs from your database

DataBridge

The free, self-hosted developer toolkit for auto-generating type-safe APIs and Typescript SDKs from your database

Auto-generate type-safe APIs, TypeScript SDKs for Angular, React, Vue, and Svelte apps from MySQL, PostgreSQL, SQL Server, SQLite, and CockroachDB — like Firebase DataConnect, but for SQL.

DataBridge bridges your database and your frontend apps with automatically generated, type-safe code. Skip the boilerplate, stay in sync, keep control.

What Problem Does It Solve?

The Pain:

  • Writing CRUD APIs manually is repetitive and error-prone
  • Frontend and backend types drift out of sync
  • Existing tools force you into specific databases (Supabase → Postgres only, Firebase → NoSQL)
  • Teams need codegen tools that work with their existing database (MySQL, PostgreSQL, SQL Server, etc.)

The Solution: DataBridge automatically:

  • Connects to your database
  • Generates REST API routes (Fastify-based)
  • Generates typed Typescript code/services (Observable-based)
  • Generates MCP servers for AI-powered database access ⭐ COMING SOON
  • Keeps types in sync across stack
  • Includes JWT auth out-of-the-box ⭐ COMING SOON
  • Stays extensible for custom logic

How Is This Different?

| Feature | DataBridge | Firebase DataConnect | Supabase | Prisma + NestJS | |---------|------------|---------------------|----------|-----------------|| | Focus | Developer workflow automation | Managed service | Full backend platform | ORM only | | Database | ✅ 5 databases (MySQL, PostgreSQL, SQL Server, SQLite, CockroachDB) | Postgres only | Postgres only | Any SQL | | Frontend | ✅ Angular, React, Vue, Svelte SDKs | Generic clients | Generic REST | Manual integration | | Self-hosted | ✅ Lightweight Node | ❌ Managed only | ✅ Heavy stack | Manual setup | | Type Safety | ✅ End-to-end | ✅ GraphQL-based | Partial | Manual | | Target | TypeScript/Angular devs | Firebase users | Backend infra | ORM users |

TL;DR: We’re developer tooling (like Prisma), not backend infrastructure (like Supabase). We solve workflow automation, not hosting.


Features

Core Generation

  • Automatic CRUD API generation from Prisma schema
  • Prisma ORM integration for type-safe database access
  • Angular service generation using ts-morph
  • Fastify backend with hot reload
  • CLI tool for scaffolding and codegen
  • Extensible for custom routes, logic, policies

OpenAPI Ecosystem ⭐ NEW

  • OpenAPI 3.0 spec generation from Prisma schema
  • Interactive Swagger UI at /docs with try-it-out
  • Multi-language SDK generation (50+ languages: Python, Go, C#, Java, Rust, etc.)
  • Testing toolkit: Dredd contract testing, Prism mock servers, Postman export
  • Auto-synced API contracts across your entire stack

Coming Soon

  • MCP server generation for AI-native database access
  • JWT authentication middleware
  • Enhanced Zod validation with auto-generated schemas
  • Production-ready logging with Pino (JSON/pretty modes)
  • Auto-generated test scripts for API validation

Architecture

┌─────────────────┐
│  MySQL Database │
└────────┬────────┘

    Prisma ORM

┌────────▼────────────────────┐
│   Fastify API Server        │
│  • Auto-generated routes    │
│  • Swagger UI at /docs      │
│  • OpenAPI 3.0 spec         │
└────────┬────────────────────┘

   CLI Generator

  ┌──────▼───────┬──────────────────┐
  │              │                  │
┌─▼────────┐ ┌──▼──────────┐ ┌────▼──────────┐
│ Angular  │ │  OpenAPI    │ │  Multi-Lang   │
│ Services │ │  Spec       │ │  SDKs         │
│ (RxJS)   │ │ (JSON)      │ │ (50+ langs)   │
└──────────┘ └─────────────┘ └───────────────┘

Flow:

  1. Define your database schema in schema.prisma
  2. Run databridge generate to create:
    • API routes + Angular services
    • OpenAPI 3.0 specification
    • Interactive Swagger UI
  3. Explore API at /docs or generate SDKs: databridge generate-sdk --lang python,go
  4. Import services in Angular or use generated SDKs
  5. Deploy Fastify server with generated endpoints

Quick Start

# 1. Initialize project
databridge init

# 2. Connect to your MySQL database
# Edit .databridge.json with your DB URL

# 3. Introspect database schema
databridge introspect

# 4. Generate API + SDKs + OpenAPI
databridge generate

# 5. Start the API server
npm run dev

# 6. Explore interactive docs
open http://localhost:3000/docs

# 7. Generate client SDKs (optional)
databridge generate-sdk --lang python,go,typescript

Angular Services:

import { ProductsService } from './generated/products.service';

@Component({...})
export class ProductListComponent {
  products$ = this.productsService.list();
  
  constructor(private productsService: ProductsService) {}
  
  addProduct(name: string, price: number) {
    this.productsService.create({ name, price })
      .subscribe(product => console.log('Created:', product));
  }
}

Python SDK:

from databridge_client import ApiClient, Configuration, ProductApi

config = Configuration(host="http://localhost:3000")
with ApiClient(config) as client:
    product_api = ProductApi(client)
    products = product_api.list_products(page=1, limit=10)
    
    new_product = product_api.create_product({
        "name": "Laptop",
        "price": 999.99
    })

Go SDK:

config := databridge.NewConfiguration()
config.Host = "http://localhost:3000"
client := databridge.NewAPIClient(config)

products, _, _ := client.ProductApi.ListProducts(ctx).Execute()

Documentation


Who Is This For?

Angular/React/Vue/Svelte + TypeScript teams building SPAs/PWAs with any major SQL database
Self-hosted stack developers who prefer Docker + Node over managed cloud
Agencies / Indie devs wanting Firebase-like DX with own database + control
Compliance-focused orgs needing on-prem/self-hosted solutions
Teams with existing databases (MySQL, PostgreSQL, SQL Server) who need instant APIs


Roadmap

v0.2.9 (Current) - Custom Queries & Schemas + Multi-Database Support ⭐ NEW

  • ✅ CLI scaffolding (init, introspect, generate, serve)
  • MySQL support (fully tested)
  • PostgreSQL support (fully tested) ⭐ NEW
  • SQL Server support (fully tested) ⭐ NEW
  • SQLite support ⭐ NEW
  • CockroachDB support ⭐ NEW
  • Prisma 7 adapter architecture ⭐ NEW
  • Auto-detect database provider during introspect ⭐ NEW
  • ✅ REST API generation (Fastify)
  • ✅ Angular service generation
  • OpenAPI 3.0 spec at /openapi.json ⭐ NEW
  • Swagger UI at /docs
  • Multi-language SDK generation (50+ languages)
  • Testing ecosystem (Dredd, Prism, Postman)

v0.3 - Enhanced Security and Type Safety

  • JWT authentication
  • MCP server generation for AI-native database access
  • GraphQL API option
  • Relations support
  • Zod validation enhancements

v0.3 - Realtime & Policies

  • WebSocket subscriptions
  • Access control policies
  • Angular Signals integration

v0.4 - Tooling

  • Admin dashboard UI
  • Schema visualizer
  • Migration tools

v1.0 - Production Ready

  • Multi-DB support (Postgres, SQLite)
  • Performance optimizations
  • Full documentation
  • Community plugins

Next Steps

Ready to get started? Check out:

Getting Started

OpenAPI & SDK Tutorials ⭐ NEW


License

PROPRIETARY SOFTWARE LICENSE - see LICENSE for details.


Why “DataBridge”?

We bridge the gap between your database and frontend, connecting them with type-safe, auto-generated code. No vendor lock-in, no manual boilerplate, just productivity.

Built the Developers and community.

Was this page helpful?