Skip to content

Latest commit

 

History

History
99 lines (76 loc) · 12.8 KB

INSTALLATION.md

File metadata and controls

99 lines (76 loc) · 12.8 KB

Installation

yarn

Functions

cd functions
yarn

Environment

Before being able to start the functions emulator, some configs are required. Create a .env file, by duplicating .env.example.

Key Description
GIT_COMMIT_SHORT May be left blank for local development. Current GIT Commit hash
ENVIRONMENT Functions environment, e.g. dev, staging or production
BACKUPS_BUCKET Not needed for local development. Google Cloud Storage bucket for backups
DAILY_API_KEY Daily API key
DAILY_DOMAIN_ID Daily Domain id (ask another developer for it)
DAILY_ID_SALT Salt to hash user id sent to Daily. A uuid v4 string)
DEEP_LINK_ANDROID_PACKAGE_NAME Android package name, e.g. org.twentyninek.app.cupcake.dev. Dynamic links parameters
DEEP_LINK_API_KEY Firebase Dynamic Links API key
DEEP_LINK_BASE_URL Base URL of the deep links, e.g. https://29k.org.
DEEP_LINK_DOMAIN_URI_PREFIX Dynamic links domain, e.g. dev.app.cupcake.29k.org. Dynamic links parameters
DEEP_LINK_IOS_APPSTORE_ID iOS AppStore ID, e.g. 1631342681. Dynamic links parameters
DEEP_LINK_IOS_BUNDLE_ID iOS bundle ID, e.g. org.twentyninek.app.cupcake.dev. Dynamic links parameters
OPENAI_API_KEY Not needed for local development OpenAI API key, e.g. sk-O4Ql.... For text classification with Chat GPT. OpenAI API keys
SENTRY_DSN Not needed for local development. Sentry DSN string
SLACK_BOT_NAME Not needed for local development Slack Bot to post messegas as, e.g. Cupcake Bot (prod)
SLACK_FEEDBACK_CHANNEL Not needed for local development Slack channel to post messages to, e.g. feedback.
SLACK_OAUTH_TOKEN Not needed for local development Slack OAuth token. To be able to send messages to slack e.g. xoxb-XXX.... Slack workspace tokens
SLACK_PUBLIC_HOST_REQUESTS_CHANNEL Not needed for local development Slack channel to post messages to, e.g. public-host-requests.
SLACK_SHARING_POSTS_CHANNEL Not needed for local development Slack channel to post messages to, e.g. app-sharing-posts.
SLACK_SIGNING_SECRET Not needed for local development Slack Signing Secret. To verify requests are coming from our slack e.g. 5326f8.... Slack signing secrets
STRIPE_API_KEY Not needed for local development Stripe secret API key e.g. sk_test_51JWhRY.... Stripe API keys

Client

Instructions on how to setup a React Native development environment can be found here: https://reactnative.dev/docs/environment-setup.

Make sure to follow the instructions for React Native CLI.

cd client
yarn

Environment

Before being able to start the client, some configs are required. Create a .env file, by duplicating .env.example.

Key Description
ENVIRONMENT Client environment, e.g. dev, staging or production
DEBUG Not required for local development. Console debug info e.g. client:* or client:metrics debug config
SENTRY_DSN Not required for local development. Sentry DSN string
POSTHOG_API_KEY Not required for local development. PostHog Project API key
ANDROID_PACKAGE_NAME Not required for local development. Android package name. e.g. org.twentyninek.app.cupcake.dev
IOS_APPSTORE_ID Not required for local development. App store app id. e.g. 12345678
IOS_CODE_PUSH_DEPLOYMENT_KEY ANDROID_CODE_PUSH_DEPLOYMENT_KEY Not required for local development. Follow the instructions at app center for setting up a project and getting the deployment key.
API_ENDPOINT API end point. e.g. http://localhost:5001/demo-29k-cupcake/europe-west1/api
METRICS_ENDPOINT Not required for local development. Metrics end point. e.g. http://localhost:5001/demo-29k-cupcake/europe-west1/metrics
STORAGE_ENDPOINT Cloud Storage end point. e.g. http://localhost:9199
DEEP_LINK_SCHEME Not required for local development. Deep link app scheme, e.g org.twentyninek.app.cupcake.dev
DEEP_LINK_PREFIX Not required for local development. Comma separated deep link app prefixes, e.g https://29k.org/,https://awareapp.org
STRIPE_PUBLISHABLE_KEY Not required for local development. Stripe publishable key e.g. pk_test_51JWhRYAMQ.... Stripe API keys
STRIPE_APPLE_MERCHANT_IDENTIFIER Not required for local development. Apple Pay Merchant Identifier e.g. merchant.org.29k.app Stripe Apple Pay

Sentry

Create a client/sentry.properties from the Sentry example template. You may use the empty values for local development.

iOS

Add a client/ios/Supporting/dev/GoogleService-Info.plist for local development. You have two options:

  • By copying client/ios/Supporting/dev/GoogleService-Info.plist.local ➡️ GoogleService-Info.plist. This will only work with local firebase emulator.
  • By downloading it from Firebase

Then install pod dependencies

cd client/ios
pod install

Android

Add a client/android/app/src/dev/google-services.json for local development. You have two options:

  • By copying client/android/app/src/dev/google-services.json.local ➡️ google-services.json. This will only work with local firebase emulator.
  • By downloading it from Firebase