0.1.0-alpha.1 • Published 6 years ago
astrid-app v0.1.0-alpha.1
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-appconfig - Set the correct access rules for the database (copy from another project)
- Add indexes as needed (check Cloud functions error log)
Activate APIs
- IAM: https://console.developers.google.com/apis/api/iam.googleapis.com/overview?project={project-id}
- Cloud Scheduler: https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com/overview?project={project-id}
- Billing: https://console.developers.google.com/billing/enable?project=astrid-production
- Dialogflow: https://console.developers.google.com/apis/api/dialogflow.googleapis.com/overview?project={project-id}
- {project-id}@appspot.gserviceaccount.com: Add permissions
Service Account Token Creator(iam.serviceAccounts.signBlob) on https://console.cloud.google.com/iam-admin/iam?project={project-id}
Cloud functions
- Switch to the new project in
astrid-functionswithfirebase use {project-id} - Add the environment variables with
firebase functions:config:set - Deploy
astrid-functionsto the new project withnpm 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 itdialogflow-clientand set permissions toDialogflow API Client. Save the JSON key asserviceAccount.jsontoastrid-app. (Future)
0.1.0-alpha.1
6 years ago