Skip to content

Mobile app supporting EatSF's Vouchers4Veggies program

Notifications You must be signed in to change notification settings

calblueprint/vouchers4veggies

Repository files navigation

Vouchers4Veggies

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.


Getting Started

Prerequisites

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.

Installation

  1. Clone the repo & install dependencies
    1. Clone this repo
      • using SSH (recommended)
        git clone [email protected]:calblueprint/vouchers4veggies.git
      • using HTTPS
        git clone https://github.com/calblueprint/vouchers4veggies.git
    2. Enter the cloned directory
      cd vouchers4veggies
    3. Install project dependencies. This command installs all packages from package.json.
      npm install
  2. Set up secrets:
    1. In the project's root directory (vouchers4veggies/), create a new file named .env
    2. Copy the credentials from Blueprint's internal Notion (access is required) and paste them into the .env file.

Helpful resources

Development environment

  • VSCode (recommended)
    1. Open the vouchers4veggies project in VSCode.
    2. Install recommended workspace VSCode extensions. You should see a pop-up on the bottom right to "install the recommended extensions for this repository".

Running the app

  1. In the project directory, run:
     npx expo start
  2. 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.

Troubleshooting

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);

About

Mobile app supporting EatSF's Vouchers4Veggies program

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages