Skip to main content

Firebase

1

Create a Firebase project

Go to the Firebase Console and create a new project.
2

Generate a service account key

  1. Open Project Overview from the sidebar
  2. Go to the Service Accounts tab
  3. Under Firebase Admin SDK, click Generate new private key
  4. Confirm the warning, download the key, rename it to firebase_service_account.json, and place it in the root of the Potpie source directory

Logfire

Logfire provides observability and tracing for AI calls made by Potpie. Create a free account at Logfire and add the following to .env:
LOGFIRE_ENABLED=true
LOGFIRE_TOKEN=your_token
LOGFIRE_PROJECT_NAME=your_project_name

GitHub App

1

Create the app

Visit GitHub App Creation and choose a name relevant to Potpie (e.g. potpie-auth).
2

Set permissions

ScopePermission
Repository ContentsRead only
Repository MetadataRead only
Repository Pull requestsRead and write
Repository SecretsRead only
Repository WebhooksRead only
Organization MembersRead only
Account Email addressRead only
3

Add credentials to env

Generate a private key, download it, and add it to .env as GITHUB_PRIVATE_KEY. Add the app ID as GITHUB_APP_ID.
4

Install the app

From the left sidebar, select Install App and install it on the organization or user account.

GitHub Auth on Firebase

1

Enable GitHub sign-in

In Firebase, go to Authentication and enable the GitHub sign-in provider. GitHub provides a client ID and client secret. Add both to Firebase.
2

Add the callback URL

Copy the callback URL from Firebase and paste it into the GitHub App settings.

Google Cloud

Potpie uses Google Secret Manager to store API keys. Creating a Firebase project automatically links a Google Cloud account. Use that or create a new one.
1

Enable Secret Manager

Enable the Secret Manager API for the Google Cloud project.
2

Configure Application Default Credentials

Run the following to authenticate locally:
gcloud auth application-default login
Alternatively, place the GCP service account key file at service-account.json in the root of the codebase.

Running Potpie

1

Install Docker

Verify Docker is installed and running.
2

Configure environment

Create a .env file from the provided .env.template in the repository and fill in all required values.
3

Start the server

chmod +x scripts/start.sh && ./scripts/start.sh