Code for the database, turn PostgreSQL into your API server
concept User {
name: str;
boss: User;
}
api GET "/users/${id}" {
let q_user = db
.query(User)
.filter(
u => u.id == id
);
db.fetch_one(q_user)
}
Data modeling, query, API logic - one language to rule them all.- Declarative, functional programming language inspired by MoonBit and EdgeQL
- Strong static typing, algebraic effect system, ADT and pattern matching
- Language-INtegrated Query (LINQ) eliminates ORM
- Leverages native PostgreSQL types with zero-copy
- Compiler-as-a-Service supports textual and structural (graphical) dual-mode programming
// Declare an abstract effect:
effect Exn[T] {
raise(String) -> T
}
// Perform the effect in a function:
fn div(x: Int, y: Int) -> <Exn[Int]> Int {
if y == 0 { raise("Divided by 0") }
else { x / y }
}
// Define a handler, providing actual meaning
fn handler() -> ((<Exn[Int]> Int) ~> Int) {
hn {
raise(e) => {
println(e)
resume(0) // recover with 0
}
}
}
// Handle effects with the handler
let result: Int =
handle { div(5, 0) } with handler
// Rename all Users with name 'old' to 'new'
fn rename(old: String, new: String)
-> { Mutation } bag[User] {
mut_table() |> filter_map_inplace(fn {
{ name, .. } as user =>
if name == old {
Some({ name: new, ..user })
} else {
None
}
})
}
let agents: list[User] =
handle { rename("Phil", "Agent Coulson") }
with query_executor
master
container
worker
updater
storage
The "Figma + Vercel" for your Backend with Database
Develop with just a browser, supporting offline mode, local instances, and multi-user collaboration.
Free test instances provided, one-click deployment to the Internet or on-premises network.
Out-of-the-box schema migrations, third-party authentication, scheduled tasks, and more.
“
We aim to build this language as a truly open community project. Both the compiler and the runtime are open source under a permissive license, free to use and improve. An online committee shall listen to developers’ voices and hold open discussions to shape the language’s direction. As the project is still in its early stage, we will gradually open up more opportunities for collaboration, and we warmly welcome partners from both academia and industry. Whether you want to contribute code, share ideas, or explore applications together, we’d love to hear from you — just drop us an email.
”