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.
-
create a new Firebase realtime database project at https://firebase.google.com
-
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.
-
Under "Authentication", add at least one user with email (for login) and password.
-
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"
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
-
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 justmake
to see makefile options) to build site in /jekyll/_site. Copy contents of _site to your website.