Giter Site home page Giter Site logo

clidey / whodb Goto Github PK

View Code? Open in Web Editor NEW
800.0 3.0 19.0 9.35 MB

A lightweight next-gen data explorer - Postgres, MySQL, SQLite, MongoDB, Redis, MariaDB & Elastic Search with Chat interface

Home Page: https://whodb.clidey.com

License: GNU General Public License v3.0

Go 33.51% HTML 0.46% TypeScript 65.31% CSS 0.47% JavaScript 0.05% Dockerfile 0.16% Shell 0.04%
database explorer lightweight mongodb mysql postgresql sqlite3 redis mariadb elasticsearch

whodb's Introduction

WhoDB

Build Status:   Clidey build status

"Is it magic? Is it sorcery? No, it's just WhoDB!"

Trailer

View screenshots of WhoDB View of the Album table Edit view pop-up Export and delete buttons in action The scratchpad functionality All available tables in the current database

Table of Contents

  1. Description
  2. Key Features
  3. Demo
  4. Documentation
  5. Quick Start
  6. Development Setup
  7. Frontend
  8. Backend
  9. FAQs
  10. Contributing
  11. Infrastrucutre
  12. Contact details

Description

WhoDB is a lightweight (~20MB), powerful, and user-friendly database management tool designed to streamline your database administration tasks. Combining the simplicity of Adminer with enhanced UX and performance, WhoDB is built with GoLang to deliver optimal speed and efficiency. With features like interactive schema visualization and inline editing, WhoDB caters to both small projects and complex enterprise systems.

WhoDB offers you the opportunity to talk to your data using natural language thanks to our integration with Ollama, ChatGPT, and Anthropic. This feature allows you to perform queries and manage your data through conversation instead of complex SQL.

Key Features

  • Conversate With Your Data: No more wasting time crafting complex SQL queries - ask away!
  • Enhanced UX: A clean, intuitive interface that’s easy to navigate.
  • Blazing Fast Performance: Built with GoLang for exceptional speed, including table virtualization on the frontend.
  • Schema Visualization: Interactive graphs to easily visualize your database schema.
  • Inline Editing & Preview: Edit and preview data directly in the interface.
  • Broad Database Support: Compatible with PostgreSQL, MySQL, SQLite3, MongoDB, Redis, MariaDB, & ElasticSearch.
  • Scratchpad: A Jupyter notebook-like interface for performing database queries.

Try the demo

Experience WhoDB firsthand with our live demo.
Note: This demo is populated with a sample database from postgresDBSamples, with credentials pre-filled.

Or checkout our demo video

Documentation

For more detailed information, check out our Documentation.

Quick Start

Get up and running with WhoDB quickly using Docker:

docker run -it -p 8080:8080 clidey/whodb

Or, use Docker Compose:

version: "3.8"
services:
  whodb:
    image: clidey/whodb
    # volumes: # (optional for sqlite) 
    #   - ./sample.db:/db/sample.db
    ports:
      - "8080:8080"

Access WhoDB by navigating to http://localhost:8080 in your browser.

Development Setup

Prerequisites

  • GoLang (latest version recommended)
  • PNPM (latest version recommended)

Frontend Setup

To start the frontend service, navigate to the frontend/ directory and run:

pnpm i && pnpm start

Backend Setup

1. Preparing the Frontend for the Backend (Only if you don’t have a build/ directory in core/):

If the core/ directory doesn't have a build/ folder, you'll need to build the frontend and move it to the backend directory. From the root directory, run:

cd frontend && pnpm install && pnpm run build && rm -rf ../core/build/ && cp -r ./build ../core/ && cd -;

This command will compile the frontend and copy the build/ folder to core/. This step is required because Go will attempt to embed the build/ folder on each launch. You only need to do this once.

2. Setting up Ollama (if you'd like to enable the natural conversation integration)

Go to https://ollama.com/ and download it for your system. Once that is done, we recommend that you start out with the Llama 3.1 8b model. WhoDB will automatically detect your installed model(s) and will show you a Chat option on the left sidebar.

3. Starting the Backend Service

If the core/ directory already has a build/ folder, or once you've completed the step above, you can start the backend service by running:

cd core/
go run .

FAQs

What inspired the creation of WhoDB?
WhoDB was inspired by Adminer for its lightweight nature and ease of use. We aimed to build on these qualities with enhanced visualization and a consistent user experience across various databases.

How does WhoDB handle large queries?
WhoDB supports lazy loading, ensuring smooth performance even with large datasets.

What makes WhoDB different from DBeaver?
Unlike DBeaver, which is feature-rich but resource-heavy, WhoDB is designed to be lightweight and efficient, running on minimal resources—perfect for smaller setups or resource-constrained environments.

Is WhoDB compatible with any database? WhoDB supports a wide range of databases, providing a consistent experience across SQL, NoSQL, and Graph databases. Currently, it supports PostgreSQL, MySQL, SQLite3, MongoDB, Redis, MariaDB, & ElasticSearch.

How do I deploy WhoDB? WhoDB can be deployed easily using Docker or Docker Compose. See the "Quick Start" section for details.

Q: Is WhoDB suitable for production environments?
While WhoDB is lightweight and efficient, we recommend evaluating its suitability for your specific production environment.

Contributing

We welcome contributions from the community! Feel free to open issues or submit pull requests to help improve WhoDB. We have a contribution guide here.

Infrastrucutre

WhoDB's deployment and CI/CD are managed by Clidey, a no-code DevOps platform. For more information, visit https://clidey.com

Clidey Build Status:   Clidey build status

Contact

For any inquiries or support, please reach out to [email protected].

"Is it magic? Is it sorcery? No, it's just WhoDB!"

whodb's People

Contributors

dependabot[bot] avatar hkdeman avatar modelorona avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

whodb's Issues

PostgreSQL update query breaks when table name is in a format like AdminId

Hi there, I was playing around and found an issue where if I try to update a cell, it breaks with the error:

keeps failing that a column doesn't exist when it looks like it does

I looked a bit through the code and I believe this is the culprit

dbConditions = dbConditions.Where(fmt.Sprintf("%s = ?", key), value)

image

It looks like it should instead be:

dbConditions = dbConditions.Where(fmt.Sprintf("\"%s\" = ?", key), value)

so that the column name is surrounded by quotes as well to accommodate.

I didn't have time to fully test but after making this change locally, it was working.

I did not check for the other SQL databases but if they're doing something similar, I imagine a similar issue will exist.

[BUG] mysql connection use "mysql" db by default

Hello,

Thanks to the docker ENV that works as expected!

If we apply this env (or even if submit via the form):
WHODB_MYSQL_1: "{"host":"mysql","user":"user","database":"test"}"

Once connected, it's the "mysql" schema that is opened instead "test" db like specified in the conf.

Best regards,

docker image issue

I Follow docker installation docker run -it -p 8080:8080 clidey/whodb I did also tried with latest tag my docker ps log 68fac9b18d06 clidey/whodb "/core" About a minute ago Exited (2) 13 seconds ago cranky_shockley
72db39c4cdcc clidey/whodb:latest "/core" 24 hours ago Exited (2) 24 hours ago vigorous_galois

I am running ubuntu 22.04

Required DB names

Hi,
Would it be possible to NOT require a DB name when connecting to MySQL/Postgres with credentials that can access several databases and just let the user pick the one to use after connecting? This would go a long way for me to use as Adminer replacement.
Thanks for considering it!

Deprecate us of abadoned dependency babel-preset-react-app

yarn run v1.22.19
$ GENERATE_SOURCEMAP=false react-scripts build
Creating an optimized production build...
One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.

babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will
ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
your devDependencies to work around this error. This will make this message
go away.

[FR] Custom port for db connection

Login form only asks for the 'hostname' of the connection endpoint. This limits the capability of the app.

For example if someone wants to wants to connect to a Mysql database on host 0.0.0.0 the program assumes it is on 0.0.0.0:3306

[FR] Persist configs

Hey there, first of all, great work! Really a nice tool and helpful to look into all my databases on my server without doing anything other than giving credentials.

One thing I'm worried about now is that if I close my browser or better said one day delete cookies etc. I lose all the databases I have set up. I saw that you allow to define configs in the environment variable. Still, I'm not sure how much I like it to have all of my database credentials in the environment variable of the container. The security aspect is critical.

So can we save it somewhere as a config file on the filesystem?

How do you save the configs in the browser? Is it a cookie or local storage?

Can it replace phpmyadmin for prod envs

I'm trying to install a DB GUI tool for my prod envs so I do not access using remote access
Can I use whodb for that purpose??
Usage for basic example (import/export) (backup if wanted using mysqldump)
Did you try it before?

[FR] Clickhouse Support

Feature requested for supporting clickhouse. The integration is said to be simple as it is SQL compliant.

Could not capture the image

Hi, using the graph function to capture image works when there are few tables (although the quality of the screenshot makes it kinda unusable) but the function stops functionning at all when using a bigger schema.

image

image

[FR] Screenshot of the graph

Feature requested

  • Ability to screenshot the graph such it can be shared!
  • Print option is also an alternative.

[FR] Connect to MongoDB via Connection String (URI)

Sometimes it even faster and easier to connect to MongoDB via using Connection String (URI) like on image below.
image

P.S.: It's also would be great to implement all connection settings allowed by Mongo Compass.

[FR] Adding memcached support

Hello,

Not a small feature/priority imo request but can be interesting to manage memcached (slabs) also

Thank you for this project that seems really promising!

[FR] Add support for Openai-like API's

Hi ! I have a little enhancement suggestion for Houdini; Houdini already has support for chat-gpt, but today, a lot of AI services online provide "openai-like API's", basically apis almost identical to openai's one, but it points to another service (example : Groq with "https://api.groq.com/openai/v1") what would be great is to add a field (in the same place as the token field) but instead of asking for the token, it asks for the api endpoint.

[FR] Support for inline table editing - similar to Prisma Studio

Rather than having to write SQL to edit my tables, I'd like to be able to edit the tables inline.

I'm coming from Prisma Studio so that should give you an idea of the experience there, which is overall very good.

One major issue I had with Prisma Studio though is that it doesn't seem to support adding new lines for String columns when editing inline :((

Also doesn't support a markdown editor, because sometimes I store MD in my String columns

[FR] Allow to configure creds/servers in docker env

Hello,

In the dev/ example, we have a docker compose that contain few creds to spawn some services for tests. (mysql, etc)

What can be interesting is to allow to set the creds directly in docker env (so instead to set creds in url or type it manually, reconfigure it on docker level)

Some ideas (standalone instance):
Ex: WHODB_MYSQL_HOST, etc
or something like for multi instance: WHODB_MYSQL='{instance1={"host"="host","user"="root"}}'
WHODB_MONGO='{instance={"host"="host","auth"=false}'

[BUG] Mongodb - unable to connect to mongo without user

Hello,

I just init a "fake" cluster of mongodb:

  mongo:
    image: mongo:7.0
    command: ["--replSet", "rs0", "--bind_ip_all"]
    healthcheck:
      test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongo:27017'}]}) }" | mongosh --quiet
      interval: 5s
      timeout: 30s
      start_period: 0s
      start_interval: 1s
      retries: 30
    restart: always

Due to the fact it's dev/playground, there is no credential at all.

If I try to connect to it via mongo-express and url: mongodb://mongo:27017/?ssl=false, all ok.

If I try via whodb, it didn't works, seems the user is mandatory:
image

Best regards,

Ability to change Redis database

It would be really valuable to have the ability to change between the different Redis databases. This could use the same UX as the SQL databases, with the dropdown below the Profile dropdown.

Views Total Count and Size

Hi, three closely related issues :

  • on the storage-unit page, Total Size is 0 bytes, it's a View so this information should probably not be displayed at all
  • on the storage-unit/explore page, The Total Count display as unknown when the Table is a View,
  • on the storage-unit/explore page, no pagination occurs when the Table is a View

[FR] Adding env to customize the base path

Hello,

At this time, whodb use the root path "/". Do you think it's possible to personalize that?

The idea is to simplify the workflow when we have a single hostname to be able to reverse proxy each path of each app to his own application.

Best regards,

local hostname?

Whenever i try to connect to my local mariadb server, I get the following error

2024/09/04 06:39:18 /app/src/plugins/mysql/db.go:18
[error] failed to initialize database, got error dial tcp: lookup keinvanity on 192.168.1.1:53: no such host
2024/09/04 06:39:18 [4b7cfb109319/Y7H6E3cmdf-000007] "POST http://0.0.0.0:8080/api/query HTTP/1.1" from 172.17.0.1:50146 - 200 68B in 10.037262311s

Cached/old value showing after an inline edit?

If I use the inline editor to change a value it will show the popup that it successfully changed the value however the table still shows the old value. Even if I navigate away and back to the same table the old value still appears.

A manual query is needed to see the updated value.

[FR] Filters based on the table

Rather than having to write a WHERE SQL filter, I'd like to just have some UI to create simple filters based on the table I am viewing.

Prisma Studio has something like that:

image

How tu run whodb with Ollama as a Docker container?

I have Ollama running as a Docker container with the default config and port. whodb does not detect it and there is no option to tell it where it has to look. Is there anything I can do or does it need to be implemented? Of course, I run whodb as a Docker container as well. Both containers run on the same Docker network.

[FR] Scratchpad like experience in Raw Execute

Feature Requested

In order to make the Raw Execute section powerful, it would be great to have a Jupyter notebook like experience.

Solution:

  • Renaming "Raw Execute" to Scratch and creating a Jupyter notebook like experience where users can continue making arbitrary query.
  • The data will not be persisted and tables will be using the same high performance component.

Clicking on the Explore hyperlink in the breadcrumb menu gives a white page

broken_breadcrumb_link

main.c0ac5221.js:2  Uncaught TypeError: Cannot read properties of undefined (reading 'Name')
    at ahe (main.c0ac5221.js:2:5582158)
    at ms (main.c0ac5221.js:2:2627640)
    at xa (main.c0ac5221.js:2:2641866)
    at Sl (main.c0ac5221.js:2:2688174)
    at bc (main.c0ac5221.js:2:2676397)
    at vc (main.c0ac5221.js:2:2676325)
    at mc (main.c0ac5221.js:2:2676188)
    at rc (main.c0ac5221.js:2:2672968)
    at lc (main.c0ac5221.js:2:2673359)
    at zo (main.c0ac5221.js:2:2613951)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.