In order to complete his solution for his Information System, Rocket Elevators, asked his Dev Team to implement tools to gather informations about the traffic on his website. To do so, the developper will have to use 2 tools :
-
NewRelic APM : Requires to install the Gem and link it to the account which will generate a Complete Dashboard with all the information about the internal component of the Information System.
-
Google Analytics : Requires to add a Tag into the Header of the application so it can keep track of online traffic.
At Rocket Elevators Machine Learning is a tool that will give products a competitive edge if the necessary functionality is implemented correctly. Rocket Elevators are highly secure places because what happens during operations can be embarrassing for customers. It is therefore worthwhile to offer those who operate our products safety features that ensure the safety of the users. In addition to the traditional cameras.
The audios will be processed to serve two purposes:
- To recognize passengers via voice profiles.
- Transcribe audio for legal purposes.
To do so, we applied Azure's Cognitive Services on Microsoft Azure platform.
All the paths to the audio files that were used to creating speaker profiles and conversation analysis:
-
PATH TO THE AUDIOS & TEXT FILES app/assets/audio
-
PATH TO THE SPEAKERS RECOGNITION VIEW app/views/recognition/index.html.erb
-
PATH TO THE SPEAKERS RECOGNITION VIEW app/views/speech_to_text/index.html.erb
Postman "CollectionWeek13" collection:
https://www.getpostman.com/collections/39f17f22030489118249
https://drive.google.com/file/d/1H30FoYulTdOLIpMr-tXuH68r83OWIFfi/view?usp=sharing
Kem :
d967f9cc-2fee-4b1d-95a4-1d905fc31714
Emma:
3cadee39-1200-4737-a705-0e0cec50c7ca
Andre:
2f6bd789-ea45-4c8c-a17d-01fa61d3be8c
See details at the video: https://youtu.be/Y6h26qx3Jtk
During Week 10, as the marketing department at Rocket Elevators has long been waiting for the opportunity to do media content placement in the company's elevators. To meet their needs, a content delivery module needed to be implement in the information system.
To ensure this new module is working properly, the developper needed to test it with the Test-Driven Development method (or TDD) and make sure the test were are successful.
This module is available here : Elevator Media Streamer
The test for the Streamer can be found here: Streamer Test
The 3 new implementations of the unit test of the existing code can be found here : Existing Code Test(3)
For the Rails Application, the RSPEC method was used for the implementation of the tests. For the JavaScript variant, the JEST method was used for the implementation of the tests.
Here is the information you must enter in the sign in page to access the BackOffice :
- user :
[email protected]
- password :
admin123
The REST API Repository : Rocket_Elevators_REST_API
- Google Maps
- geocoder The Api is used to allow administrators of the Back-office to geolocate on a map, every client’s buildings and display statistics (Admin only). To access to the geolocation service:
1. sign in as admin
2. left sidebar section service click on Geolocation
3. to display statics click on the markers
1. Go to Rocket Elevators group and select elevator_operations
2. Go to the backoffice
3. Select the elevator, the column, the battery, the building and change the technician phone to your phone number
4. Go back to the elevator and change the status to "Intervention"
5. You'll then receive a sms that require the maintenance
I added the phone number for the test, so you won't have any problems.
1. Open the Slack app and open the chanel
2. Go to Rocket Elevators group and select elevator_operations
3. Go to the backoffice, select the elevator.
4. Change elevator status
5. You'll see a notife in slack about the change
- DropBox The Api is used to upload on the cloud storage the attachment from a Contact when it becomes a Customer and delete the file from the database to avoid duplatation.
1. Sign In
2. On the left panel, select Customers
3. Select Add New
4. Select the User who needs to be converted
5. Click on Save after filling out the form.
- Sendgrid This Api will be triggered if a contact completes the "Contact Us" form to send customized transactional thank-you email. In order to send dynamic content, sendgrid use a JSON blob containing the dynamic data and a html template.
- Recaptcha reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep malicious software from engaging in abusive activities on your website.
- IBM Watson The Api is used to allow the current user of the BackOffice to hear via text-to-speech the current status of all his/her assets.
1. Sign In
2. Hit the play button on the audio player right under Dashboard
3. The audio file will be generated based on the assets of the current user and will be playable.
1. Open ZenDesk and connect with the username and password
2. Open the dashboard
3. When you create a quote or a contact us form, this information will be sent to the dashboard
-
Gemfile - A format for describing gem dependencies for Ruby programs
-
Bundle - Ruby Dependency Management
-
Migrations - Convenient way to alter your database schema over time in a consistent way.
-
MySQL - an open-source database management software that helps users store, organize, and later retrieve data
-
Follow the instructions for installing Ruby on Rails depending on your operatiing system
-
For Mac computer : OSx
-
For Ubuntu computer : Ubuntu
-
For Windows computer : Windows
The main installations that you will need to do in order for the program to run well
- Installing Homebrew
- Installing Ruby
- Configuring Git
- Installing Rails
- Setting Up A Database
- Installing and setting MySQL
- Installing and setting PostgreSQL
If you have any problems during installation, google is your best friend.
Here is a list of forums that might help you :
When all the installation are done, you have to create a test application to validate that everything is set up correctly. If all goes well, the installation should end by displaying : Yay! You're on Rails! If so, you are now ready to run the program. Do not forget to visit the Rails official website if you want to understand some aspects of the program. When you download the program, make sure that the file
config/database.yml
is set correctly. If it's not the case. The program might show you some error when you lunch the server.
-
Use this command to install the dependencies specified in your Gemfile :
bundle install
Other Bundler command that can be useful : Bundler or StackOver-Flow
If you have error with the Bundler, this link can help you : Using Bundler To Install Gems
Site where you can find some gems : Ruby Gems
Sometimes you have to run this command in order to reset your database
db:create
: creates the databasedb:drop
: deletes the databasedb:setup
: does db:create, db:schema:load, db:seeddb:reset
: does db:drop, db:setupdb:migrate
: reset does db:drop, db:create, db:migratedb:seed
: use the filedb/seed
to populate the database
-
Enter in the file of the program with :
cd file_name
-
Make sure the all the migration are done with
rails db:migrate
. -
Run the server with :
rails server
The main program of our website is on the quotes page. From this page, you can get a quote for the type of building you are looking for. We have three types of elevator to satisfy everyone. To do this, you must log in using the sign in button. After that, the information that you send to the program will enter in the database. This data will allow us to give you the best service according to your needs. Know that all your modifications as well as all your quotes are carefully saved and you can access them by going to your account.
Here is the most important folder and files that makes sure that our program runs well
-
app/views
: Most of our different html codes that make up the website. The files are a combination of HTML and Embedded Ruby -
db
Folder : All the database related files go inside this folder. The configuration, schema, and migration files can be found here, along with any seed files. -
app/models
: This folder make sure the you find a particular data that you're looking for, update that data and remove data. -
app/controllers
: This is where all the controller files go. Controllers are responsible for orchestrating the model and views. -
config/routes
: The rails router recognizes our different URLs and dispatches them to a controller's action -
config/database.yml
: This file holds all the database configuration the application needs. many different configurations can be set for different environments. -
config/environment.rb
: This file requiresapplication.rb
to initialize the Rails application. -
Gemfile
: The Gemfile is the place where all your app’s gem dependencies are declared.For more information about the rails directory structure, please visit this Site
For more control of the database, we suggest you to install MySQL workbench. It works almost with all operating system. To download the program, you must make sure that you have an account with oracle. If it's not the case, here is the link to Register
You can also add it in a code editor like visual studio code or IntelliJ IDEA. These different programs allow you to modify database tables more easily. You can also see our database through the terminal. Depending on the computer, you must find the appropriate command to open MySQL.
Here are examples of commands on MySQL :
- Quote.all : show us all quotes that have been submitted
- Quote.find(1) : show us the first submission.
- Quote.new and Quote.create : create a new instance of the quote
You'll find all the information about MySQL command in this Site
There is 3 tables which constitute our database, We have users, employees, and quotes. We have inserted 7 employees who will be in our database to start, you will find them, if you connect as admin in the site, or through the BackOffice section of the site.
The next step was to set up a new database on rails but this time with PostgreSQL Here is the link that allowed us to set up different databases on rails
We have build a data warehouse to analyze the facts of the business. Here are the tables they contain :
- FactQuotes
- FactContact
- FactElevator
- DimCustomers
You can find all the settings on db_dwh/schema.rb
We need to build a data warehouse to analyze the facts of the business, so we have include the following facts :
- Quote Requests
- Contact requests
- Commissioning of elevators
These data allow us to answer three main questions:
- How many contact requests are made per month ?
- How many bid solicitations are made per month ?
- How many elevators per customer do we have ?
Three database queries are required to select the warehouse data that answers these three questions. These SELECT queries will return :
- The number of unique requests (ContactId) grouped by Month
- The number of unique requests (QuoteId) grouped by Month
- The number of elevators (ElevatorId) contained in the buildings belonging to each customer
The data warehouse works under PostgreSQL. You have several ways of seeing the different tables, either from the teriminal, a software that manipulates PostgreSQL or from the backoffice section of our website.
Here's the link to download PgAdmin who is well known in the developer community. It works with all operating systems.
The name of the PostgreSQL databases and their parameters can be found in the dhw_db.yml
file. DWH stands for data warehouse.
The data of the new tables that we have created are created from the data already set up on MySQL. You can find all these different parameters in the lib/dwh/sync.rb
file. The lib/task/sync.rake
allows us to synchronize the data that is transmitted to it from sync.rb
.
This concludes the presentation of the program, do not hesitate to share with us any suggestions or improvements.