diff --git a/.env.example b/.env.example index 86be3f4..8ae535c 100644 --- a/.env.example +++ b/.env.example @@ -1,25 +1,14 @@ # Rename this file to `.env` and fill in the values. - -# Required variables for basic local functionality - -# For database read access. -# Ask the project admin. Should start with "eyJh". -NEXT_PUBLIC_SUPABASE_KEY= - -# For authentication. -# Ask the project admin. Should start with "AIza". -NEXT_PUBLIC_FIREBASE_API_KEY= - +# You already have access to basic local functionality (UI, authentication, database read access). # Optional variables for the backend server functionality (modifying user data, etc.) # For database write access. # A 16-character password with digits and letters. -# Ideally this secret should not be shared, even to the developers. -# TODO: set up local Postgres instead of Supabase for local development, add instructions to README, and remove this variable. +# Open a GitHub issue with your contribution ideas and an admin will give you the key to the dev database. SUPABASE_DB_PASSWORD= -# For Firebase access. +# For Firebase access. An admin will set up a service account for you and give you the JSON file. GOOGLE_APPLICATION_CREDENTIALS_DEV="[...].json" GOOGLE_APPLICATION_CREDENTIALS_PROD="${GOOGLE_APPLICATION_CREDENTIALS_DEV}" diff --git a/README.md b/README.md index 946c468..cb901be 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,8 @@ To do so, simply create an `.env` file as a copy of `.env.example`, open it, and cp .env.example .env ``` +This project uses Supabase and Firebase. The keys included in `.env.example` point to a staging environment with test data. Contributors should use these keys for local development. Production uses a separate environment with stricter rules and private keys that are not shared. + ### Installing PostgreSQL Run the following commands to set up your local development database. Run only the section that corresponds to your operating system. diff --git a/common/src/envs/dev.ts b/common/src/envs/dev.ts index c497a4e..5c60b7b 100644 --- a/common/src/envs/dev.ts +++ b/common/src/envs/dev.ts @@ -2,4 +2,17 @@ import { EnvConfig, PROD_CONFIG } from './prod' export const DEV_CONFIG: EnvConfig = { ...PROD_CONFIG, + supabaseInstanceId: 'zbspxezubpzxmuxciurg', + supabaseAnonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inpic3B4ZXp1YnB6eG11eGNpdXJnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTc2ODM0MTMsImV4cCI6MjA3MzI1OTQxM30.ZkM7zlawP8Nke0T3KJrqpOQ4DzqPaXTaJXLC2WU8Y7c', + firebaseConfig: { + apiKey: "AIzaSyBspL9glBXWbMsjmtt36dgb2yU0YGGhzKo", + authDomain: "compass-57c3c.firebaseapp.com", + projectId: "compass-57c3c", + storageBucket: "compass-57c3c.firebasestorage.app", + privateBucket: 'compass-private.firebasestorage.app', + messagingSenderId: "297460199314", + appId: "1:297460199314:web:c45678c54285910e255b4b", + measurementId: "G-N6LZ64EMJ2", + region: 'us-west1', + } }