Skip to content

modusDB: a transactional, embedded database system for model-native apps

License

Notifications You must be signed in to change notification settings

hypermodeinc/modusDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

modus

GitHub License chat GitHub Repo stars GitHub commit activity

Docs · Discord

ModusDB is a high-performance, transactional database system. It's designed to be type-first, schema-agnostic, and portable. ModusDB provides object-oriented APIs that makes it simple to build new apps, paired with support for advanced use cases through the Dgraph Query Language (DQL). A dynamic schema allows for natural relations to be expressed in your data with performance that scales with your use case.

ModusDB is available as a Go package for running in-process, providing low-latency reads, writes, and vector searches. We’ve made trade-offs to prioritize speed and simplicity.

The modus framework is optimized for apps that require sub-second response times. ModusDB augments polyglot functions with simple to use data and vector storage. When paired together, you can build a complete AI semantic search or retrieval-augmented generation (RAG) feature with a single framework.

Quickstart

package main

import (
  "github.com/hypermodeinc/modusdb"
)

type User struct {
  Gid  uint64 `json:"gid,omitempty"`
  Id   string `json:"id,omitempty" db:"constraint=unique"`
  Name string `json:"name,omitempty"`
  Age  int    `json:"age,omitempty"`
}

func main() {
  db, err := New(NewDefaultConfig("/tmp/modusdb"))
  if err != nil {
    panic(err)
  }
  defer db.Close()

  gid, user, err := modusdb.Upsert(db, User{
    Id:   "123",
    Name: "A",
    Age:  10,
  })
  if err != nil {
    panic(err)
  }
  fmt.Println(user)

  _, queriedUser, err := modusdb.Get[User](db, gid)
  if err != nil {
    panic(err)
  }
  fmt.Println(queriedUser)

  _, _, err = modusdb.Delete[User](db, gid)
  if err != nil {
    panic(err)
  }
}

Open Source

The modus framework, including modusDB, is developed by Hypermode as an open-source project, integral but independent from Hypermode.

We welcome external contributions. See the CONTRIBUTING.md file if you would like to get involved.

Modus and its components are Copyright 2025 Hypermode Inc., and licensed under the terms of the Apache License, Version 2.0. See the LICENSE file for a complete copy of the license. If you have any questions about modus licensing, or need an alternate license or other arrangement, please contact us at [email protected].

Acknowledgements

ModusDB builds heavily upon packages from the open source projects of Dgraph (graph query processing and transaction management), Badger (data storage), and Ristretto (cache). We expect the architecture and implementations of modusDB and Dgraph to expand in differentiation over time as the projects optimize for different core use cases, while maintaining Dgraph Query Language (DQL) compatibility.

About

modusDB: a transactional, embedded database system for model-native apps

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Contributors 3

  •  
  •  
  •  

Languages