solarpunk2077 / solarpunk

Solarpunk is exploring Agrivoltaics, the intersection of solar energy and agriculture and is on a mission to 100× the deployment solar energy.
https://solarpunkhq.com
GNU Affero General Public License v3.0
4 stars 4 forks source link

Onboarding Flow #4

Closed iamshanvy closed 1 week ago

iamshanvy commented 1 week ago

hi, the PR closes #2

Following features implement from the issue:

Demo:

General Demo: https://drive.google.com/file/d/1RoDnZ3fHMFmMKzww3zaG9XYSGwxI_xI6/view?usp=sharing

Signup invalid state: https://drive.google.com/file/d/1CKUhDcIjN6hgowwMbY5aCmTnwMUiTkZN/view?usp=sharing

Onboarding invalid state: CleanShot 2024-06-23 at 14 22 26@2x

Notes and considerations:

Setup:

  1. Create supabase project

  2. Create profiles and submitted_areas tables CleanShot 2024-06-23 at 14 11 16@2x CleanShot 2024-06-23 at 14 12 28@2x CleanShot 2024-06-23 at 14 12 47@2x

  3. Setup RLS policies CleanShot 2024-06-23 at 14 13 34@2x CleanShot 2024-06-23 at 14 14 03@2x CleanShot 2024-06-23 at 14 14 19@2x CleanShot 2024-06-23 at 14 14 33@2x CleanShot 2024-06-23 at 14 14 48@2x

  4. Modify Supabase Email template to following

    {{if eq .Data.language "DE"}}
    <h2>Willkommen! - Solarpunkhq</h2>
    <p>Sie können diesem Link folgen, um sich anzumelden:</p>
    <p><a href="{{ .ConfirmationURL }}">Einloggen</a></p>
    {{else}}
    <h2>Welcome! - Solarpunkhq</h2>
    <p>You may follow this link to login:</p>
    <p><a href="{{ .ConfirmationURL }}">Log In</a></p>
    {{end}}
  5. Get necessary .env variables from Supabase project settings > API Settings CleanShot 2024-06-23 at 14 17 52@2x

  6. Sign up on resent get your API keys, replace resend api key in .env

  7. Configure Supabase SMTP to use resend https://supabase.com/docs/guides/auth/auth-smtp https://resend.com/changelog/smtp-service

  8. Run Application

vercel[bot] commented 1 week ago

@iamshanvy is attempting to deploy a commit to the solarpunk Team on Vercel.

A member of the Team first needs to authorize it.

PeerRich commented 1 week ago

we will go with https://github.com/solarpunk2077/solarpunk/pull/3

but your work was great too!

i will follow up with your bounty reward in the next 24 hours 🙏

thank you for applying