You are on page 1of 40

BrewTracker

Behind the Scenes of a Brewery App

Dani Schnider & Dr. Andrea Kennel


Sprint 1 Some domain knowledge about brewing beer
Sprint 2 The functionality of BrewTracker
Sprint 3 Design of the database
Sprint 4 The REST API: Interface to the Cloud
Sprint 5 Using Flutter to present the data in the app
Sprint 6 Some reports in SQL Developer
Dr. Andrea Kennel

Lecturer for Database


Coach for Project Management
University of Applied Sciences andrea.kennel@fhnw.ch
andrea@infokennel.ch
Brugg/Windisch, Schweiz
www.infokennel.ch
DANI SCHNIDER

! Senior Principal Consultant at Trivadis


! Trainer of several Trivadis courses
! Co-Author of Books “Data Warehousing mit
Oracle” and “Data Warehouse Blueprints”

! Oracle ACE Director

@dani_schnider danischnider.wordpress.com
Knowledge about Brewing Beer
Yeast
Water
Malt
Hops

Fermentation (~ 10 days)

Maturing (~ 30 days)

Bottling
Keg Storage
Bottle Storage
The Functionality of BrewTracker
The BrewTracker App
Dashboard
Yeast
Water
Malt
Hops

Fermentation (~ 10 days)

Maturing (~ 30 days) 1. Fill Keg

3. Fill
Bottles

2. Move to 4.
Cellar Checkout
Bottling
Keg Storage
Bottle Storage
Fill Kegs after Fermentation
1. Fill Keg
Move a Keg to the Cellar (Cold Storage)
2. Move to
Cellar
Fill Bottles from a Keg
3. Fill
Bottles
Checkout / Sell Beer Bottles
4.
Checkout
Design of the Database
Database Environment
• Autonomous Data Warehouse in Oracle Cloud
• Schemas:
• BREWTRACKER
• BREWTRACKER_DEMO
• BREWTRACKER_TEST
Data Model

Sud = Brew Batch


The REST API: Interface to the Cloud
The REST API Overview

GET

POST
JSON HTTP
PUT

DELETE

Client sends request. HTTP Methods Server sends response


Example: Data Model Extension
The REST API Configuration in Oracle
The REST API Configuration in Oracle
The REST API GET

https://xxxxxxxxxxxxxxx-xxxxxxx.adb.eu-zurich-1.oraclecloudapps.com/ords/brewtracker_demo/new_api/ingredients/
"items": [
{
"id_ingredient": 1,
"name": "Equanot",
"ingredient_type": "Hops"
}
],
The REST API POST
Using Flutter to Present the Data
BrewTracker Technology Stack

Flutter https://flutter.dev/ Oracle Cloud Infrastructure


IDE Tool: Android Studio
• Flutter IDE (incl. Screen Shots)
• Code Examples
• …
Example: Full Keg Info
This screen is implemented in
• screen/full_keg_info/full_keg_info.dart
• screen/full_keg_info/components/keg_info_box.dart
Get Data and Present it
The Part for «Notes» is the KegNotes which is implemented in
screen/full_keg_info/components/notes.dart
Get Data and Present it
The API calls are done with a third party library called “DIO”
This is implemented in api_client.dart and repository.dart
Get Data and Present it

https://xxxxxxxxxxxxxx.adb.eu-zurich-1.oraclecloudapps.com/ords/brewtracker_demo/bt/tracker/5461
"items": [
{
"fk_sud": 319,
"fk_keg": 157,
"filleddate": "2022-03-27T00:00:00Z",
"bottleddate": null,
"bottlecount": null,
"lastedit": "2022-03-27T15:57:48.706Z",
"id_tracker": 5461,
"notes": "Nur 3/4 voll",
"co2": null,
"quality": null,
"best_before_date": null
}
],
Post Data

BEGIN
INSERT INTO sud (
id_sud,
fk_beertype,
brewdate,lastedit)
VALUES (
:id_sud,
:fk_beertype,
:brewdate,
CURRENT_TIMESTAMP);
END;
Some Reports in SQL Developer
Reports in SQL Developer
Reports in SQL Developer
Example: Beer Dashboard
Example: Beer Dashboard
Example: Beer Dashboard
Example: Beer Dashboard

You might also like