README.md202 lines · main
1# Briven
2
3**The version-controlled backend you own.**
4
5[briven.tech](https://briven.tech) is a managed backend platform for app builders: databases you can branch like Git, authentication, file storage, serverless functions, and realtime — without running your own servers if you do not want to.
6
7| Surface | What it is |
8|---------|------------|
9| **[briven.tech](https://briven.tech)** | Hosted product (dashboard, projects, billing) |
10| **[docs.briven.tech](https://docs.briven.tech)** | Documentation |
11| **[api.briven.tech](https://api.briven.tech)** | Control plane API |
12| **briven-core** | Open-source engine (self-hostable, AGPL-3.0) |
13| **`npx @briven/cli`** | Developer CLI (MIT) |
14
15---
16
17## What you get (product map)
18
19### 1. Projects & databases (Doltgres)
20
21Every **project** on Briven is an isolated app environment.
22
23- **SQL database** with a normal Postgres wire protocol (tools like `psql`, Prisma, Drizzle, and many ORMs work).
24- Under the hood production uses **[Doltgres](https://www.doltgres.com)** — SQL **plus** Git-style history: branches, commits, diffs, and time-travel.
25- Stock Postgres is **not** the product database engine for Briven.tech.
26- Control plane metadata and each project’s data plane live on Doltgres (database-per-project model).
27
28**In the dashboard:** open a project → database / studio to browse tables and run SQL.
29
30**For apps:** use project connection settings and API keys (`brk_…`) for server-side data access. Never put admin secrets in a public frontend.
31
32---
33
34### 2. Briven Auth
35
36**Briven Auth** (product name: **briven-engine**) signs end-users into *your* applications — not only the Briven.tech operator login.
37
38| Capability | Description |
39|------------|-------------|
40| Email + password | Classic sign-up / sign-in |
41| Email OTP / magic link | Passwordless email flows |
42| SMS OTP | Optional; Twilio secrets per project |
43| Social login | Google, GitHub, Konnos, and more when secrets are configured |
44| Passkeys & MFA (TOTP) | Modern second factor |
45| Enterprise SSO | SAML / OIDC *into* your app (company IdP) |
46| Sessions & roles | List / revoke sessions; roles & permissions |
47| Security diary | Audit trail of sign-ins and config changes |
48| M2M | Machine clients: client id + secret → short-lived tokens |
49| OIDC IdP | Briven as a login office for *other* apps (authorize, token, userinfo, …) |
50
51**Dashboard:** **Auth** → pick a project → Overview, Users, Sessions, Security, Keys, **IdP**, Providers, Branding, Enterprise.
52
53**For apps:** prefer a first-party proxy (e.g. `/api/auth/*` on your domain → Briven FDI) so session cookies stay on your site.
54
55**Docs:** [docs.briven.tech/auth](https://docs.briven.tech/auth)
56
57Auth SDK keys look like `pk_briven_auth_…` — different from data-plane `brk_…` keys and storage keys.
58
59---
60
61### 3. File storage (S3 buckets)
62
63Briven gives each project **private object storage** (S3-compatible, MinIO on the managed stack).
64
65| Item | Detail |
66|------|--------|
67| Endpoint | `https://s3.briven.tech` |
68| Bucket | One primary bucket per project (e.g. `proj-…`) |
69| Keys | Scoped access keys from the dashboard (secret shown once) |
70| Public media | `https://media.briven.tech/media/<projectId>/<fileId>` when configured |
71| Soft delete | Restore from dashboard / tools where enabled |
72
73**This is not your SQL database.** Files live in S3; rows live in Doltgres.
74**This is not platform disaster-recovery backups** (those are a separate ops concern).
75
76**Dashboard:** project → **Storage** → create key → copy endpoint, bucket, access key, secret into **server** env only.
77
78**CLI:** `briven setup` / `briven connect` can mint storage credentials into `.env.local` when possible.
79
80**Docs:** [docs.briven.tech/storage](https://docs.briven.tech/storage)
81
82---
83
84### 4. Functions, realtime, and the rest
85
86| Area | Role |
87|------|------|
88| **Functions** | Serverless-style compute for your project (Deno isolate runtime on the managed product) |
89| **Realtime** | Reactive / websocket paths for live updates |
90| **Schedules** | Timed jobs |
91| **Studio** | Embedded data browser in the product |
92| **MCP** | Agent-facing tools bound to a single project key |
93
94---
95
96## Quick start (CLI)
97
98```bash
99mkdir my-app && cd my-app
100npx @briven/cli setup --name my-app # new project + wire this folder
101# or, existing project:
102# npx @briven/cli connect p_…
103briven deploy # or: briven dev
104```
105
106- **New project:** `briven setup` / `briven setup --name my-app`
107- **Existing project:** `briven connect p_…` (do not use `setup --project`)
108- Docs: [connect](https://docs.briven.tech/connect) · [quickstart](https://docs.briven.tech/quickstart)
109
110---
111
112## Keys (do not mix them)
113
114| Key style | Used for |
115|-----------|----------|
116| `brk_…` | Project data plane / API (server) |
117| `pk_briven_auth_…` | Auth SDK / app auth config |
118| `brvn…` / storage access keys | One project’s S3 bucket |
119| M2M / OIDC client secrets | Machine tokens / “Sign in with Briven” apps |
120
121Never commit secrets. Rotate anything that has appeared in chat or a public log.
122
123---
124
125## Monorepo layout
126
127```
128apps/
129 web/ briven.tech — marketing + dashboard (Next.js)
130 docs/ docs.briven.tech
131 api/ api.briven.tech — control plane (Hono on Bun)
132 runtime/ function runtime host
133 realtime/ websocket service
134 studio/ embedded data browser
135
136packages/
137 cli/ @briven/cli
138 client-react/ @briven/react
139 client-vanilla/ @briven/client
140 schema/ schema DSL + migrations
141 shared/ shared types and utilities
142
143infra/
144 dokploy/ compose templates for deploy / self-host
145```
146
147---
148
149## Local development
150
151Requires **Node 20 LTS**, **pnpm 9+**, and **Bun** for `apps/api`.
152
153```bash
154pnpm install
155pnpm dev
156```
157
158```bash
159pnpm lint
160pnpm typecheck
161pnpm test
162pnpm build
163```
164
165---
166
167## Tech stack (summary)
168
169- TypeScript (strict)
170- Next.js + Tailwind for web / docs / dashboard
171- Hono on Bun for the control plane
172- **Doltgres** for SQL + version history (Postgres wire)
173- MinIO for S3-compatible project storage
174- Redis where queues / rate limits need it
175- Observability: Grafana, Loki, Prometheus (ops stack)
176
177---
178
179## Brand & licence
180
181- Product UI: dark theme; accent `#00e87a` (auth surfaces may use the yellow Auth accent).
182- **briven-core** (engine): **AGPL-3.0**
183- **@briven/cli** and **@briven/client-\***: **MIT**
184
185---
186
187## Links
188
189| | |
190|--|--|
191| Product | [briven.tech](https://briven.tech) |
192| Docs | [docs.briven.tech](https://docs.briven.tech) |
193| Source (Konnos) | [code.konnos.org/flndrn/briven](https://code.konnos.org/flndrn/briven) |
194
195---
196
197## Maintainers: git remotes
198
199- **Konnos:** `https://code.konnos.org/flndrn/briven.git`
200- Optional GitHub mirror may exist; prefer the remotes configured on this machine.
201
202Pushing `main` does **not** by itself redeploy production unless a separate deploy workflow is run. Deploy via your Dokploy / ops path after review.
Preview

Briven

The version-controlled backend you own.

briven.tech is a managed backend platform for app builders: databases you can branch like Git, authentication, file storage, serverless functions, and realtime — without running your own servers if you do not want to.

SurfaceWhat it is
briven.techHosted product (dashboard, projects, billing)
docs.briven.techDocumentation
api.briven.techControl plane API
briven-coreOpen-source engine (self-hostable, AGPL-3.0)
npx @briven/cliDeveloper CLI (MIT)

What you get (product map)

1. Projects & databases (Doltgres)

Every project on Briven is an isolated app environment.

  • SQL database with a normal Postgres wire protocol (tools like psql, Prisma, Drizzle, and many ORMs work).
  • Under the hood production uses Doltgres — SQL plus Git-style history: branches, commits, diffs, and time-travel.
  • Stock Postgres is not the product database engine for Briven.tech.
  • Control plane metadata and each project’s data plane live on Doltgres (database-per-project model).

In the dashboard: open a project → database / studio to browse tables and run SQL.

For apps: use project connection settings and API keys (brk_…) for server-side data access. Never put admin secrets in a public frontend.


2. Briven Auth

Briven Auth (product name: briven-engine) signs end-users into your applications — not only the Briven.tech operator login.

CapabilityDescription
Email + passwordClassic sign-up / sign-in
Email OTP / magic linkPasswordless email flows
SMS OTPOptional; Twilio secrets per project
Social loginGoogle, GitHub, Konnos, and more when secrets are configured
Passkeys & MFA (TOTP)Modern second factor
Enterprise SSOSAML / OIDC into your app (company IdP)
Sessions & rolesList / revoke sessions; roles & permissions
Security diaryAudit trail of sign-ins and config changes
M2MMachine clients: client id + secret → short-lived tokens
OIDC IdPBriven as a login office for other apps (authorize, token, userinfo, …)

Dashboard: Auth → pick a project → Overview, Users, Sessions, Security, Keys, IdP, Providers, Branding, Enterprise.

For apps: prefer a first-party proxy (e.g. /api/auth/* on your domain → Briven FDI) so session cookies stay on your site.

Docs: docs.briven.tech/auth

Auth SDK keys look like pk_briven_auth_… — different from data-plane brk_… keys and storage keys.


3. File storage (S3 buckets)

Briven gives each project private object storage (S3-compatible, MinIO on the managed stack).

ItemDetail
Endpointhttps://s3.briven.tech
BucketOne primary bucket per project (e.g. proj-…)
KeysScoped access keys from the dashboard (secret shown once)
Public mediahttps://media.briven.tech/media/<projectId>/<fileId> when configured
Soft deleteRestore from dashboard / tools where enabled

This is not your SQL database. Files live in S3; rows live in Doltgres.
This is not platform disaster-recovery backups (those are a separate ops concern).

Dashboard: project → Storage → create key → copy endpoint, bucket, access key, secret into server env only.

CLI: briven setup / briven connect can mint storage credentials into .env.local when possible.

Docs: docs.briven.tech/storage


4. Functions, realtime, and the rest

AreaRole
FunctionsServerless-style compute for your project (Deno isolate runtime on the managed product)
RealtimeReactive / websocket paths for live updates
SchedulesTimed jobs
StudioEmbedded data browser in the product
MCPAgent-facing tools bound to a single project key

Quick start (CLI)

mkdir my-app && cd my-app
npx @briven/cli setup --name my-app   # new project + wire this folder
# or, existing project:
# npx @briven/cli connect p_…
briven deploy                         # or: briven dev
  • New project: briven setup / briven setup --name my-app
  • Existing project: briven connect p_… (do not use setup --project)
  • Docs: connect · quickstart

Keys (do not mix them)

Key styleUsed for
brk_…Project data plane / API (server)
pk_briven_auth_…Auth SDK / app auth config
brvn… / storage access keysOne project’s S3 bucket
M2M / OIDC client secretsMachine tokens / “Sign in with Briven” apps

Never commit secrets. Rotate anything that has appeared in chat or a public log.


Monorepo layout

apps/
  web/        briven.tech — marketing + dashboard (Next.js)
  docs/       docs.briven.tech
  api/        api.briven.tech — control plane (Hono on Bun)
  runtime/    function runtime host
  realtime/   websocket service
  studio/     embedded data browser

packages/
  cli/             @briven/cli
  client-react/    @briven/react
  client-vanilla/  @briven/client
  schema/          schema DSL + migrations
  shared/          shared types and utilities

infra/
  dokploy/    compose templates for deploy / self-host

Local development

Requires Node 20 LTS, pnpm 9+, and Bun for apps/api.

pnpm install
pnpm dev
pnpm lint
pnpm typecheck
pnpm test
pnpm build

Tech stack (summary)

  • TypeScript (strict)
  • Next.js + Tailwind for web / docs / dashboard
  • Hono on Bun for the control plane
  • Doltgres for SQL + version history (Postgres wire)
  • MinIO for S3-compatible project storage
  • Redis where queues / rate limits need it
  • Observability: Grafana, Loki, Prometheus (ops stack)

Brand & licence

  • Product UI: dark theme; accent #00e87a (auth surfaces may use the yellow Auth accent).
  • briven-core (engine): AGPL-3.0
  • @briven/cli and @briven/client-*: MIT

Links


Maintainers: git remotes

  • Konnos: https://code.konnos.org/flndrn/briven.git
  • Optional GitHub mirror may exist; prefer the remotes configured on this machine.

Pushing main does not by itself redeploy production unless a separate deploy workflow is run. Deploy via your Dokploy / ops path after review.