Skip to content

Getting Started

Kyle Deal edited this page Jun 28, 2024 · 12 revisions

Dependencies

It is recommended that you use GitHub Codespaces to do development. This will utilizes a preconfigured development environment that has integration tests to ensure that all tests pass inside it and that you are able to run the development servers of the frontend and backed services. See the GitHub codespaces docs for how to get started with it.

Local development dependencies (if you are not using Codespaces)

Create a new project

Login to Google Cloud Platform and create a new project and give it a project name. Optionally you can specify a project id - a unique identifier for your project. If you don‘t specify a project id Google will create a random one for you. This id can not be changed once the project is created.

Beans Setup

Development

If you are not using GitHub Codespaces:

Setup Oauth for your APP and add the following credentials: Setting up configuration files:

  • touch frontend/lib/config.json
{
    "OAUTH2_CLIENT_ID":"",
    "OAUTH2_CLIENT_SECRET":"",
    "CLOUD_BUCKET": "",
    "SECRET": "",
    "PROJECT": ""
} 

Setup Sendgrid and add the following credentials:

  • touch api/client_secrets.json
{
     "SENDGRID_API_KEY": "",
     "SENDGRID_SENDER": ""
}
  • cp api/config.yaml.example api/config.yaml
  • make
  • make serve
  • navigate to localhost:8080/

For Github Codespaces Users

To prevent remaking the config each time you create a codespace we support loading the config from the YELP_BEANS_CONFIG environment variable. After you follow the steps above you can run python .devcontainer/configs_in_env.py print to print out your encoded configs. You then create a Github Codespaces Secret (see these docs) named YELP_BEANS_CONFIG with the string that is printed out and add the beans repository to the list of repositories with access. When you create a new codespace the config will automatically be loaded from the environment variable.

Windows

If you're developing on a windows machine, you likely don't have make installed. You can install Cygwin to get make (along with a whole suite of GNU tools and software), then the above instructions should work. See #84 for more details.

Next, see Contributing to move on to coding...