Conduit is a zero‑boilerplate REST engine that instantly exposes your database as a fully‑typed, multi‑format HTTP API.
It supports JSON, XML, YAML, TOML, NDJSON, CSV, and CBOR — simultaneously — and works with any SQL database through a pluggable driver system.
Conduit eliminates the need to hand‑craft REST interfaces, controllers, serializers, or schema definitions. Point it at a database, start the server, and your tables become live REST endpoints.
-
Multi‑Format Input & Output
JSON, XML, YAML, TOML, NDJSON, CSV, and CBOR — all first‑class citizens with automatic content negotiation and query overrides (?format=). -
Database‑Agnostic Architecture
Official drivers for SQLite, PostgreSQL, MySQL/MariaDB, SQL Server, libSQL/Turso, ClickHouse, and Oracle Database, plus an in-memory testing driver. Swap databases or authorization modules without changing your API. -
Zero‑Code REST API Generation
Every database table automatically becomes a typed REST endpoint supportingGET,POST,PUT,PATCH, andDELETE. -
SQL‑Like Query Filtering & Sorting
Powerful?where=expressions (with=,!=,<,>,<=,>=,LIKE,IN,NOT IN,IS NULL,IS NOT NULL,AND,OR,NOT, and parenthetical grouping) and?order=sorting compiled into secure parameterized SQL. -
Dynamic Schema API
Introspect database catalogs (GET /v1/schema), inspect table column definitions (GET /v1/schema/<table>), create tables (POST /v1/schema/<table>), or drop tables (DELETE /v1/schema/<table>) via HTTP. -
Strong Typing With Graceful Fallback
SQL types are preserved when possible; incompatible types (e.g., datetime) are safely represented as strings. -
Automated OpenAPI 3.0 & Interactive Docs
Real-time OpenAPI 3.0 JSON specification at/v1/openapi.jsonand interactive Scalar API documentation at/v1/docs. Exportable via--export-openapifor CI/CD pipelines. -
Pluggable Authorization & Security Policies
Protect data using environment variable tokens, database-backed token tables with high-speed LRU caching, or permissive No-Op mode with global unauthenticated policy flags. -
High Performance LRU Caching
Thread-safe in-memory caching for compiled WHERE ASTs, query metadata, and auth tokens. -
Config‑Driven Behavior
Auto-detects configuration files in JSON, YAML, TOML, or XML. -
Simple Deployment
Single static binary orgo install. -
MIT‑Licensed Open Core
Free to use, extend, and integrate.
Conduit combines:
- Multi‑Format I/O
- Database‑Agnostic Routing
- Instant REST Generation
…into a single engine that requires no code to expose a fully functional API.
It's ideal for:
- Rapid prototyping and MVPs
- Internal tools and admin dashboards
- High-throughput data ingestion and ETL pipelines (NDJSON / CSV)
- Multi‑format enterprise systems integration
- Database‑first applications
- Enterprise environments needing consistent REST interfaces
┌────────────────────────────────┐
│ HTTP Request │
│ JSON / XML / YAML / TOML / CSV │
│ NDJSON / CBOR │
└──────────────┬─────────────────┘
▼
┌───────────────────┐
│ Format Parser │
└─────────┬─────────┘
▼
┌───────────────────┐
│ Conduit Core │
│ Routing + Auth │
│ Routing + Auth + │
│ LRU Query Caches │
└─────────┬─────────┘
▼
┌───────────────────┐
│ DB Driver API │
│ SQLite / PG / ... │
└─────────┬─────────┘
▼
┌───────────────────┐
│ SQL Database │
└─────────┬─────────┘
▼
┌────────────────────────────────┐
│ HTTP Response │
│ JSON / XML / YAML / TOML / CSV │
│ NDJSON / CBOR │
└────────────────────────────────┘
go install github.com/untappedtech/conduit@latestDownload prebuilt binaries for Linux, macOS, and Windows under GitHub Releases.
git clone https://github.com/untappedtech/conduit
cd conduit
go build -o conduit ./cmd/conduitConduit automatically searches for a configuration file in this order:
config.jsonconfig.yamlconfig.ymlconfig.tomlconfig.xml
You can also specify one manually: You can also specify a custom configuration path or generate defaults:
# Specify config path
conduit --config ./myconfig.yamlOr generate a default config:
# Generate a starter configuration
conduit --generate-config yaml
conduit --generate-config json
conduit --generate-config yaml
conduit --generate-config toml
conduit --generate-config xml
# Export OpenAPI 3.0 specification to file
conduit --config ./config.yaml --export-openapi ./openapi.json{
"server": {
"host": "0.0.0.0",
"port": 8080
},
"database": {
"driver": "sqlite",
"dsn": "./app.db"
},
"policy": {
"publicReads": true,
"publicWrites": true,
"publicMutation": false
}
}server:
host: "0.0.0.0"
port: 8080
base_path: "/v1/"
default_limit: 50
database:
driver: "sqlite"
dsn: "./app.db?_pragma=journal_mode(WAL)&_pragma=busy_timeout(5000)"
policy:
publicReads: true
publicWrites: true
publicMutation: falseConduit supports three access levels:
- Read‑Only (
ro): AllowsGETandHEADoperations. - Read‑Write (
rw): AllowsGET,POST,PUT,PATCH, andDELETE. - Schema‑Mutation / Admin: Allows all CRUD operations plus table creation (
POST /v1/schema/<table>) and table deletion (DELETE /v1/schema/<table>).
Allows GET operations.
Allows GET, POST, PUT, PATCH, DELETE.
Allows creating new tables via:
POST /v1/schema/<tableName>
Allows deleting tables via:
DELETE /v1/schema/<tableName>
Access is controlled by:
-
Bearer tokens (
Authorization: Bearer <token>), direct authorization headers, orX-API-Keyheaders. -
Pluggable auth providers: Environment variables (
AUTH_TOKEN_*), database tables (dbAuth) with LRU caching, or No-Op mode. -
Global policy flags:
publicReads,publicWrites, andpublicMutation. -
API keys
-
Global flags:
publicReadspublicWritespublicMutation
Authorization modules are pluggable.
Every table becomes a live endpoint: |
| Method | Path | Description |
|---|---|---|
GET |
/v1/schema |
List all database tables |
GET |
/v1/schema/<table> |
Introspect table column metadata |
POST |
/v1/schema/<table> |
Create a new table dynamically |
DELETE |
/v1/schema/<table> |
Drop a table from the database |
GET |
/v1/<table> |
List records with limit, offset, order, where, and format |
GET |
/v1/<table>/<id> |
Fetch a single record by primary key |
POST |
/v1/<table> |
Insert a new records |
PUT |
/v1/<table>/<id> |
Replace an existing record |
PATCH |
/v1/<table>/<id> |
Partially update specific fields on a record |
DELETE |
/v1/<table>/<id> |
Delete a record by primary key |
GET |
/v1/docs |
Interactive API documentation UI (Scalar) |
GET |
/v1/openapi.json |
OpenAPI 3.0 JSON specification |
limit: Maximum number of rows to return. Passlimit=0for unlimited mode.offset: Number of rows to skip before returning results.order: Sort by column:?order=name:asc,?order=score:desc, or?order=name.where: Filter using SQL-like expressions:?where=score >= 10 AND status = 'active'.- Operators:
=,!=,<,>,<=,>=,LIKE,IN,NOT IN,IS NULL,IS NOT NULL,AND,OR,NOT. - Grouping with parentheses:
?where=(status = 'active' OR role = 'admin') AND age >= 21.
- Operators:
format: Response format (json,xml,yaml,toml,ndjson,csv,cbor).
curl -X POST http://localhost:8080/v1/schema/players \
-H "Content-Type: application/json" \
-d '{
"columns": [
{ "name": "id", "type": "integer", "autoincrement": true, "pk": true },
{ "name": "name", "type": "text", "nullable": false },
{ "name": "number", "type": "integer" },
{ "name": "team_id", "type": "integer" }
]
}'curl -X POST http://localhost:8080/v1/players \
-H "Content-Type: application/json" \
-d '{"name": "Wayne Gretzky", "number": 99, "team_id": 7}'curl -X POST http://localhost:8080/v1/players \
-H "Content-Type: application/x-yaml" \
-d '
name: Mario Lemieux
number: 66
team_id: 12
'curl "http://localhost:8080/v1/players?where=number%20%3E%3D%2050&order=number:desc&format=csv"Visit http://localhost:8080/v1/docs in your browser to explore your endpoints through the interactive Scalar OpenAPI interface.
resp, err := http.Get("http://localhost:8080/v1/players")
if err != nil { panic(err) }
defer resp.Body.Close()
var players []map[string]interface{}
json.NewDecoder(resp.Body).Decode(&players)
fmt.Println(players)Conduit provides native support for:
- SQLite (
sqlite) — Embedded file or in-memory database - PostgreSQL (
postgres) — Relational database engine - MySQL / MariaDB (
mysql) — Relational database engine - SQL Server (
sqlserver) — Microsoft SQL Server & Azure SQL - libSQL / Turso (
libsql) — Cloud edge SQLite database - ClickHouse (
clickhouse) — Columnar analytics engine - Oracle Database (
oracle) — Enterprise relational database - Memory (
memory) — Pure in-memory mock database for unit testing
Drivers are pluggable — implement the unified Database interface to support any SQL backend.
- Conduit does not require tables to exist ahead of time.
- Tables can be created dynamically via
/v1/schema/<table>. - Conduit does not perform migrations — it simply adapts to whatever schema exists.
Comprehensive documentation is available under
docs/:
- Core: Philosophy _ Getting Started _ Roadmap
- Formats: Overview _ JSON _ XML _ YAML _ TOML _ NDJSON _ CSV * CBOR
- Configuration: Overview _ Server _ Database _ Policy _ Auth Overview _ Env Auth _ DB Auth * No-Op Auth
- API Reference: Schema API _ CRUD API _ Query API _ Pagination _ Validation
- Architecture: Overview _ Flow _ Multi-Format Engine _ Database Drivers _ Error System
- Error Catalog: Error Index
Conduit v1.0.0 (Initial Release) focuses on:
- Multi‑format I/O
- Database‑agnostic routing
- Pluggable drivers
- Schema creation
- Authorization layers
Premium features (event bus, advanced output types, etc.) will be introduced later but are not included in this README.
MIT License Open core model — free for commercial and private use.
Contributions are welcome. Driver implementations, format handlers, and performance improvements are especially appreciated.
Conduit is built to make REST interfaces effortless — a universal, multi‑format bridge between your applications and your data. Contributions are welcome. Driver implementations, format handlers, and performance improvements are especially appreciated.