An Android Studio plugin that reads the schema files exported by Room and shows them as an interactive entity-relationship diagram in the Room ER tool window.
Every table, view and FTS table with its columns and types, laid out automatically. Foreign keys are drawn in crow's-foot notation with their cardinality worked out from the schema: one-to-one, one-to-many and the junction tables of many-to-many relationships. Drag tables where you want them; RoomEr remembers the positions per database and reloads the diagram by itself after every build.
Select a table and turn on Focus mode to see only it and the tables it is linked to by foreign keys; everything else fades into the background. RoomEr follows the IDE theme: light, dark and high contrast.
Type in the search box (or press /) to find tables and columns by name. Pick a result to jump to it on the
diagram; Enter on a selected table opens its @Entity class in the editor (Kotlin or Java).
Badges mark primary keys (PK), foreign keys (FK), unique columns (UQ) and indexed columns (IDX). Nullable
types end in ?. The relationship ends show exactly one, zero or one, or many.
Copy as Mermaid or Save as .mmd turns the schema into a Mermaid erDiagram for READMEs, wikis and
pull requests: GitHub, GitLab and Notion render it directly.
- Several databases per project, with a switcher in the tool window
- Collapse tables to their names, reset the layout, show or hide the legend
- Read-only and offline: no network access, no telemetry
- JetBrains Marketplace (coming soon): Settings | Plugins | Marketplace, search for "RoomEr", install.
- From disk: download
RoomEr-<version>.zipfrom Releases, then Settings | Plugins | ⚙ | Install Plugin from Disk… and pick the zip without unzipping it.
Requires Android Studio 2026.1 (Quail) or newer.
RoomEr reads the JSON that Room writes at build time, so schema export must be on.
-
Keep
exportSchemaenabled (it is the default) on your database:@Database(entities = [User::class], version = 3, exportSchema = true) abstract class AppDatabase : RoomDatabase()
-
Tell Room where to write the files, in the module's
build.gradle.kts. RoomEr works with Room 2.x and Room 3.x; the Gradle plugin and its block are named differently:Room Plugin ID Block 2.x androidx.roomroom { }3.x androidx.room3room3 { }plugins { id("androidx.room") // Room 3.x: id("androidx.room3") } room { // Room 3.x: room3 { schemaDirectory("$projectDir/schemas") }or, Room 2.x without the Room Gradle plugin:
ksp { arg("room.schemaLocation", "$projectDir/schemas") } -
Build the project. Room writes
schemas/<fully.qualified.DatabaseClass>/<version>.json. Per-variant folders, such asschemaDirectory("demoDebug", "$projectDir/schemas/demoDebug"), are found too; the database switcher then shows the variant next to the database name. -
Open View | Tool Windows | Room ER.
RoomEr scans the project for **/schemas/<databaseName>/<n>.json (and **/schemas/<variant>/<databaseName>/<n>.json) and shows the highest version of each
database. If your files live somewhere unusual, use Choose schema folder… in the tool window.
| Action | Mouse | Keyboard |
|---|---|---|
| Pan | drag the background, or middle-button drag | |
| Zoom | mouse wheel | + / -, 0 = fit to window |
| Select | click a table | arrow keys move between connected tables |
| Go to source | double-click, or context menu | Enter |
| Search | search box | / or Ctrl/Cmd+F |
| Clear search / leave focus mode | Esc |
|
| Move a table | drag it |
Relationship ends: the parent end is exactly one when every foreign-key column is NOT NULL, otherwise
zero or one. The child end is one when the foreign-key columns are the child's primary key or are covered
by a unique index, otherwise many.
- Android Studio: the latest two stable releases.
- Room 2.x and Room 3.x (
androidx.roomandandroidx.room3annotations for go to source). - Room schema JSON
formatVersion1, which both Room 2 and Room 3 write. Other versions are reported as unsupported instead of being guessed at.
Requires JDK 21 or newer.
./gradlew buildPlugin # plugin zip in build/distributions
./gradlew check # all tests, plus the build-enforced rules below
./gradlew runIde # sandbox IDE with the plugin
./gradlew verifyPlugin # JetBrains plugin verifier against the IDEs in `pluginVerifierIdes`
./gradlew :render:runDemo # the diagram canvas in a plain window, no IDE neededcheck also runs two rules from the acceptance criteria:
checkUiFreeModules:model,parser,layoutandexportmust not import Swing, AWT or IntelliJ classes.checkNoNetworkAccess: no HTTP client or telemetry library is bundled, and the plugin's code makes no network calls.
By default the build downloads the Android Studio release named in gradle.properties. To build against
an installed IDE instead, create local.properties with:
platformLocalPath=/Applications/Android Studio.app| Module | Contents | Depends on |
|---|---|---|
model |
Immutable schema model, cardinality inference, search | – |
parser |
Room JSON → model, typed errors | model |
layout |
LayoutEngine interface, ELK implementation |
– |
export |
Mermaid generator | model |
render |
Swing/Java2D canvas | model, layout |
| root | Discovery, tool window, navigation, persisted state | all of the above, IntelliJ Platform |
Only the root project depends on the IntelliJ Platform. The logic modules are plain Kotlin/JVM modules, so they cannot reference Swing-in-IDE or platform UI classes.
./gradlew runIdeScreenshots opens the demo project in samples/demo-music in a sandbox Android Studio, captures the
Marketplace screenshots (2880×1800) into build/screenshots/ and closes the IDE. The driver is a dev-only plugin in
tools/screenshots that never ships with RoomEr. Copy the results to docs/screenshots/ when they change.
- Set
versioningradle.propertiesand move the[Unreleased]notes inCHANGELOG.mdunder a## [x.y.z] - dateheading. That section becomes the change notes shown in Android Studio and on the Marketplace. - Commit, then tag and push:
git tag vx.y.z && git push origin main vx.y.z. - The
Releaseworkflow (.github/workflows/release.yml) tests and verifies the plugin, publishes it to JetBrains Marketplace (when thePUBLISH_TOKENsecret is set) and attaches the zip to a GitHub release. A version like0.1.0-eap.1goes to the Marketplaceeapchannel.
Signing is optional: set the CERTIFICATE_CHAIN, PRIVATE_KEY and PRIVATE_KEY_PASSWORD secrets to sign the
published zip. The very first Marketplace upload has to be done by hand on plugins.jetbrains.com.
| File | Contents |
|---|---|
docs/01-discovery-notes.md |
Decisions and their rationale, non-goals, risks |
docs/02-spec.md |
Functional and non-functional requirements |
docs/03-user-stories.md, docs/04-acceptance-criteria.md |
User stories and acceptance criteria |
docs/05-implementation-status.md |
Current status, toolchain, remaining work |
docs/06-learnings.md |
Lessons learned that are not obvious from the code |
docs/notes/*.md |
Per-module handover notes |
Apache-2.0, see LICENSE. Third-party components are listed in NOTICE.




