Skip to main content

Create and connect Google project

OGRRE relies on Google Cloud Platform (GCP) for multiple services. To process documents, OGRRE uses Document AI. To store document files, OGRRE uses Cloud Storage. To authenticate users, OGRRE uses Google OAuth Platform. It is configured to work with any Google Cloud project, as long as the proper credentials are provided. To learn how to configure OGRRE with GCP, read the following tutorials.

Setting up a GCP project

  1. Create an account:
  2. To create a GCP account, you must have a Google account. Then, simply sign up on the GCP console.
  3. Create a project:
  4. To create a project and grant access to it, see the Google documentation on creating and managing projects.
  5. Create a bucket:
  6. OGRRE uses cloud storage buckets to store and retrieve well document image files. To create a bucket, see the documentation on creating a storage bucket.
  7. Set up OAuth:
  8. OGRRE relies on Google OAuth to authenticate users. To create an OAuth client, see the documentation on using Google OAuth.
  9. Get access credentials:
  10. OGRRE requires a user account with credentials to access the GCP APIs. To create a service account, follow the documentation on creating a service account. To include your service account in OGRRE, you'll want to create a JSON key file for your service account by following the documentation on creating service account keys.

Environment variables for OGRRE

The OGRRE backend requires 7 environment variables from your GCP project. As explained in the backend installation section, the following variables must go inside your .env file.
  • PROJECT_ID: The project ID of your GCP project.
  • LOCATION: The location you chose for document AI processors, likely to be "us".
  • STORAGE_BUCKET_NAME: The name you chose for your storage bucket.
  • STORAGE_SERVICE_KEY: The name of the file storing your GCP access credentials. This file should be stored in the same directory as the .env file.
  • token_uri: The endpoint URL where an application requests and receives access tokens. This is necessary for user authentication. For more information, see the Google's documentation on OAuth2.
  • client_id: The client ID of your OAuth client.
  • client_secret: The client secret of your OAuth client.