This project is designed and developed by a team of UC Berkeley students through one of Cal Blueprint's project teams during the 2022-23 academic year.
Learn more about Vouchers 4 Veggies and Cal Blueprint.
Check your installation of npm
and node
:
node -v
npm -v
We strongly recommend using a Node version manager like nvm (for Mac) or nvm-windows (for Windows) to install Node.js and npm. See Downloading and installing Node.js and npm.
- Clone the repo & install dependencies
- Clone this repo
- using SSH (recommended)
git clone [email protected]:calblueprint/vouchers4veggies.git
- using HTTPS
git clone https://github.com/calblueprint/vouchers4veggies.git
- using SSH (recommended)
- Enter the cloned directory
cd vouchers4veggies
- Install project dependencies. This command installs all packages from
package.json
.npm install
- Clone this repo
- Set up secrets:
- In the project's root directory (
vouchers4veggies/
), create a new file named.env
- Copy the credentials from Blueprint's internal Notion (access is required) and paste them into the
.env
file.
- In the project's root directory (
Helpful resources
- VSCode (recommended)
- Open the
vouchers4veggies
project in VSCode. - Install recommended workspace VSCode extensions. You should see a pop-up on the bottom right to "install the recommended extensions for this repository".
- Open the
- In the project directory, run:
npx expo start
- There are several ways to test the app:
- Expo Go (Recommended): download Expo Go on your phone, connect to same network as your laptop, and use your phone camera to scan the QR code displayed in the command line.
- Web: typing
w
into the expo command line opens the app in a web view.- Warning: since the app is designed to be used on a mobile app, web compatibility might be limited, and some functionality might be different when using the web setup.
Starting the expo app results in `FirebaseError: Firebase: Error (auth/invalid-api-key)` but .env exists with the correct credentials.
For whatever reason, sometimes the env variables don't get picked up, but adding the following line to clientApp.ts usually fixes it.
console.log(firebaseConfig);