Visualize, modify, and build your database with dbSpy! An open-source data modeling tool to facilitate relational database development.

Overview

PRs Welcome Version GitHub Stars MIT License

logo 5

Visualize, modify, and build your database with dbSpy!

dbSpy is an open-source data modeling tool to facilitate relational database development.


Key Features

  1. Database Connection: Connect to a SQL database

  2. Database File Upload: Upload a database's SQL file

  3. ER Diagrams: Visualize the entity relationship diagram of a database

  4. Schema Modification: Modify a database's schema

  5. Database Building: Create a new database from scratch using entity relationship diagrams

  6. SQL Query Generator: Generate an executable SQL query with every modification to your schema

  7. Screenshot: Take a screenshot of the canvas with all your tables (BETA)

  8. Time Travel: Provides a history of edits for easier backtracking

  9. Exporting Queries: Allows updated changes of queries to be saved as a SQL file for client imports to their database

  10. Log Modeling: Provides a tool for admins to pull, view, modify, and export log settings from an existing database

  11. Compatible SQL Database: Current dbSpy is compatible with PostgreSQL and MySQL database

  12. Dark Mode Additional visual setting to provide a more comfortable viewing experience in low-light environements

  13. Database Integrity Assurance Database Logic Check is performed as the client edits the database to ensure the integrity of the database

  14. Visualizing Individual Table Connections Relationships of individual tables are now easily identified when clicking on a table.


Use Cases

Connecting to an existing database
    Renders an ER diagram of the existing database and provides an interface for users to both modify existing tables and create new tables. A log of changes is stored, and at any point, the user can execute a transaction containing the changes, such that they are reflected in the existing database.
Uploading your database's SQL file
    Renders an ER diagram for the provided SQL file (db dump) and provides an interface for a user to both modify existing tables and create new tables. Changes are converted into the corresponding queries, which the user can view and execute on their own database outside of dbSpy.
Exporting executable SQL query with every modification to your schema
    After modifying/editing the database schemas, users are now able to generate executable queries isolated from their database which decreases security concerns. Users are able to append all the query changes at the end of the new file and save this in their local machines.
Logging modeling
    After connnection to the database is made the user can view, modify and save the current log settings. This will assist database administrators in keeping efficient log setup in mind during the early stages of DB modeling
Seamlessly visualize relational database
    After connecting database tables with one another, users are able to render the relationship connections of individual tables by clicking on the tables.
Starting an ER diagram from scratch
    Provides a canvas for users to create a database by using ER diagrams, thus creating a blueprint for engineering database structures.

How to Use

Connecting to an existing database

  1. Locate and click on the "Connect Database" button under the Action section on the left side of the page. This will open a sidebar on the right side of the page.
  2. Input your Postgres database URI information and click on "Connect". It may take a couple of seconds to connect to your database.
  3. Once the connection to your database is established, the page will populate with the tables in your database and the relationships between your tables.
  4. Each table is editable. Editing the tables does not automatically change the schema of your database.
  5. Every change you make will generate an executable SQL query. After you are done making all your changes, click on the "Execute changes" button to make those changes to your database.

dbSpy_connectToDB

dbSpy_makeAndExecuteChanges

Uploading your database's SQL file

  1. Locate and click on the "Upload SQL File" button under the Action section on the left side of the page. This will open a window for you to select the SQL file you wish to upload. It may take a couple of seconds to upload the file.
  2. Once the file uploads, the page will populate with the tables in your database and the relationships between your tables.
  3. Each table is editable. Editing the tables does not automatically change the schema of your database.
  4. You'll notice that after making a change to a table, a SQL query will be generated in the SQL Queries section of the page. These queries are generated for you to be able to execute the changes on your own database.

dbSpy_uploadSQLFile

Starting an ER diagram from scratch

  1. Locate and click on the "Build Database" button under the Action section on the left side of the page. This will open a window for you to create and name a table.
  2. The table will then be rendered on the page. You will then be able to edit the table and add the columns that you wish to this table.
  3. You'll notice that after making a change to the table, a SQL query will be generated in the SQL Queries section of the page. These queries are generated for you to be able to create the database that you just designed.

dbSpy_buildDatabase


How to contribute

Below is a list of features and improvements to which you can contribute. If you have any additional ideas, please raise the issue or implement them as well!

  • Screenshot feature - The screenshot feature does presently capture the tables but the arrows do not align correctly in the screenshot. It would be best if the features captures everything as it is rendered on the canvas.
  • Front-End Optimization - Sprite sheet does not render in browser.
  • Connecting to elephant SQL database - When connecting to elephant SQL to grab the data from the database, it takes a really long time to load (approximately 2 minutes), optimize the backend so pulling and parsing data doesn't take as long.
  • Logging needs a default settings list and direct reimport into live database. The SQL code to import has been placed into the DB_Schemas folder along with SQL Schema dumps. Also, log setting functionality is currently limited to Postgres databases and the code needs to be expanded to query and display log setting info from MySQL databases
  • Security setting models need to be put in place for database tables as well as log files.
  • Db-schemas - the schemas are saved under db_schemas and is saved in the server. Have a way to delete the schemas on the server from the front end. It would also be convenient to add these schemas to a list of existing schemas and be able to pull these schemas to display for the user to avoid having to make a new connection to the same database multiple times.
  • MySQL database connection - the connection feature currently is not compatible with MySQL database. During development phase, a MySQL database stored at the Google Cloud is used for testing. An authorization issue with Google is met when performing data dump. Suggests to try other MySQL server for development testing.
  • Expand compatibility with other SQL database such as Oracle SQL, Microsoft SQL, IBM Db2, etc -Scrollable Canvas - Able to edit tables and scroll on the right side of the canvas, scrolling does not work on the left side of the canvas. If tables are populated or pushed outside of the canvas on the left side, that table disappears, need to enable scrolling on left side.
  • Testing - The current result of the supertest could vary based on which mode it is tested on, development or production. When tested in development mode (commented out line 83-84 in server.js), the supertest result would pass with the expected content-type "text, html" returned from the server. However, when the supertest is tested in the production mode, it would fail with 404 Error.
    • The current unit test will fail due to ES module error. Have tried to reconfigure webpack by declaring "module: type", rebuild jest configure file...
  • Refactoring - We need help refactoring the codebase according to the Airbnb style guide.
  • Refactoring typescript - Right now, there are an abundance of any's in the types.

Getting started

  • Fork and clone this repo
  • Add a .env file to the root directory
  • Go to the Google Cloud Platform Console
  • Set up OAuth 2.0 credentials as laid out here
  • Populate the .env file with the newly created:
CLIENT_ID = "client-id-goes-here"
CLIENT_SECRET = "client-secret-goes-here"
CALLBACK= http://localhost:8080/google/callback
TEAM_SECRET = "team-secret-goes-here"
  • Install the dependencies:
$ npm install
  • Run the project in development mode:
$ npm run dev
  • Make changes with comments
  • Add appropriate tests and ensure they pass
  • Commit your changes and make a pull request

Request a feature

  • Submit an appropriately tagged GitHub issue
  • Submit your request here

Credits/Contributors


License

  • dbSpy is developed under the MIT license.
Comments
  • Add table UI

    Add table UI

    Change Details

    • Decoupled flowStore, schemaStore, and components handling user input.
    • Added default column recommendations.
    • Added typing

    Next on the list for UI overhaul:

    • Foreign key functionality
    • Styling of input components
    opened by neighbor-peace 1
  • Row refactor

    Row refactor

    opened by neighbor-peace 1
  • 4.0 updates

    4.0 updates

    opened by geistnine 0
  • Brett dark mode

    Brett dark mode

    One bug left with dark mode coloring. When in DM clicking the Add Table button leaves the padding around the button visibly white while putting in the new table name.

    Can probably fix this later with adjustment to button:action in css but it's not critical

    Also, we can adjust the color scheme later if people want.

    All (jk, most. some random thing are hard coded with mantine) colors are now set as variables at the top of the .css file for easy changups

    opened by BrettGuidryDev 0
  • Add null check on TableName and Constraint Name on Dump Parse

    Add null check on TableName and Constraint Name on Dump Parse

    • Added check for null set on Table name and Constraint Name on DB Dump parse for tables with no constraint given with controller. Previously, this scenario would result in parse function caught processing table with missing constraint and/or table name.
    opened by engineerous 0
  • Resolved login issue in dev environment

    Resolved login issue in dev environment

    • Issue: Recent commits rendered the logins in dev environment nonfunctional.

    • Resolution: Ensured proper paths and routes are used when in dev enviroment

    opened by MockTech 0
Releases(v4.0)
  • v4.0(Dec 15, 2022)

    This version includes easy to use features such as undo/redo, query generation, and overall improved UI to enhance user workflow.

    What's new?

    On the surface

    • Improved user sign up/login
    • User database saving + reloading
    • Dynamic handle placements on table relationships
    • Added MySQL remote connections
    • Streamlined table/column creation
    • Undo/redo functionality
    • Query generation + export

    Under the Hood

    • Improved testing coverage
    • Increased reusability of SQL parser
    • Refactored state management to better utilize Zustand hooks and stores
    • Repaired page routing bugs
    • Configured SSL for mySQL remote connections
    res.sendFile(path.join(__dirname, '../../dist/index.html'));
    

    New Contributors

    Source code(tar.gz)
    Source code(zip)
Owner
OSLabs
OSLabs
This web application retrieves real live data from the Financial modeling prep API

This web application retrieves real live data from the Financial modeling prep API. It provides financial information about companies listed on Nasdaq 100 and Dow Jones Market indexes. All these companies are listed on the Home page. Users can filter these companies by searching for a specific company or by choosing one from the dropdown.

Sahar Abdel Samad 7 May 31, 2022
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
A hackable C# based scripting environment for 3D modeling running in the web browser.

A hackable C# based scripting environment for 3D modeling running in the web browser. Background Script based 3D modeling software running in the web

Emil Poulsen 49 Nov 28, 2022
A tool to modify onnx models in a visualization fashion, based on Netron and flask.

English | 简体中文 Introduction To edit an ONNX model, One common way is to visualize the model graph, and edit it using ONNX Python API. This works fine.

Zhang Ge 413 Jan 4, 2023
A Kubernetes monitoring tool to visualize large-scale activity and real-time comprehensive metrics within your cluster.

Armada A light-weight Kubernetes health monitoring tool. Summary Armada is an open-source tool for monitoring the health of your Kubernetes cluster. I

OSLabs Beta 81 Nov 2, 2022
ClickCat is a firendly user interface that lets you search,explore and visualize your ClickHouse Data.

ClickCat is a firendly user interface that lets you search,explore and visualize your ClickHouse Data. We provides the following features,you can acce

海博科技 34 Dec 13, 2022
🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

?? search-buddy search-buddy is an open‑source ultra lightweight javascript plugin (* <1kb). It can help you create instant search and/or facilitate n

Michael 4 Jun 16, 2022
🍉 Water is a micro-ORM + QueryBuilder designed to facilitate queries and operations on PostgreSQL databases designed to work in Melon

?? Water Water is a micro-ORM + QueryBuilder designed to facilitate queries and operations on PostgreSQL databases designed to work in MelonRuntime In

Melon Runtime 22 Aug 6, 2022
App that leverages GPT-3 to facilitate new language listening and speaking practice.

Talk w/GPT-3 app: Getting started The Talk w/GPT-3 application was developed by James L. Weaver (the author of this document) to get more new language

James Weaver 47 Jan 1, 2023
A lightweight (<1Kb) JavaScript package to facilitate a11y-compliant tabbed interfaces

A11y Tabs A lightweight (<1Kb) JavaScript package to facilitate a11y-compliant tabbed interfaces. Documentation ↗ Demo on Codepen ↗ Features: Support

null 5 Nov 20, 2022
Some of the utilities I made to facilitate me while using PhysicsWallah's website.

PWUtils Some of the utilities I made to facilitate me while using PhysicsWallah's website. Documentation Dark Mode KeyConVP PWRpc Downloader Dark Mode

Rudransh Joshi 9 Dec 31, 2022
JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

Aykut Saraç 20.6k Jan 4, 2023
This project will be a basic website that allows users to add/remove books from a list. The main objective is to understand how to use JavaScript objects and arrays and dynamically modify the DOM and add basic events.

Awesome-books Awesome Books This project will be a basic website that allows users to add/remove books from a list. This project is part of the Microv

Aleksandra Ujvari 10 Oct 3, 2022
The Trino datasource allows to query and visualize Trino data from within Grafana.

Trino Grafana Data Source Plugin The Trino datasource allows to query and visualize Trino data from within Grafana. Getting started Drop this into Gra

Starburst 13 Nov 3, 2022
A simple to do list webpage where you can log the daily tasks you have to do, mark them as checked, modify them, reorder them and remove them. Made using HTML, CSS and JavaScript.

To-Do-List This Webpage is for an app called To-Do-List which helps you add, remove or check tasks you have to do. It is a simple web page which conta

Zeeshan Haider 9 Mar 12, 2022
Codism is a Codepen inspired coding playgound that lets you add and modify HTML, CSS and JavaScript

Codism Codism is a Codepen inspired coding playgound that lets you add and modify HTML, CSS and JavaScript to create in order to create cool stuff! Yo

Muhammad Hasnain 5 Nov 24, 2022
An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve and modify the bot state, respectively.

CQRS Wechaty An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve

Wechaty 3 Mar 23, 2022
A simple task manager that allows that allows users to add, remove and modify tasks from a list.

TO-DO LIST TO-DO LIST is a basic app that allows users to add/remove task from a to-do list. Built With HTML, CSS, JavaScript, Live Demo Live Demo Lin

Shingirai Bhengesa 3 May 3, 2022
To Do list is a small but useful project to make list app , you can add tasks delete tasks and modify tasks, the project built using HTML, CSS, JavaScript

Project Name The To-Do-List app description this is a project in the second week of the second module in microverse. its a useful to do list that save

Alzubair Alqaraghuli 5 Jul 25, 2022