This repo hosts the code for Cage-free hub. The core tech used is React/JS + Firebase(Google Cloud Platform). UI uses Material-ui Core tech used:
- Javascript & React
- Firebase for backend
- Material UI for ui components
https://docs.google.com/document/d/1cnZXL82MXrW7FbkgwEexp_J9ve18RfNbFrV5tdtTUyI/edit?usp=sharing
-
clone this repo
-
Setup .env if you wish to use preprod database for local development. Copy this into .env in root:
REACT_APP_FIREBASE_API_KEY="AIzaSyAUTMx89j6lV6-R5EGn0yRWtAL5tu2SjLs" REACT_APP_FIREBASE_AUTH_DOMAIN="freerangeeggfarm-26736.firebaseapp.com" REACT_APP_FIREBASE_PROJECT_ID="freerangeeggfarm-26736" REACT_APP_FIREBASE_STORAGE_BUCKET="freerangeeggfarm-26736.appspot.com" REACT_APP_FIREBASE_MESSAGING_SENDER_ID="471292011029" REACT_APP_FIREBASE_APP_ID="1:471292011029:web:b24d4e5a4f993aa860641c" REACT_APP_STAGE="dev" REACT_APP_APP_CHECK_DEBUG_TOKEN="{ask a developer for one}"
-
run
npm install
-
npm start
-
Check which project is active:
firebase use
-
firebase use prod
-
Set firebase functions secrets(one time only - create keys for AWS Simple Email Service):
firebase functions:config:set aws.ses_access_key="[THE_API_KEY]"
&&firebase functions:config:set aws.ses_secret_key="[THE_API_SECRET_KEY]"
&&firebase functions:config:set env.stage="[STAGE]
(verify withfirebase functions:config:get
) -
firebase deploy --only functions
(Fix linting with:npm run lint -- --fix
) -
firebase deploy --only firestore:rules
-
firebase deploy --only firestore:indexes
-
firebase deploy --only storage
firebase init firestore
pulls rules/indexs from firebasefirebase init storage
pulls rules from firebase- https://stackoverflow.com/questions/45404874/how-to-set-hash-key-option-for-authimport-after-default-authexport-in-firebase For migrating admin account
- Remember to whitelist the domain in Auth, and set verification email to /verify
Stages: dev, preprod, prod
"freerangeeggfarm-26736" is preprod alias
preprod url: https://freerangeeggfarm-26736.web.app/
"chickens-are-my-friends" is prod alias
prod url: https://cagefreehub.globalfoodpartners.com/
Contact the developer: Daryl D'Souza https://www.linkedin.com/in/daryl-d-souza-68048b16a/ Contact the Organization: GlobalFoodPartners