Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flect

Flect is a developer platform for deploying apps and their backing resources — databases, KV stores, and object storage — on your own infrastructure (Nomad + Traefik). You describe an application in flect.toml (its services, the resources they use by id, and what each service may reach) and Flect deploys each service behind TLS with exactly that.

Your code stays clean: it calls createEnv() and asks for a binding by name. It never sees a URL, a port, or a secret. At deploy time Flect injects only FLECT_TOKEN and FLECT_BROKER_URL; the SDK resolves each binding to a scoped, short-lived connection at runtime.

Resources

Resource Backed by Accessor
App Docker → Nomad —
Database sqld / libsql (SQLite-compatible) env.db('DB')
KV Valkey (Redis-compatible) env.kv('CACHE')
Object storage Garage (S3-compatible) env.store('FILES')

Quick start

npm install -g @dotlabshq/flect-cli

flect login                    # SSO, stored in ~/.flect/config.json
flect use acme                 # your org; flect.toml names its own scope
flect init                     # scaffold flect.toml: one app, one scope
flect db create myapp-db       # prints the id to write in flect.toml
flect deploy                   # check the file, bind by id, deploy each service

SDK

import { createEnv } from '@dotlabshq/flect-sdk'

const env = createEnv()

const db    = await env.db('DB')       // an official @libsql/client
const cache = await env.kv('CACHE')    // an official ioredis
const files = await env.store('FILES') // an official @aws-sdk/client-s3

const { rows } = await db.execute('SELECT * FROM notes')
await cache.set('key', 'value')

The SDK returns the official client for each resource — there's no Flect-specific query API to learn.

Docs

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors