Skip to content

HouptLab/BarTab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

BarTab

A web interface to the online database of BarTender. The BarTender-System presupposes that a Google Firebase database has been set up. The Mac app BarTender and the iPad app PointOfScale save data to the Firebase database, which can be viewed from a website that incorporates the BarTab interface.

See a live example at https://houptlab.org/bartab/proj/

BarTab is a "stynamic" website that is built using the Jekyll framework system, incorporating AngularJS bindings to the Google Firebase data. The html generated by Jekyll can be found in the local /jekyll/_site directory, and can be copied into a "bartab" directory on an existing website.

Configure Firebase

  1. create a new Firebase realtime database project at https://firebase.google.com

  2. Under "Realtime Database", select the "Rules" tab and enter at least this minimal set of access security rules:

{
  "rules": {
    ".read":  "(auth != null)",
    ".write": "(auth != null)"
  }
}

This will only allow logged in users to read and write data to your database. You could make more elaborate rules if you want to limit access to only certain projects or experiments within the database.

  1. Under "Authentication", add at least one user with email (for login) and password.

  2. Add the apps that will be connecting to the database:

One Web app:

  • BarTab

and two Apple apps, probably already created for those apps:

  • BarTender (iOS) with identifier "com.bcybernetics.bartender"
  • PointOfScale (iOS with identifier "com.bcybernetics.pointofscale"

Configure BarTab to connect to the Firebase database

Go to your Project Overview -> Project settings in the Firebase console.

In the "Your apps" card, select the BarTab web app (i.e., BarTab) for which you need a config object.

Select Config from the Firebase SDK snippet pane. It should look something like this:

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
  apiKey: "AIzaSyD9YA8WzP9dDielksLXMeZNRWh3hi88Pf0",
  authDomain: "bartenderdata.firebaseapp.com",
  databaseURL: "https://bartenderdata.firebaseio.com",
  projectId: "bartenderdata",
  storageBucket: "bartenderdata.appspot.com",
  messagingSenderId: "688763276756",
  appId: "1:688763276756:web:e348c4bcb4dd17bf969a41",
  measurementId: "G-G0DC676WS9"
};

Copy the config object snippet, then save it as the file jekyll/_includes/FirebaseConfig.js

Building jekyll site

  • from inside ./jekyll, run bundle install to install the latest Jekyll version and required ruby gem files.

  • from inside ./jekyll, run make run to build and open site on local host

  • from inside ./jekyll, run make build (run just make to see makefile options) to build site in /jekyll/_site. Copy contents of _site to your website.

About

Web interface to BarTender data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published