DEV Community

Cover image for Snacks@console Intuitive browser-based SQL Console
Mazen Touati
Mazen Touati

Posted on • Edited on

Snacks@console Intuitive browser-based SQL Console

Hey, folks

Recently I kept myself busy creating an opensource project called "Snacks Project". Which is an intuitive database toolkit to make the database management process faster and happier.

Today, I'm going to share with you the first module of this project. Which is a browser-based console to run and save SQL queries.

GitHub logo sunchayn / snacks-console

An intuitive browser-based SQL console to run and save SQL queries.

mazentouati/snacks-console

GitHub (pre-)release Scrutinizer Code Quality StyleCI Software License

An intuitive browser-based SQL console to run and save SQL queries.

demo

Usage guideline

Snacks@console is a PHP based application. Before you use it, you have to make sure that your system is ready to run PHP applications. All web server such as Laragon (recommended) or XAMPP provide bundle all the requirement to run a PHP based application in one package.

After you setup your webserver. Open the command line inside the web server's root directory, usally www, and follow along the installation process

through composer

we recommend installing this package through composer :

composer create-project mazentouati/snacks-console "console"
Enter fullscreen mode Exit fullscreen mode

Note: make sure that your web server enables the RewriteEngine.

Plans

This is an initial version, it's just a prototype to test and enhance the current experience. We plan to add the following features :

Enhance queries support

currently the console supports the following commands:

  • Select
  • Update
  • Delete
  • Insert

Features

  • currently the console supports the following commands: ( Select, Update, Delete, Insert, Use database)
  • bookmark favorite queries
  • built-in terminal commands
  • neat table representation for select queries

Usage guideline

Snacks@console is a PHP based application. Before you use it, you have to make sure that your system is ready to run PHP applications. All web server such as Laragon (recommended) or XAMPP provide all the requirement to run a PHP based application in one package.

After you setup your webserver. Open the command line inside the web server's root directory, usally www, and follow along the installation process

through composer

I recommend installing this package through composer :

composer create-project mazentouati/snacks-console "_folder_name"
Enter fullscreen mode Exit fullscreen mode

Note: make sure that your web server enables the RewriteEngine.

then access your "_folder_name" folder via your browser and the initial setup will popup to set your database credentials, then redirect you to the console interface.

Future

I plan to enhance the current experience as the current version is somehow a prototype to study the users feed backs and suggestion. Though, i'm going to add the following features :

Extended command support

Theoretically, it can execute any SQL command but I plan to make the experience of DDL ( data definition language ) like Create or Alter more accessible by supporting interactive inserting in the console.

Add syntax highlight

Additionally, I plan to add syntax highlight for the SQL commands

Enhance the manipulation of the fetched data

Currently, the data shown when using select command isn't interactive. I plan to make the table re-sizable, the cells clickable ( shows full column's data when click ) and whatever required to make it more interactive.

Documentation

Unfortunately, I'm overwhelmed by Snacks project and it's sub-projects. I'll incrementally add the documentation, tests for both the source code and the application.

I'm really thrilled to hear your suggestions and thoughts.

peace.

Top comments (1)

Collapse
 
ninjazmy profile image
NinjaZMY

keep up the good work :))