Kronos Torre is a Google Action that can help you to find a job. Note: this project is not intended to production. use Vue, nuxt or any other way to render pages inside google assistant is not recomended and this is only an example intended to show the use of this tools.
this project is NOT INTENDED FOR PRODUCTION and is just made for demostrative purposes.
A way better and simplier way to perform this divelopment is through rich responses and SSML, but that kind of efforts don't allow you to modify the frontend at any level. Some of the functions should be approved by google before shown as part as google assistant, however you can explore them at:
https://torre-assistant.web.app
the project can be tested in the alpha release from the following link: https://assistant.google.com/services/a/uid/000000c2fdcd53e1?hl=es
that will give you access to some features related with google actions.
To quick apply to torre jobs, there will be needed public API's
Download and install Node.js according to the Node.js documentation to use the fulfillment library. Your installation of Node.js also allows you to install the Firebase CLI with npm, and later, to run your conversational fulfillment implementation locally.
Install the gactions command line interface (CLI) tool by downloading an installation package, unpacking it, and configuring your execution path.
To install and configure gactions, follow these steps:
- Download the appropriate package for your operating system:
Platform | Package | checksum |
---|---|---|
Windows | Download | sha256 |
Linux | Download | sha256 |
Mac | Download | sha256 |
- Extract the package to a location of your choice and add the binary to your environment's PATH variable. Alternatively, extract the package to a location that's already in your PATH variable (for example, /usr/local/bin).
- On Linux and Mac, enable execute permissions if necessary:
$ chmod +x PATH_TO/gactions
- Run the following command to authenticate the CLI. This command starts an authentication flow and requires a web browser:
$ gactions login
- When the flow is complete, the CLI automatically authenticates.
Install and set up the Firebase CLI according to the Firebase documentation. The Firebase CLI lets you deploy an Interactive Canvas web app to Firebase Hosting and, if necessary, manually deploy fulfillment to Cloud Functions for Firebase.
Before you can use the gactions command-line tool, you must create a project in the Actions console and give gactions access to the project. To create and set up a copy of this project, do the following:
Go to the Actions console. Click New project, enter a project name, and click Create project, Select the games category (this will allow us to create html canvas inside the action) and click Next. Select Blank project and click Start building. Enable the Actions API in the Google Cloud console by following the instructions in Enable and disable APIs. This allows gactions to interact with your project.
- clone this repository into your local machine
- Open the 'torre-assistant'/sdk/settings/settings.yaml file and change the value of the projectId (torre-assistant) field to YOUR project's ID. (it won't deploy if there is a colission with other firebase project)
After you set up the project, you can deploy the Torre Assistant web app and your Actions project. This process creates a draft version of your Actions project that you can deploy to the Actions simulator for previewing and testing:
- From the torre-assistant/ directory, run the following command to deploy the Torre Assistant web app (the contents of the public/ directory).
You can see a rendered version of the web app at the URL returned by the Firebase CLI in a browser: https://PROJECT_ID.web.app.
firebase deploy --project PROJECT_ID --only hosting
- Open the
torre-assistant/sdk/webhooks/ActionsOnGoogleFulfillment/index.js
file and change the value of the CANVAS_URL variable to your project's web app URL.
const CANVAS_URL = 'https://PROJECT_ID.web.app';
- Open the
torre-assistant\sources\frontend\src\util\client.js
file and change the value of the baseURL.
baseURL: "https://PROJECT_ID.web.app/api/v1"
- Compile the frontend with
npm run build
-
create a .env file with the following information (change for the info that applies to you):
category= GAMES_AND_TRIVIA defaultLocale= es developerEmail= [email protected] developerName= Juan José Albán Ortiz displayName= Torre Assistant fullDescription= The assistantis a voice interface to Torre.co privacyPolicyUrl= https=//torre.co/privacy pronunciation= Torre Asistant shortDescription= Get your dream job smallLogoImage= termsOfServiceUrl= https=//torre.co/terms projectId= "torre-assistant" # BackEndConfiguration apiURL = https=//us-central1-torre-assistant.cloudfunctions.net/api # Database PORT= 7777 DEBUG= TRUE DB_USERNAME= DB_PASSWORD= DB_NAME= DB_HOST= DB_PORT= DB_DIALECT=
fill all the parts with the correct information of your database.
-
From the torre-assistant/sdk/ directory, run the following command to push the local version of your Actions project to the console as a draft version:
gactions push
- From the torre-assistant/sdk/ directory, run the following command to test your Actions project in the simulator:
gactions deploy preview
- Open the link that the command-line tool returns to go to the simulator.
- connect the NLU to the webapp: ETA -> 4 days
- finish the account linking integration: ETA -> 12 hours
- connect the account handler to the webapp: ETA -> 2 days
- connect to a custom smalltalk engine: ETA -> 6 days
TBD
Google Actions SDK -> Google LLC. Nuxt.js -> Creators CI integration -> @pandres95
Copyright, Juan José Albán (2021)