DEV Community

sao-coding
sao-coding

Posted on

Locus: A Lightweight, Native Database Client Built with Rust and GPUI

Locus

If you work with databases on Windows regularly, you probably know the struggle.

I've used tools like DBeaver for a long time, but I've always felt they were a bit too heavy for everyday use. Slow startup times, high memory consumption, and UI freezes when dealing with hundreds of thousands of rows can get frustrating.

And don't even get me started on setting up Oracle Client just to connect to an Oracle database.

Eventually, I decided to build something of my own.

Meet Locus — an open-source desktop database client built with Rust and Zed's GPUI framework.

The core features are already working, and I'd like to share some of the key design decisions behind the project.

  1. Space-based Environment Isolation, Inspired by Arc Browser One of the biggest pain points when working with multiple databases is switching between Dev, Staging, and Production environments.

It's surprisingly easy to lose track of which environment you're currently working in — and one wrong click can cause serious trouble.

Locus introduces a Space-based workflow inspired by Arc Browser.

Each environment gets its own color-coded Space.
Connections and tabs are organized within their respective Spaces.
Use Ctrl + 1~9 to switch between Spaces instantly.
The goal is simple: make it visually obvious which environment you're working in and reduce the risk of accidentally modifying the wrong database.

  1. Production Safety: Read-Only by Default Production databases deserve extra protection.

Any connection marked as Production is automatically placed in strict read-only mode by default.

If you really need to execute write operations or modify data, you must:

Manually unlock write access.
Set a time-limited unlock period.
Confirm write operations individually.
On top of that, Locus automatically records a complete Audit Log of these operations.

The idea is to add an extra layer of protection against accidental changes to production data.

  1. Native Multi-Database Support & Streaming Queries Locus currently supports:

MySQL / MariaDB
PostgreSQL
SQLite
Redis
SQL Server
Oracle
Oracle connectivity is built in, so there's no need to install a separate Oracle Client.

Another important design decision is streaming query results.

Instead of waiting for the entire result set to load before displaying anything, Locus streams results as they arrive from the database.

This makes working with large datasets much more responsive.

Query cancellation is also handled properly: when you cancel a query, Locus sends a cancellation request to the database server instead of merely stopping the frontend UI from waiting.

  1. Security & Open Source A few more things worth mentioning:

Rust-powered: Built with Rust and Zed's GPUI framework.
Secure credential storage: Database passwords are stored using the native Windows Credential Manager, never in plaintext.
Open source: Licensed under AGPL-3.0.
What's Next?
Locus is still under active development, and there's plenty of room for improvement.

If you're also frustrated with heavyweight database clients and want something lighter and more responsive, I'd love for you to give it a try.

GitHub: https://github.com/sao-coding/locus

Feedback, bug reports, and feature suggestions are always welcome! Feel free to leave a comment below or open an Issue on GitHub.

And if you find Locus useful, a GitHub Star would mean a lot. ⭐

Thanks for checking it out!

Top comments (1)

Collapse
 
userxnom profile image
Abdullah Naseer •

The Spaces idea is the part I would steal first — not the color coding itself, but the fact that the environment is visible before you type anything. One wrong connection in a heavyweight client is exactly how production data gets changed by accident, and a color-coded Space makes the check happen before the query, not after.

Production read-only by default, with a time-limited unlock and an audit log, is the right shape for that problem too: it does not stop a deliberate write, it stops the write you did not mean to make, and the log tells you what actually happened if it did.

Streaming results with proper cancellation is the other detail that matters for real work — waiting for a whole result set before seeing anything is where the heavy clients feel heaviest. Built-in Oracle support without a separate Oracle Client is a real pain removed, too.

One question: when a Production Space is unlocked, does the color coding or the tab change in a way that stays obvious while you are working, or does it go back to looking like any other Space once the unlock is on?