8000 GitHub - aferryc/darube: Yet another software engineering tools · GitHub
[go: up one dir, main page]

Skip to content
aferrycPublic

About

Yet another software engineering tools

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Darube

Darube is a one-stop backend tool for developers. It brings SQL databases, NoSQL stores, API testing, and scripting into a single desktop app so you can connect, query, automate, and inspect data without juggling multiple tools.

Highlights

962B
image
  • SQL connections: PostgreSQL, MySQL/MariaDB, SQL Server, SQLite, Oracle
  • NoSQL connections: Redis, MongoDB, Cassandra, Elasticsearch, OpenSearch
  • API testing: HTTP and gRPC
  • Scripting: run JavaScript (goja) across multiple connections
  • Query tabs: multiple tabs per connection with autosaved workspace
  • Schema explorer: databases, schemas, tables, columns, indexes
  • Export: CSV / JSON / Excel for SQL and Redis results
  • Folders: organize connections with drag-and-drop

How It Works

Darube is an Electron + React app backed by a local Go engine.

  • The Electron main process starts the Go engine on a free local port.
  • The UI talks to the engine over HTTP using that port.
  • The engine persists connection configs and workspace state locally.

Development

Prereqs

  • Node.js + npm
  • Go (engine)

Common Commands

# Start dev (Vite + Electron)
make dev

# Build the Go engine binary (required by Electron)
make build-engine

# Package the full app (engine + Vite + electron-builder)
make build

# Package for Apple Silicon macOS (ARM64 engine and Electron app)
make build-mac-arm64

# Package for Windows
make build-win

# Package for Linux
make build-linux

# Run tests
make test

Notes

  • If you change Go engine code, rebuild the engine binary and restart the Electron app:
    • make build-engine
  • Workspace persistence:
    • Query tabs are autosaved to workspace.json.
    • Tabs are bound to a connection. Clicking another connection switches to its existing tabs; if none exist, Darube prompts to create a new tab or rebind the current tab.

GitHub Actions

The Test and build workflow runs on pushes, pull requests, and manual dispatches. It runs the frontend and Go test suites, then packages the app for Intel macOS (make build), Apple Silicon macOS (make build-mac-arm64), Windows (make build-win), and Linux (make build-linux) on native runners. Packaging starts only after both test suites pass. The two macOS architectures are uploaded as separate artifacts.

Download the platform packages from the workflow run's Artifacts section. Artifacts are kept for 14 days. CI builds are unsigned and use --publish never.

Scripting

Darube scripts run JavaScript using goja inside the local Go engine. Scripts are synchronous and interact only via a small wrapper API.

API

const pg = db.conn("prod-postgres"); // id (or unique connection name)
const redis = db.conn("cache"); // id (or unique connection name)

const users = pg.query("SELECT id FROM users");
for (const u of users) {
  redis.set(`user:${u.id}`, "active");
}

sleep(250); // or utils.sleep(250)
console.log(utils.uuidv7(), utils.now(), utils.nowUnixMs());

Connection methods:

  • SQL: query(sql) -> []object, exec(sql) -> number, one(sql) -> object, scalar(sql) -> primitive
  • Redis: set(key, value), get(key), del(key)
  • HTTP: get(url) -> string, post(url, body) -> string, put(url, body) -> string, delete(url) -> string
  • gRPC: call(service, method, body) -> interface

Utilities:

  • sleep(ms) / utils.sleep(ms)
  • utils.uuidv7() -> string
  • utils.now() -> string (RFC3339)
  • utils.nowUnixMs() -> number

About

Yet another software engineering tools

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0