Your Data Logic Schema

Code for the database, turn PostgreSQL into your API server

New Programming Language!
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.
Compiles into WASM + SQLCompilationLike WASM bytecode, SQL is just another compilation target.
Runs in PostgreSQLRuntimeYour App has access to the PG shmem, exposing services directly.
Language
  • 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
Architecture
DevDeveloper
https://yanji.tech/zhang3/e-shop
Browser
Visual CodeVisual Code
Shared ASTShared AST
Textual CodeTextual Code
Compiler
mbt
bytecode
SDL
DDL
EdgeQL
DML
WASM BackendSQL Backend
UserEnd User
Client

master

Dispatcher

container

User App
shmem

worker

updater

Update SQL
Compiler
Native Code
Query Function
User Data

storage

Server
Technologies
OCamlPostgreSQLMoonBitGelPyodideWAMR
Cloud PlatformEarly Preview

The "Figma + Vercel" for your Backend with Database

Web IDEWeb IDE

Develop with just a browser, supporting offline mode, local instances, and multi-user collaboration.

CloudCloud

Free test instances provided, one-click deployment to the Internet or on-premises network.

ToolchainToolchain

Out-of-the-box schema migrations, third-party authentication, scheduled tasks, and more.

Collaboration

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.