Model your domain.Put it to work.
Model your domain.Put it to work.
A TypeScript framework for ontology-powered apps and AI.
Get Started Build with AI
Start with your coding agent
Paste this into your agent, then tell it what you want to build.
`bun create sixb my-app`Copy
Live example
From customer context to an approved quotePipedrive, CompanyCam, Google Drive, and PandaDoc connect to a shared model of customers, sites, quotes, and contracts. Prepared data flows up to an app, an agent, and an approval workflow. Creating the quote sends an action back down to PandaDoc. This is an interactive illustration with fictional data; it does not create an external document.PandaDocPipedriveCompanyCamGoogle DriveprojectionSiteQ-1042Riverside$12,400QuoteContractRiversideCustomerAppsQuotesQ-1042$12,400DraftAgentsQuoteassistantPreparingWorkflowsDraftReviewPublish
Build Put that model to workModel Define objects, relationships, and actionsPrepare Shape data for your modelConnect Bring your existing systems together
Q-1042 · $12,400Preparing quote…Preparing a quote from connected customer and site information.
From data to working software.
One framework. Every layer.
01 Connect
Start with your data.
Give your project access to the systems you already use. Choose a connector from the library, or bring your own client.
Connector
connectors/pipedrive.ts
import { defineConnector } from "@sixb/core"
import { pipedrive } from "@sixb/connector-pipedrive"export const crm = defineConnector(
"pipedrive",
pipedrive({
apiToken: () => process.env.PIPEDRIVE_API_TOKEN!,
})
)
TypeScript
02 Collect
Give every row a home.
Describe the data you want to keep. A sync reads your connector and brings those records into a typed dataset.
DatasetSync
datasets/customers.ts
import { col, defineDataset } from "@sixb/core"export const rawCustomers = defineDataset(
"pipedrive.customers",
{
schema: [
col("id", "string"),
col("name", "string"),
],
primaryKey: "id",
}
)
TypeScript
03 Prepare
Make the pieces fit.
Clean names, join sources, and shape records with SQL or TypeScript. Pipelines turn your raw datasets into data you can build on.
Pipeline
pipelines/customers.ts
const cleanNames = definePipelineStep("clean-names")
.inputs({ customers: rawCustomers })
.output(cleanCustomers)
.sql(({ customers }) => `
select id, trim(name) as name
from ${customers}
`)export const prepareCustomers =
definePipeline("prepare-customers")
.then(cleanNames)
TypeScript
04 Model
Give your data meaning.
Define the things your software works with and how they relate. Map dataset rows into that shared model, ready for your apps and AI.
ModelProjection
ontology/customer.ts
export const Customer = defineObjectType({
id: "Customer",
name: "Customer",
properties: [
prop("id", "string", {
required: true,
primary: true,
}),
prop("name", "string", { required: true }),
],
})TypeScript
05 Analyze
Ask better questions.
Query your model with typed filters. Bring the results into an AI prompt to summarize, explain, or help decide what to do next.
QueryAI
Find quotes ready for review
const { objects: quotes } = await sixb
.objects(Quote)
.query()
.where((quote) => quote.p.status.eq("ready"))
.limit(20)
.list()for (const quote of quotes) {
console.log(quote.properties.title)
}
TypeScript
06 Automate
Turn decisions into action.
Connect steps into a repeatable process. Pause for a person's approval, then run an action that writes back to your external system.
Workflow
workflows/quote-review.ts
export const quoteReview = defineWorkflow("quote-review")
.input({
quote: ref(Quote),
templateId: "string",
recipientEmail: "string",
})
.then(reviewQuote, ({ input }) => ({ quote: input.quote }))
.then(createQuoteDocument, ({ input, steps }) => ({
subject: input.quote,
params: {
approved: steps.reviewQuote.approved,
templateId: input.templateId,
recipientEmail: input.recipientEmail,
},
}))TypeScript
07 Operate
Put it in people's hands.
Build a React interface on the same model. Your screens, agents, and automation work with the same data and logic.
React
app/quotes/page.tsx
import { useObjectsQuery } from "@sixb/client/hooks"
import { objects } from "@sixb/client/query"
import { Quote } from "../../ontology/quote"export default function Quotes() {
const query = objects(Quote).query()
.where((q) => q.p.status.eq("ready"))
const { data } = useObjectsQuery(query)
return data?.objects.map((quote) => (
<article key={quote.primaryId}>
<h2>{quote.properties.title}</h2>
<p>{quote.properties.scope}</p>
</article>
))
}
TypeScript
08 Secure
Make access intentional.
Organize people into groups. Give each group a role with explicit grants for the data they can see and the operations they can perform.
RoleGroup
security/roles/quote-reviewers.ts
import { reviewers } from "../groups/reviewers"export const quoteReviewer = defineRole("quote-reviewer", {
grantedTo: [reviewers],
grants: [
can.access(applications.app),
can.view([Customer, Quote]),
can.apply(createQuoteDocument),
],
})
TypeScript
09 Extend
Use it wherever you build.
Run your project from the CLI. Access its data over HTTP, or subscribe to changes over WebSockets. The same framework, beyond the browser.
CLIHTTPWebSocket
Terminal
# Start your local project
bun sixb devBuild for deployment
bun sixb buildStart the production API
bun sixb apiShell
See it come together
Real code. A complete application.
Explore Northline, a working service operations app built with Sixb. Follow the data from connected systems to human decisions and automated actions.