Project Structure


flowchart LR
    F <--> B{Dialogflow};

		subgraph Facebook
			direction LR
			A[Messenger] <--> E[FB Page]
			E[FB Page] <--> F[Dev. App]
		end
    subgraph Google Cloud Platform
        direction LR
        B <--> C[Cloud Function]
        C <--> D[Firestore]
    end

  1. Google Cloud:
    1. GCP Project: hip-log-bot
    2. DialogFlow: HipLogBotAgent
    3. Cloud Functions: hip-log-bot-cf (prod), hip-log-bot-cf-test (test)
    4. Firestore: Default (the free database is always the default one)
  2. Facebook
    1. Facebook page: Marks Activity Logger
    2. Developer app: "marks_activity_logger"
  3. GitHub repo: HipLogBot. Within the repo, we have two folders:
    1. dialogflow/: store the DialogFlow bot configs (exported directly from DialogFlow and version controlled in this repo)
    2. hip-log-bot-cloud-function/: the python source code and test files of the code to be executed in Cloud Functions. This code parses intents from DialogFlow and writes to the FireStore db. It has a full Python API to map the necessary entities of this project

Documents


Development Lifecycle

Cloud Architecture

Data Model

Python API

Onboarding


In order to get setup for development, you will need the following:

  1. Get added to the GitHub repo HipLogBot as a collaborator
  2. Get added to the GCP project (Firestore, Cloud functions) as IAM user
    1. Obtain a json key file with firebase service account credential (e.g. firebase-adminsdk)
  3. Get added to the Facebook App as a developer

Chat bot design