@onepipe/sdk
v0.4.0
Published
Stream-first developer platform SDK for Bun
Downloads
310
Maintainers
Readme
@onepipe/sdk
Core SDK for OnePipe - a stream-first developer platform for Bun.
Installation
bun add @onepipe/sdkFeatures
- REST - Fluent API builder with routing, CORS, OpenAPI
- Flow - Durable event streams with SSE
- DB - Database abstraction (PostgreSQL, MySQL, SQLite)
- Projection - Materialized views from events
- Signal - Reactive state with schema validation
- Channel - RPC handlers with retry
- Cache - Redis integration
- Storage - S3-compatible object storage
Quick Start
import { REST, DB, Flow, Signal, APIError } from '@onepipe/sdk'
import { z } from 'zod'
const db = DB.create('app').sqlite(':memory:').build()
const events = Flow.create('events')
.schema(z.object({ type: z.string() }))
.build()
const api = REST.create('api')
.basePath('/api')
.db(db)
.get('/health', () => ({ status: 'ok' }))
.build()See the main README for full documentation.
License
MIT
