explaingit

objectbox/objectbox-java

4,610JavaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

ObjectBox is a fast, easy-to-use database for Android, Java, and Kotlin apps that lets you store and retrieve objects directly without SQL, and uniquely offers on-device vector search for building local AI features.

Mindmap

mindmap
  root((objectbox-java))
    What it does
      Store and retrieve objects
      No SQL required
      On-device vector search
      Object relationships
    Tech stack
      Java and Kotlin
      Android
      Gradle and Maven
      Annotation processing
    Use cases
      Android app database
      Local AI similarity search
      Offline-first mobile apps
      Desktop Java app storage
    Audience
      Android developers
      Java/Kotlin developers
      Mobile app builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a local database to an Android app where users can save and retrieve data offline without writing any SQL.

USE CASE 2

Build an Android app with on-device AI-powered similarity search that finds related items without sending data to a server.

USE CASE 3

Store Java or Kotlin objects with relationships between them using a simple annotation-based API, no schema migration scripts needed.

USE CASE 4

Replace SQLite in a Java or Kotlin desktop app with a faster, simpler object-oriented database.

Tech stack

JavaKotlinAndroidGradleMaven

Getting it running

Difficulty · easy Time to first run · 30min

Requires adding the ObjectBox Gradle plugin to your build files, works on Android 5.0+ and Java 8+, no external server needed.

Free to use for any purpose including commercial projects as long as you keep the copyright and license notice.

In plain English

ObjectBox is a database library for Android apps and Java or Kotlin programs that run on a computer. It lets you store and retrieve data without writing SQL queries. Instead of working with tables and rows the way a traditional database requires, you define a plain Java or Kotlin class, mark it with an annotation, and ObjectBox handles the rest. You put objects in, you get objects out. The core idea is that saving a "Person" object should be as simple as calling box.put(person), and reading it back should be box.get(id). The library generates the necessary database code for you based on the class definition, so you spend less time on boilerplate. It supports creating, reading, updating, and deleting records, as well as defining relationships between different types of objects. One feature the README highlights is on-device vector search. This is a way of finding records that are similar to a given input, which is the same technique used in AI-powered search and recommendation systems. ObjectBox claims to be the first database of its kind to offer this capability directly on a device, without sending data to a server. The README connects this to use cases like building apps that include local AI features. The library works on Android 5.0 and newer, and on desktop or server systems running Linux, macOS, or Windows. It supports Java 8 and newer, and Kotlin 1.7 and newer. Setup is done through Gradle or Maven, the standard build tools for Java projects. The README includes detailed configuration steps for both. ObjectBox is released under the Apache 2.0 license, which allows free use in commercial and open-source projects. The project also offers paid plans with additional features, as noted in the linked documentation.

Copy-paste prompts

Prompt 1
I'm adding ObjectBox to an Android app. Show me how to define a Person entity class with annotations, set up the database, and save and retrieve Person objects with box.put() and box.get().
Prompt 2
Using ObjectBox for Android, show me how to model a one-to-many relationship between a User and their Order objects, and write a query to fetch all orders for a given user.
Prompt 3
I want to add on-device vector similarity search to my Android app using ObjectBox. Show me how to store embeddings on an entity and query for the top 5 closest matches to a given input vector.
Prompt 4
Show me the complete Gradle setup for ObjectBox in an Android project, including the plugin block and dependency declarations.
Open on GitHub → Explain another repo

← objectbox on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.