Flect
What Flect is
Section titled “What Flect is”Flect is a developer platform for deploying apps and their backing resources —
databases, KV stores, and object storage — on your own infrastructure. You
describe an application in flect.toml: its services, the resources they use,
and what each service may reach. Flect deploys each service behind TLS with
exactly that and nothing more.
Your application code stays clean: it calls createEnv() and asks for a binding
by name. It never sees a connection string, a port, or a credential.
import { createEnv } from '@dotlabshq/flect-sdk'
const env = createEnv()const db = await env.db('DB') // an official @libsql/clientconst rows = await db.execute('SELECT * FROM notes')The whole model in one screen
Section titled “The whole model in one screen”flect login # SSO, stored in ~/.flect/config.jsonflect use acme # your org; flect.toml names its own scopeflect init # scaffold flect.toml: one app, one scopeflect db create myapp-db # prints the id to write in flect.tomlflect deploy # check the file, bind by id, deploy each serviceAt deploy time Flect injects exactly two environment variables into your
container — FLECT_TOKEN and FLECT_BROKER_URL. Everything else (the database
URL, the cache prefix, the bucket keys) is resolved at runtime through the
broker, scoped to your project, and never written into your image.
What you get
Section titled “What you get”- Apps — deploy any Docker image; get a public HTTPS URL with an auto-issued TLS certificate.
- Databases — SQLite-compatible via sqld/libsql, isolated per resource.
- KV — Redis-compatible via Valkey, key-prefixed per resource.
- Object storage — S3-compatible via Garage, one bucket + key pair per resource.
- SDK —
@dotlabshq/flect-sdkhands you the official client for each resource (@libsql/client,ioredis,@aws-sdk/client-s3), pre-wired and scoped. - Least privilege by default — each service lists the bindings it uses, the services it calls and the secrets it gets; the broker refuses the rest.
- Scopes — an Org → Workspace → Project → Environment tree. One file per
environment (
flect.toml,flect.dev.toml), each with its own resources; a dev service can never reach a production database. - Secrets — names in the file, values set from stdin with
flect secret set, per service and per environment.
Next steps
Section titled “Next steps”- Quickstart — from
flect loginto a live app. - Local development — run
createEnv()with no broker. - SDK reference —
createEnv()and the resource clients. - CLI reference — every command.
- Platform architecture — how the control plane works.