Giter Site home page Giter Site logo

bar_back's Introduction

BarBack

BarBack logo: Martini glass with Bs on its side displayed as a neon sign

Gif showing some screens

BarBack is the Rails console you can share with non technical people. It's a Rails engine that enables you to (with HTTP basic authentication):

  • execute an ActiveRecord or SQL read query;
  • save an ActiveRecord or SQL read query for later;
  • view the query result and update, create, or delete records;
  • share the query result with anybody via a link that contains a random UUID;
  • export the query result to CSV.

Installation

Add this line to your application's Gemfile:

gem 'bar_back'

And then execute:

$ bundle
$ bin/rails generator bar_back:install

Usage

Mounted Path

BarBack by default is mounted at /bar_back in config/routes.rb:

mount BarBack::Engine => "/bar_back"

HTTP Basic Authentication

HTTP basic authentication is enabled by default in config/initializers/bar_back.rb:

BarBack.http_basic_enabled = true
BarBack.http_basic_username = "#{SecureRandom.alphanumeric(10)}"
BarBack.http_basic_password = "#{SecureRandom.alphanumeric(10)}"

Tests

$ bin/rails test test/

Contributing

Contributions are more than welcome, but I'd love to keep BarBack simple and bullshit free.

Please let's discuss in an issue before submitting a pull request.

License

The gem is available as open source under the terms of the MIT License.

bar_back's People

Contributors

3v0k4 avatar

Stargazers

 avatar

Watchers

 avatar

bar_back's Issues

Ideas for the future

  • Make the user specify if the query is SQL or ActiveRecord with radio buttons to simplify code
  • More robust parsing (especially SQL) by parsing into an AST or using a gem
  • Autocomplete table names, columns, etc. in the textarea
  • Pagination

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.