Dbrij Forge Documentation

How Dbrij Forge turns a description into a running app: the plan, the code it writes, where it lives on Source and runs on Hosting, changing it, checkpoints, publishing, export, credits and limits.

Introduction

Dbrij Forge builds a working web app from a conversation. Describe what you need, check the plan it shows you, and Forge writes the code into a Dbrij Source repository, gives it a database, and runs it on Dbrij Hosting at its own address. Then keep talking to it: ask for changes, edit the plan directly, or hand the code to a developer.

The model does not write the app. It writes a plan: what the app is, what it keeps, and what each of those things has. Ordinary code then turns the plan into the database schema, the SQL, the API routes and the pages, so the parts that must agree with each other come from one source and cannot disagree. The same plan always produces the same files.

Nothing Forge produces is locked in. The code is an ordinary repository you can clone, push to, download as a zip or copy elsewhere.

How a build works

THE STEPS, IN ORDER

1 · DescribeyouSay what the app should do, and optionally add a picture to plan from.
2 · PlanAI creditsDeputy, Dbrij’s AI, works out the plan. Your credits are checked first, so a plan that cannot be paid for never starts.
3 · ReviewyouForge shows the plan back. Correct anything it misunderstood, then agree to it. This is the cheap moment to catch a misunderstanding.
4 · RepositorySourceThe files are written and committed to a new Source repository first, so a later failure still leaves you with your code.
5 · DatabaseHostingA PostgreSQL database is created, because the app is configured with its address.
6 · ServiceHostingA Hosting service is pointed at the repository, with npm run migrate as its release command, and deployed.

WHERE A PROJECT STANDS

draftstatusThe project exists; nothing is generated yet.
planningstatusDeputy is working out what to build.
awaiting_reviewstatusThe plan is ready for you to agree to.
scaffoldingstatusFiles are being written and the repository seeded.
deployingstatusHosting is building and releasing it.
livestatusEverything is set up. The first deploy may still be building; the preview shows progress until the address serves and its certificate is issued.
failedstatusSomething went wrong. The project says what, in plain words, and how far it got.

Each step records its result as it goes, so a build that stops partway says exactly where. A plan that did not finish can be tried again from the original description. A build that stops after the repository exists leaves a repository you can still clone.

Describing an app

Name the things the app keeps, and what each of those has. Say whether people sign in, and whether they need help or emails. A description is 8 to 16,000 characters, and the plan reads the first 12,000.

A good description
A simple CRM: clients with a company name, contact email and notes, and projects with a title, budget, stage (quoted, working, done) and a due date.

You can add a picture to plan from: a spreadsheet, a paper form, another app's screen. PNG, JPEG or WebP, shrunk to 1600 pixels on its longest side before sending, and at most 1.5 MB.

Starting points

The gallery holds ready descriptions you can start from: Bookings, Simple CRM, Inventory, Member register, Request desk. They are descriptions, not finished apps, and go through the same plan, review and build as anything you type.

A project can be built personally or inside a company.

The plan

The plan is small on purpose. It holds the app's name, a one sentence tagline, the lists it keeps, a palette, a type pairing and its capabilities.

Lists and fields

A list (Invoices, Menu items) is one kind of record, with a table, a page and a navigation item. An app has up to 10 lists and each list up to 12 fields.

FIELD TYPES

textfieldA short line.
longtextfieldA paragraph.
numberfieldA number.
moneyfieldAn amount of money.
booleanfieldYes or no.
datefieldA date.
emailfieldAn email address.
urlfieldA web address.
selectfieldOne of a set of options. The first choice field of a list is its status.
linkfieldA record of another list, such as an order’s customer.
filefieldOne uploaded file, kept in the app’s own Dbrij Storage bucket.

Each field has a label, may be required, and may carry a one line hint. The generator adds its own columns, so a field may not be called id, createdAt, updatedAt, ownerId, paymentStatus, paymentReference, paymentToken, paidAt.

Per list options

privatebooleanEach signed in person sees only the records they added; admins see everyone’s. Switches accounts on.
notifyup to 3 rulesTell someone when a record is added, or when its status changes (to any option, or to one). See Capabilities.
paymentmoney fieldRecords can be paid for: the named money field says how much, in naira.

Look

Palettes: Slate, Ink, Forest, Clay, Ocean. Type pairings: Humanist, Grotesk, Editorial. The pairings use system fonts only, so an app renders the same next year with no font files to fetch.

Capabilities

Capabilities switch on platform features in the generated app. Where Dbrij is involved, a credential scoped to this one app arrives as environment settings at deploy time. Credentials are never written into the code, so the repository can be shared with anyone. A capability whose prerequisite is missing never fails the build: the app serves with that part quietly off, and Forge says what is still needed.

authaccountsRegister, sign in and sign out with email and password, with sessions kept in the app’s own database. Once on, every list needs a signed in person.
supportResolveA Get help door pointing at a Dbrij Resolve desk. Needs a company and a desk; both can be made on the spot from Forge.
emailSendEmail from your company’s verified sender. With accounts on, new accounts get a welcome email. Needs a verified sender domain, which takes DNS time.
smsPingSMS for notification rules, paid from the app owner’s Dbrij Ping units.

Notification rules

A rule fires when a record is added (created) or its status changes (status), and sends by email or sms to: owner (the app owner's email), creator (whoever added the record, on a private list), a field of the record such as email or phone, or a field of a linked record such as customer.phone. The message is written from the record itself, never by a model: "New order: Kemi", or "Order Kemi is now Paid".

Payments

A list that takes payments gives each record a payment link anyone can pay through. The money lands in the app owner's Dbrij wallet, less the same fee as a form payment. The app holds a key that can only collect payments, and only for itself.

The code it writes

Every app is the same ordinary stack, in TypeScript:

Clientsrc/clientA React 18 app built with Vite. kit/ holds the shared components.
Serversrc/serverAn Express 4 API, with the Drizzle ORM schema for the database.
DatabasePostgreSQLReached through DATABASE_URL.
Migrationsmigrations/Numbered SQL files, applied in order and recorded by scripts/migrate.mjs.
Running it locally
npm install
npm run migrate     # needs DATABASE_URL
npm run dev         # the client, with /api sent to a local server

SCRIPTS

npm run buildbuildvite build for the client, then esbuild bundles the server to dist/server.cjs.
npm startrunnode dist/server.cjs, listening on PORT.
npm run migratereleaseApplies migrations not yet recorded. Hosting runs it before traffic moves to a new version.

ENVIRONMENT THE APP READS

DATABASE_URL, PORTalwaysThe database and the port to listen on.
DBRIJ_SUPPORT_URLsupportWhere the Get help door points.
DBRIJ_EMAIL_URL, DBRIJ_EMAIL_TOKEN, DBRIJ_EMAIL_FROMemailSending email.
DBRIJ_OWNER_EMAILnotifyWhere rules sent to owner go.
DBRIJ_SMS_URL, DBRIJ_SMS_TOKENsmsSending SMS.
DBRIJ_PAYMENTS_URL, DBRIJ_PAYMENTS_TOKENpaymentsCollecting payments.
DBRIJ_FILES_ENDPOINT, DBRIJ_FILES_REGION, DBRIJ_FILES_BUCKET, DBRIJ_FILES_KEY_ID, DBRIJ_FILES_KEY_SECRETfile fieldsThe app’s own Storage bucket, with a key that reaches only that bucket.

Capability files exist only when the capability is on, so no app carries code it does not use. Hosting sets these values for you; set them yourself only when you run the app somewhere else.

Where it lives and runs

The code lives in a Dbrij Source repository, in your space or your company's. Every change Forge makes is a commit there with a message such as Forge: add a phone number to customers.

The app runs as a Dbrij Hosting project with two services: the app and its PostgreSQL database. Each push to the repository deploys, and the release command runs the migrations first, so a migration that fails stops the release and the previous version keeps serving. The app gets a platform address; add your own domain from Hosting like any other service.

Your first app runs as a Hosting preview for 7 days, on Hosting Free with one small database. After that its services stop unless the account is on a paid Hosting plan; nothing is deleted. Later apps run on your Hosting plan like any other service. Hosting asks for a verified card before a first deploy.

Deleting a Forge project removes the conversation and the checkpoint list only. The repository, the database and the running app belong to you and stay.

Changing an app

There are three ways to change a built app, and each lands as a commit and a deploy.

Edit the plan directly

The same editable plan you reviewed stays available after the build. Rename a field, add one, pick another palette: no model is called, so it costs no credits and lands in seconds.

Ask in the conversation

Say what you want changed (up to 4,000 characters) and Deputy revises the plan, which is regenerated, committed and deployed. This spends AI credits. The plan covers what the app stores, so adding, removing and renaming things works this way; wording, layout and behaviour go to the code agent.

The code agent

For changes the plan cannot express, the code agent reads the code, writes edits, checks them and commits. Hosting's build is where the code runs, never Dbrij's own servers. Before it starts you get a quote: what a change like this usually costs and a ceiling. It stops before any step that could pass the ceiling you agreed to, and a higher price at start time is refused. If the build fails after its change, it tries to fix it once within the same price. A first agent change moves the app to code mode (see Continuing by hand).

CODE AGENT LIMITS

Readsper change40 files, 160,000 bytes.
Changesper change20 files, 200,000 bytes a file.
Instructioncharacters4,000.
Runsper app per day20, also counted toward the daily change limit.

Your data is safe across changes

  • A schema change becomes a new numbered migration; migrations already run are never rewritten.
  • New tables and columns are added only when missing, so the same file is right on a fresh database and an old one.
  • Nothing is ever dropped. A field you remove disappears from the app, and its column stays in the database, unused.
  • Changing a field's type converts existing values. If a value cannot convert, the migration fails, the release fails, and the previous version keeps serving.

While an app is still building, or while the code agent is working on it, other changes wait.

Checkpoints

Forge saves a checkpoint for every change it makes. Each is a real git tag in the repository (checkpoint-001, checkpoint-002, and so on), so it can be reached with ordinary git as well as from Forge.

From a clone
git fetch --tags
git checkout checkpoint-003

Putting a checkpoint back makes a new commit with that version's code, and deploys it; history is never rewritten. In code mode you can also save where the code stands as a checkpoint of your own; a checkpoint holding code written outside Forge is marked as such.

Preview and publish

Turn the preview on and every change lands on a copy of the app with its own copy of the data, at its own address. Customers keep the published version until you publish. Turn it off and changes go straight to customers again.

Publishing runs a security check on the exact preview build first:

checkingstateThe check is running. Ask again shortly.
needs_decisionstateIt found medium or high risk worth reading. Fix it first, or publish anyway.
blockedstateIt found something critical. This version cannot be published.
check_failedstateThe check did not finish (often for lack of credits). Run it again, or publish anyway.
publishedstateCustomers now get this version.

Publish anyway applies to the commit you accepted it for, and never past critical. Hosting's own Promote button for a Forge app follows the same rule.

Continuing by hand

The repository is yours: clone it from Source, change anything, and push. Each push deploys like any Hosting service.

Take it from here
npx dbrij login && npx dbrij git setup
git clone https://api.dbrij.com/git/<owner>/<app>.git

Code mode

When Forge sees commits it did not write, the app moves to code mode. Forge keeps saving checkpoints, deploying, rolling back and publishing, and it never rewrites your files. Conversation and plan edits wait, because regenerating would overwrite your work. To change it by conversation again, put back a version Forge wrote from Checkpoints. The code agent works in code mode too.

Export

  • Download the code as it stands as a zip.
  • Copy the code, its history and its checkpoints to a new repository on your connected outside git account, private unless you say otherwise.

Nothing in the code is proprietary. Hand it to a developer, keep deploying it on Dbrij, or run it anywhere Node and PostgreSQL run.

Credits and limits

What costs credits

Planning a new app and asking for a change in the conversation spend AI credits; Forge shows the usual figure before you press either. Code agent changes are priced by their quote. Building, deploying, editing the plan yourself and putting a checkpoint back call no model and cost nothing.

One app to try

Without a Forge subscription you can build one app in your personal space. It comes with 200 starter credits to plan it and ask for a few changes (granted once per person) and the 7 day Hosting preview. Every other project needs Forge.

LIMITS

Projectsper person20.
New plansper person per day10, counted from your credit history, so deleting a project does not reset it.
Changesper app per day30, and 100 a person across all apps.
Redeploysper app per day30 (deploy now, roll back, reconnect).
Code agent runsper app per day20.
Lists, fieldsper app10 lists, 12 fields a list.
Notification rulesper list3.
Picture to plan fromsize1.5 MB.

Daily limits reset over a rolling day, and every app keeps running in the meantime.

Dbrij is Nigeria’s company operating system: the first Nigerian built platform to put team chat, video meetings, email, HR, tax compliant payroll, customer support, marketing, analytics and cloud hosting in one product on one subscription.

Everything on Dbrij

More from Dbrij