0.1.0-alpha.1 • Published 4 years ago

astrid-app v0.1.0-alpha.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Cross-platform app for Astrid

About

Cross-platform app for Astrid based on ElectronJS, React and Typescript.

Development

Install the modules with yarn install.

Start the app with yarn dev.

Environment variables

Place .env.local and .env.production and electron-builder.env in the root of the project.

Place serviceAccount.json and serviceAccount.local.json in the src/main folder.

Get the contents of both from 1Password.

Releases

Testing the package

Distribute with yarn dist to get a DMG file that you can test on your computer.

To debug, open the packaged app from the command line using open ~/Sites/astrid-app/dist/mac/Astrid.app/Contents/MacOS/Astrid

Publish to users

  • Go to the master branch
  • Increment version number in package.json
  • Commit with git commit -am [version-number]
  • Tag with git tag [version-number]
  • Push to remote git push && git push --tags
  • Publish a new release to users with yarn publish.

Misc

Setting up a new Google Cloud environment (dev, staging etc)

Setup Firebase

  • Create a new Firebase project in the console
  • Create a new Firestore database for that project in the console
  • Copy the details of the database to your astrid-app config
  • Set the correct access rules for the database (copy from another project)
  • Add indexes as needed (check Cloud functions error log)

Activate APIs

Cloud functions

  • Switch to the new project in astrid-functions with firebase use {project-id}
  • Add the environment variables with firebase functions:config:set
  • Deploy astrid-functions to the new project with npm run deploy

Dialogflow

  • Create a new environment in Dialogflow and link it to the project using webhooks https://europe-west1-{project-id}.cloudfunctions.net/dialogflowFirebaseFulfillment
  • Create a new service account for Dialogflow at https://console.developers.google.com/iam-admin/serviceaccounts?project={project-id}. Name it dialogflow-client and set permissions to Dialogflow API Client. Save the JSON key as serviceAccount.json to astrid-app. (Future)