To use the Activist Handbook editor in production, you need to do two things:
- Setup hosting using Cloudflare Pages
- Setup a Firebase environment as backend
Production branch: main Preview branches: dev Build command: quasar build Build output directory: dist/spa
NODE_VERSION: 14
Create a new Firebase project. Set a project ID, for example: activist-handbook
Note: In the links below, change the project ID to whatever you are using.
https://console.firebase.google.com/project/activist-handbook/firestore/
https://console.firebase.google.com/project/activist-handbook/authentication/providers
https://console.firebase.google.com/project/activist-handbook/appcheck
firebase cli
firebase use activist-handbook
To find out the name of your project, run: firebase projects:list
Run:
firebase init
Select Firestore, use the defauls for the Firestore Rules (firestore.rules) and Firestore Indexes (firestore.indexes.json). Do not overwrite either.
In the firebaseFunctions
directory, run:
npm install
Save your secrets: https://firebase.google.com/docs/functions/config-env#secret-manager
firebase functions:secrets:set SECRET_NAME
- OPENAI_SECRET
- GITHUB_API
- CLOUDFLARE_IMAGES_API_TOKEN
- CLOUDFLARE_IMAGES_ACCOUNT_ID
- ALGOLIA_API_KEY1/2/3 - one per extension
- ALGOLIA_APP_ID1/2/3
- Cloud Vision API
firebase deploy