Allows you to add things you are grateful for (allowing elaboration) and then recall them at a later time ("cheer me up"). Using a backend built on Firebase Functions (wrapped in the narratory-cloud npm package) with a Firebase Firestore DB.
The bot is built using Narratory and is using Google Auth account linking on Google Actions/Google Assistant. For other clients, a hardcoded email is taken from narratory_config.json
.
- Install Narratory with
npm install -g narratory
- Clone this repository.
- Install dependencies with
npm install
oryarn
- Set up credentials (see Narratory docs on setup)
- Create your agent and start an interactive chat-prompt in the terminal with
narratory start
Note, you need the backend to save and retrieve your grateful entires
- Install firebase CLI with
npm i -g firebase-tools
- Set up firebase with your Google project with
firebase use --add <your-google-project-name>
- Make sure the service account you created for Narratory (and with credentials you put in
google_credentials.json
) has the Firebase Develop Admin role in the Google Cloud IAM console - Create a Firebase Firestore Database for your Google project at Firebase console
- Deploy the cloud functions with
firebase deploy
- Add your public URL (excluding the function name, for example
https://europe-west1-grateful-bnihxr.cloudfunctions.net
) to theconfig.json
file
- Run
npm run dev
to emulate your cloud functions locally - Download and install ngrok and then run it in your app folder with
npm run ngrok
ornpm run ngrok:subdomain
if you have a dedicated subdomain (recommended since otherwise the URL will change for every run). - Add your ngrok url to the
config.json
file and changelocal
to true in the same file - Run
narratory build
on your bot to update it to connect to your local backend
For more info, see the Narratory docs.
Join the Narratory Community on Slack or Facebook or open an issue!