open-sauced / app

🍕 Insights into your entire open source ecosystem.
https://pizza.new
Apache License 2.0
430 stars 230 forks source link

Improve Onboarding Documentation to Run OpenSauced Locally #1885

Open sdolmo opened 1 year ago

sdolmo commented 1 year ago

Type of feature

📝 Documentation

Current behavior

Currently, the OpenSauced application is comprised of the App and the API. When someone is onboarding and installing these services on their machine, it's unclear what environment variables to change/use to connect the app and the api locally.

Suggested solution

To help onboard contributors, we can update the documentation to include instructions on running the entire application locally.

Some first initial questions/thoughts I have are:

  1. Can the .env variables in the app be updated to include the .env variables created in Supabase for the api?
  2. This entire process can be simplified in a docker container after understanding how to run both services locally

Additional context

No response

Code of Conduct

Contributing Docs

sdolmo commented 1 year ago

I can .take this one. I just need some more information if anyone has been able to do this.

bdougie commented 1 year ago

@sdolmo this context lives here https://github.com/open-sauced/api#%EF%B8%8F-setting-up-a-postgresql-database-locally

@open-sauced/engineers can assist with your questions. My response to the Supabase question is that you should be running your own Supabase if your are working on the API locally.

Some first initial questions/thoughts I have are:

  1. Can the .env variables in the app be updated to include the .env variables created in Supabase for the api?
  2. This entire process can be simplified in a docker container after understanding how to run both services locally
RitaDee commented 1 year ago

I can .take this one. I just need some more information if anyone has been able to do this.

Hello @sdolmo, have you read through the README?

github-actions[bot] commented 1 year ago

Thanks for being interested in this issue. It looks like this ticket is already assigned to a contributor.

sdolmo commented 1 year ago

@bdougie Got it, I created a Supabase instance for the API. and can see the requests happening:

Screenshot 2023-10-12 at 2 19 29 PM

@RitaDee Yes, however, I would like to run the app with it making requests to the local API. However, when I try to click the Connect with Github button, I get this error: {"code":400,"msg":"Unsupported provider: provider is not enabled"}

Screenshot 2023-10-12 at 2 22 44 PM

I configured NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, and NEXT_PUBLIC_API_URL in the .env file of the app to use the Supabase credentials I received. I think I would have to configure the rest of the variables, but I'm not sure what the rest of those values should be.

bdougie commented 1 year ago

However, when I try to click the Connect with Github button, I get this error: {"code":400,"msg":"Unsupported provider: provider is not enabled"}

Did you set up GitHub as a with provider? Perhaps that is missing from the instructions.

sdolmo commented 1 year ago

Did you set up GitHub as a with provider? Perhaps that is missing from the instructions.

No, I have not. How do I do that?

takanome-dev commented 1 year ago

Hey @sdolmo, you can just use the beta server (beta.api.opensauced.pizza) if you don't want to spin up the server locally.

No, I have not. How do I do that?

  1. In your supabase instance, navigate to Authication -> Providers -> Enable Github and you will have keys generated that you will need for step 3

supabase-1

  1. Go to your Github settings -> dev settings -> oauth apps -> create a new one

supabase-2

  1. Fill in the form with the keys in your supabase instance
supabase-3 supabase-4

Let us know if you encounter any issues :pizza:

sdolmo commented 1 year ago

Hey @sdolmo, you can just use the beta server (beta.api.opensauced.pizza) if you don't want to spin up the server locally.

Thank you, @takanome-dev, I'll give that a try.

However, I want to spin this up locally. Is it the same process?

takanome-dev commented 1 year ago

However, I want to spin this up locally. Is it the same process?

Oh sorry I was not clear. You only need to do this if you want to use the API locally