Skip to content

Environment Variables

Alberto edited this page Oct 26, 2023 · 5 revisions

πŸ”’ Configure Supabase Auth

  1. Open the .env.local file, this is where you will store your environment variables.

  2. Fill in PUBLIC_SUPABASE_URL and PUBLIC_SUPABASE_ANON_KEY with your Project URL and Supabase credentials. You can find both of them in your Supabase Dashboard under Project Settings > API > Project API keys, linked here.

πŸ”‹ Configure Prisma

For this step you can use any postgres database; my recommendations are Supabase, Vercel, Railway or Heroku.

  1. Fill in DATABASE_URL with your connection string. In a local evironment is preferable that you use a local postgres database, you can install postgres from here and use the default postgres user with the password you set during the installation. The connection string in this case would look like this:
postgresql://postgres:password@localhost:5432/postgres 
  1. Once you are done with the configuration, create the database tables on your local postgres server:
bun db:push 
  1. Finally, start the development server:
bun dev 

πŸ’³ Configure Stripe (Optional)

  1. Create a Stripe account and get your API keys from the dashboard.

  2. Fill in STRIPE_PUBLIC_KEY and STRIPE_SECRET_KEY with your Stripe keys (publishable and secret).